@bertrik I have used your Esp32PmSensor code on a ttgo-esp32-v2.1.6 board. As you can see on the photo the program sends messages to my gateway. In the log I can see that the gateway receives the join messages, but never send a downlink message. To me it looks that the JoinEUI and the DevEUI are reversed. That’s because another node I made joins perfect (see last screenshot).
Yes, they appear to be swapped.
You should swap them back in the application through the console.
The App EUI / Join EUI is hardcoded in the firmware (as is the app key at the moment…)
The Device EUI is derived from the built-in unique id of the ESP32 board.
I have a not-completely-worked out plan to improve this scheme:
Device EUI still derived from the built-in unique id of the ESP32 board
App EUI is encoded in the firmware (same for all of your devices)
Key is randomly generated upon first startup of the firmware, then saved in EEPROM
A button press then shows a QR code on screen that encodes the information above, so you can take a picture and enter it in the console for that device.
Ok, that was the solution. A ttgo-esp32-v2.1.6 has no buttons but I got the keys from the serial console and entered the values in a new device. Now the device is sending payloads to the gateway.
Thanks!
Now this is working, next step is trying to understand the Cayenne payload encoding…
B.t.w. is there a way to reactivate the screen? Do I have to add a button to the board?
Roel