Open trlafleur opened 6 years ago
Hi, have you solved this problem? I have the same issue in my code
I don't think a failure to receive an ack on a confirmed uplink is supposed to immediately result in an EV_LINK_DEAD
.
Based on this and this EV_LINK_DEAD
is triggered if the gateway doesn't ack for the preset LINK_CHECK_DEAD
number of uplinks.
As you can see here, that number is set to 24 by default.
Therefore, it makes sense that you get an EV_LINK_DEAD
after 25 attempts.
If you'd like to change the number of attempts before an EV_LINK_DEAD
, you should set LINK_CHECK_DEAD
to a custom value.
I have been doing some testing to determine when I'm no longer connected to a gateway... The goal is to determine when I need to try a rejoin??
I start off with an active GW, I do join the network, I see traffic at TTN. My sends ask for an ACK, so it should fail if I'm no longer connected to the network... I TX into a dummy load so, very low TX energy is sent... No other GW within 10mi
But, when I disconnect the GW, My messages still get an: Event EV_TXCOMPLETE, time: 481, this is very odd but after about 25 tries, I get an: Event EV_LINK_DEAD, time: 1743
So my question is, why do I get TXCOMPLETE back from the stack when Its NOT connected to any GW???? if its asking for an ACK back from the GW??
I have a keep-alive task sending a REJOIN every 120 sec...
My test code is at the end.... its based on the standard example code, but some change as needed for my testing. ARDUINO 1.8.5 LMic Arduino-2 Mods for SPI speed were made to LMiC code Keys have been changed
Test Code: