-
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
FAILURE at src/lmic/lmic.c:1606 #209
Comments
Line for reference: Line 1606 in 23e6d5e
This is checking internal state. I wonder if this is a bug due to the fact that you're receiving during window 2? I say this because I've never seen a normal RX during window 2 before, and it's (of course) the networks' option to use or not use window 2. More study needed. Instead of the ASSERT, can we try something like: if ((LMIC.opmode & OP_TXRXPEND) == 0) {
// debug print -- at least the LMIC.opmode value.
// trick to get a useful message in the assert:
ASSERT(0 && "LMIC.opmode & OP_TXRXPEND must be non-zero");
} |
So, I add the following lines inside the LMIC_DEBUG_PRINTF("LMIC.opmode: %d\n", LMIC.opmode);
delay(1000); The result is the following
|
Sorry for the slow response. Here are the bits from the opmode: Lines 208 to 223 in 23e6d5e
This looks like
The time stamps suggest about 65000 os-ticks/second in your setup, so this later time is about 13 seconds after the last operation. This looks like a memory corruption problem or some other "meta" problem. I have never seen the LMIC behave like this, and the only way to cause an RX2 event at that point is for an osjob_t to get rescheduled without setting it up properly. Nothing in the trace suggests that the LMIC is doing this. If you're using osjob_t yourself, look for a double use of a block or something similar that causes a dangling pointer to be de-referenced. |
Actually, the code being run is that of the ttn-otaa example. |
I think this is related to a complex app plus #249. The multiple events are exactly the symptom of unanticipated re-entrancy to ttn_otaa does a Also, btw: the print of EV_TXSTART and the timestamp happens at an awkward time - it uses up some of the timeslot. I'm strongly considering moving all the printing out of onEvent() because ... EV_TXSTART and a few other events are timing critical. |
Based on my experience this weekend, ABP plus #249 is likely to be the issue, combined with the overhead introduced by debug prints. Have you modified your ttn-otaa? The one in the tree disables ABP after a join. |
No, it was the default ttn-otaa example. However, since I'm not able to reproduce the issue anymore, I suspect it was related to the setup. Closing for the moment. I will re-open the issue if it occurs again. |
I am experiencing a
FAILURE
using LMIC withcfg_EU868
along with a private gateway, which then connects to a privatelora-server
.I am able to reproduce the failure consistently by simply running the
ttn-otaa.ino
example sketch. I can not predict when it happens, but usually it happens within the first 5 minutes.The content of
lmic_project_config.h
isThe serial output is
The text was updated successfully, but these errors were encountered: