Application received data for a while, then stops receiving


(Tony G8wbi) #1

I’ve built a gateway (iC880A-SPI + Raspberry Pi), then created a test application and associated a device with the application. The device is an Arduino Nano + AdaFruit RFM9X + sketch using Arduino-lmic library. It transmits the temperature every 60 seconds. Primary reason was the use TTN Mapper to get an idea of coverage.

For the Device, I used the Activation Method ABP, and took the Network Session Key and App Session Key
and pasted them into the Arduino sketch. And it worked. The Gateway Console displays the packets as they arrive, and the Application and Device Consoles also display the packets, and the TTM Mapper sees them and pings them on the map. All good so far.

HOWEVER - after a random amount of time, the Application and Device Consoles stop displaying the packets, even though the Gateway Console still displays them. Therefore they are definitely being received, but something has gone wrong with the Network Session Key and App Session Keys. Create a new pair of keys, and re-upload the sketch to the Nano, and it all works again for a while, till a random period later and it stops. Random = 30-ish mins or more.

I can’t what I might have done wrong. I did wonder if I’d run into the Fair Usage Limits and was being blocked, but searching for that suggested that it wasn’t being strictly enforced.

Any thoughts?
Tony…


(Jimgi) #2

Hello Tony - I have just noticed a similar thing. I have 2 devices running, but haven’t seen any data in my devices console for the last 2 hours, but my TTN gateway is showing packets arriving!
Don’t have the opportunity to check my devices yet, or the various keys etc. but will do so as soon as possible.
Up until now, the network has been rock solid, so can’t imagine what is going wrong.

Also operating the Thingspeak network, and that seems fine, so reasonably confident that my infrastructure is OK.

Regards, jimgi


(Hylke Visser) #3

Have you checked the troubleshooting page? https://www.thethingsnetwork.org/wiki/Troubleshooting#troubleshooting_i-am-no-longer-receiving-data-in-my-application

Don’t do that please


(Tony G8wbi) #4

Re ABP - I wasn’t sure about that, but it was suggested by the person whose video I was following. I’ll investigate doing it the OTAA method.


(Jimgi) #5

I am using OtAA - with both the TTN UNO board and the Seeeduino LoRaWan board. Both are excellent products and have worked flawlessly up 'till now!
Jimgi


(Tony G8wbi) #6

I haven’t asked Mr Google the question yet on how to set up OTAA on an Arduino, but where did you get you sketch from?


(Jimgi) #7

Hello,
I am not at my home machine as yet - but I have working code for both the microchip radio and the RHF76-052 radios on Github. If you are in the UK (European region) they should work. Best on an M0 device.
I will do some tidying up of the code and make the repos public this evening.
The code I have looks at an Adafuit light sensor and posts the results up to Cayenne in LPP format using TTN.

If you are using the Seeeduino LoraWAN device, I could post that too. The Seeed product is very good.
jimgi


#8
  • you can’t run code for the TTN uno on the Seeduino and vice versa

(Jimgi) #9

Yep, that’s pretty much the code that I have used for the TTNn UNO BoRRoz - just a few changes to send data in Low Power Payload (LPP)format for the Cayenne integration. (Real sensor data).

Managed to make it back to my nodes - they were still not operating…After disconnecting/resetting, both nodes connected straight away, and everything seems fine. It just seems strange that both nodes went off-line at the same time. As I mentioned, they are different radios…
jimgi


(Tony G8wbi) #10

Well I’d just like to say thanks to you all (both?) for the various hints. All sorted (I think).

Reconfigured both devices (Arduino Nano + AdaFruit RFM9X, and Arduino Uno + Dragino shield) as OTAA and both seem to be working. The Nano is pinging away and appearing on TTN Mapper (even though I’m at home!), so I’ll try a more extended coverage walkaround in the morning. Might even get the Gateway aerial out on the roof first.

One Happy Bunny!


(Jithinisaac) #11

Hey am facing the same problem… using abp for authentication… Traffic is visible in the Gateway page, but no data can be seen on the node traffic page… not understanding what is the issue! Please help