Hello all,
This is my first LoRa project, and I’m very confused as to why my project is not working correctly.
Project Overview:
- Arduino MKRWAN 1300 End Node using LoRa.h library
- TTN Outdoor Gateway in next room
- I’m getting my GPS position and sending it to the TTN network via LoRa.print commands
- I’m sending my device address via LoRa.write commands (converting the address to decimal)
- Frame Counter Checks disabled
- Frame Counter Width = 16 bit
The outdoor gateway consistently sees my message, and the DevAddr is my address that the device’s settings show. The issue is that the TTN Gateway Traffic console sees this, but not the device’s application data. I assume this is the ABP method, but I am not sure that
Tx portion of code:
LoRa.write(128); // Hex 80 - seemed to be the header I needed
LoRa.write(#); // placeholder for real address
LoRa.write(#); // placeholder for real address
LoRa.write(2); // no change
LoRa.write(38); // no change
// Frame info
LoRa.write(0);
LoRa.write(counter); // fcount
LoRa.write(0); // fcount
// Frame Port
LoRa.write(1); // was 2
LoRa.print(MSG); // message is my string of data, the TTN Gateway sees this and decodes correctly
LoRa.print(counter);
LoRa.endPacket();
When I simulate the uplink with a payload from the gateway, it sends it to the device, and shows my correct GPS coordinates.
Anyone have any insight why my device is not getting the payload? Thanks in advance.