-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lost payload in first uplink after a confirmed downlink #395
Comments
@cyberman54 -- thanks for the report. I will investigate. I'm traveling today, so it may be a few days. I have noticed that the TTN console doesn't display uplink messages consistently. You won't be able to match up to a decoder. You can see what's going on in the gateway traffic link, sort of. The message you are showing is the zero-length (no port) ACK. The LMIC sends the ACK immediately -- it currently won't piggyback it on another message from the app. This results in exactly the message you are displaying. In EU, this will count against the 1% channel utilization constraint. The compliance tests do exactly this. The device uplink traffic won't show this packet. But the gateway will. The FCntUp should be 15 for your next data. Timing will change for this; it's possible even that this next uplink is completed with an error because "the LMIC is busy" when you submit. The next batch of commits (on a branch) will give a better error return from LMIC_setTxData2(). But for now, check to see if the result from LMIC_setTxData() is non-zero, as that indicates an error. |
My application does already checking the return value of LMIC_setTXData2(). It is zero in this case. Before calling LMIC_setTXData2() my app checks the LMIC eninge status to ensure that LMIC is not busy, otherwise my app postpones the send using a queue. The point is: if the downlink before was unconfirmed, the uplink works as expected. But payload is missing in exactly the same scenario when the downlink was confirmed. |
We can close this. You did hit the point, my app had a bug which resulted to not properly evaluate the return status of Sorry to trouble you with this. |
@cyberman54 No trouble at all, I'm very grateful for your active and patient testing on this work. |
@IoTopenTech What you're seeing is an artifact of the TTN network and the TTN console. Nothing is getting lost, but the TTN console is not displaying things very clearly. The LMIC (as a design choice) does not delay uplink acknowledgements. So it sends a null uplink, with the ack bit set. Hence you get the green check mark on the ack of the confirmed downlink. (Without this, you would have had to wait until the next scheduled uplink to see the confirmation; that could be arbitrarily long. Although it's technically possible to set a timer, and do the ack after a little while, that adds test complexity and is even more dependent on the app not to go to sleep in the meanwhile.) |
Testing downlink confirmation with current code (commit #6427a03) on EU868 with TTNv2 i found a strange effect. Not sure if this is a bug in LMIC, or maybe TTN or even my application.
Reproducable show case:
LMIC_setTxData2()
results in an uplink with NO payload, that means, the payload is lost.23081882: TXMODE, freq=867700000, **len=15**, SF=7, BW=125, CR=4/5, IH=0
I decoded the packet which is seen on the gateway in step 4.
The text was updated successfully, but these errors were encountered: