Hello folks! Lately I've been using an RFM95 chip with an ESP32 in order to send data to TTN. However, no matter what I try, the data isn't received by TTN. Here is my code:
ulora2.py: https://pastebin.com/RqtUWpNM
AES_CMAC.py: https://pastebin.com/THHeKtc8
main.py: https://pastebin.com/N9x8ewpP
So, let me explain why it "doesn't work". Since it's only an RFM95 module, the device is not registered yet. According to the LoRaWAN specification v1.1, I have to send a Join-Request message, like this:
You can see this in my main.py lines 16-24. The data isn't received by TTN however, even when trying different error rates, frequencies, TX powers and spreading factors. Here you can see my configuration for my end device:
During testing I found out that the RSSI register reads 45 on average, which seems good enough for me. Transmitting works (?), since the interrupt is generated with the TX Done flag set, so I guess that's fine. The payload isn't received, as it isn't shown in the "Live Data" tab from TTN, neither do I get a response and RX Done, so somewhere there is still a bug. Can anyone spot the mistake?
ulora2.py: https://pastebin.com/RqtUWpNM
AES_CMAC.py: https://pastebin.com/THHeKtc8
main.py: https://pastebin.com/N9x8ewpP
So, let me explain why it "doesn't work". Since it's only an RFM95 module, the device is not registered yet. According to the LoRaWAN specification v1.1, I have to send a Join-Request message, like this:
You can see this in my main.py lines 16-24. The data isn't received by TTN however, even when trying different error rates, frequencies, TX powers and spreading factors. Here you can see my configuration for my end device:
During testing I found out that the RSSI register reads 45 on average, which seems good enough for me. Transmitting works (?), since the interrupt is generated with the TX Done flag set, so I guess that's fine. The payload isn't received, as it isn't shown in the "Live Data" tab from TTN, neither do I get a response and RX Done, so somewhere there is still a bug. Can anyone spot the mistake?