Open jpmeijers opened 3 years ago
Changes for next experiment:
while(os_queryTimeCriticalJobs(ms2osticks(8000))) {
Serial.println("Crytical jobs");
radio_process();
delay(10);
}
I'll report back any changes after it has run for 12h+ hours.
Sorry you're having problems!
My suggestions.
Please add code to check the result of LMIC_setTxData2()
: it returns a value of type lmic_tx_error_t
.
I suspect that the attempt to transmit is failing and therefore you're waiting forever for something that won't happen. In any case, it must be checked.
Also, please look at LMIC_EVENT_NAME_TABLE__INIT
and LMIC_EVENT_NAME_MULTISZ__INIT
-- these can be used to print the events so that you'll be sure to get all the defined names. Event17 is EV_TXSTART
.
I recommend not printing in the event routine if you can possibly avoid it; it can affect timing in unpredictable ways. Instead, log data to a buffer and print from the buffer in the background code.
Best regards, --Terry
Thanks Terry, I'll try and follow your suggestions.
With the changes listed in https://github.com/mcci-catena/arduino-lmic/issues/642#issuecomment-743742205 the lockup does not happen anymore. But an interesting result is that fcnt = 65 is skipped. I received 64 and 66 though. It could be that 64 was still queued when 65 was ready, and the new if check in do_send detected this.
This is related to https://github.com/mcci-catena/arduino-lmic/issues/547, but that issue used an older version of this library.
Current setup
Transmit function
Current behaviour
Frame counter indicates board restart.![image](https://user-images.githubusercontent.com/948278/101981766-da873180-3c77-11eb-9ca0-28973c10ee6a.png)
Log output
Interpretation of logfile
Second last TX is successful as I see the
EV_TXCOMPLETE
event and theTX done
log message.75 loops of 8s sleeps later (10 minutes) I see a message
Packet queued
. After this the blocking TX function wait forever until the WDT resets the device and the device starts up and join again.Something strange that I see is that an
Unknown event: 17
is printed every time I doLMIC_setTxData2()
.I have seen a similar issue with Basic Mac https://github.com/LacunaSpace/basicmac/issues/25