Unconsistent uplink messages

Hi everyone,

I’m having issues with uplink using arduino uno + dragino lora shield v1.4

I used LMIC library for sending uplink messages and it mostly works but recently the messages are being sent but I don’t get anything on the TTN console or sometimes it’s with delay.

I don’t think this is dragino or LMIC issues but maybe issue with the gateways.

I’m from Zagreb, Croatia and I have couple gateways in my range and I didn’t have problem sending uplinks so far but lately I noticed inconsistent behavior.

I have couple questions regarding troubleshooting this issue.

How can I check my daily limit for uplink messages? Because the other day I was playing with my script and I accidentally send a lot of packages in short time, after that I couldn’t send any packages so I just assumed I reached the daily limit.

Also how can I troubleshoot the uplink not being consistent? should I try from different locations, btw I’m close to window and didn’t notice any problem sending the uplinks before.

Recently there is a lot of delay between me sending message and gateways receiving them…

The Fair Access Policy seems not yet enforced by TTN, so more than your daily allowance, likely you are hitting duty cycle limitations (and this means you are sending way too often). You should not be able to send a lot of packets in a short time, that is, you can try but the node should not send them if above duty cycle limits, and this may be understood as inconsistent, but is just an attempt to respect the law. Said that, if you give some more details maybe is easier to understand what is happening (e.g., SF, delay between packets, etc).

I’m setting SF7, and currently the delay between packages is set to 1 minute but only If package is delivered so nothing happens after a minute…

for now I just want to send one package but it doesn’t seem to work.

This is the script I’m using, normally it works fine: https://pastebin.com/2DVW7n79

Also sorry for lot of boilerplate (useless) code I still have to remove stuff I don’t necessarily need.

Any useful info for troubleshooting I missed?

#ifdef CREDENTIALS
static const PROGMEM u1_t NWKSKEY[16] = NWKSKEY1;
static const PROGMEM u1_t APPSKEY[16] = APPSKEY1;
static const PROGMEM u4_t DEVADDR = DEVADDR1;
#else
static const PROGMEM u1_t NWKSKEY[16] = { my_network_key };
static const PROGMEM u1_t APPSKEY[16] = { my_app_key };
static const PROGMEM u4_t DEVADDR = my_dev_address;
#endif

I assume you’ve enabled CREDENTIALS somewhere?

The above is using ABP. That, along with:

…makes me wonder if this might be a frame counter issue? What does “with delay” mean: do you see old data coming in late, or do you not see any data until some value of the frame counter is reached?

See https://www.thethingsnetwork.org/docs/lorawan/security.html#frame-counters

Hi, thanks for reply,

I have my credentials if by credentials you mean network_key, app_key and dev_address I just mocked them for the pastebin.

I’m aware it’s using ABP, and it was working fine for the testing purpose.

By delay I mean sometimes it’s couple minutes delay, but the other night it wasn’t sending any packages but I left the device on and then suddenly 45 minutes to an hour later it started sending packages again.

Right now I still can’t get single uplink :confused:

I’m not familiar with frame counters I’m going to give it a read, thanks…

So, I’m quite sure you’re actually seeing this:

Look at the counters! And see ABP node stopped working -> Fixed by creating new ABP.. Why? :) - #7 by arjanvanb

2 Likes

After reading this, I’m pretty sure this is what’s happening:

This security measure has consequences for development devices, which often are statically activated (ABP). When you do this, you should realize that these frame counters reset to 0 every time the device restarts (when you flash the firmware or when you unplug it). As a result, The Things Network will block all messages from the device until the FCntUp becomes higher than the previous FCntUp . Therefore, you should re-register your device in the backend every time you reset it.

I will try to fix and and post and update!

That was it!

I disabled Frame Counter Checks in the settings and I’m getting the uplink messages now.

For the development, should I reset the counters or work with the frame counter checks off?

If I reset the counters what happens exactly? Do my credentials/keys get changed for some reason?

Thanks for fast answer & support!

1 Like