Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
LoRaWAN "Tx Timeout" does not trigger Error Event #7285
Steps to Replicate
Using the Lorawan Example Project.
To Replicate: disable the SPI after a successful TX.
ie. GPIOA->MODER &= ~(0b11 <<(7*2)); //setting the MOSI pin (PA_7) to GPIO_MODE_ANALOG
target used DISCO_L072CZ_LRWAN1
When the Stack attempts a second TX with an inoperable SPI link to the radio module, a TX timeout event is triggered in the SX1276_LoRaRadio driver. However the LoRaWAN stack returns the event : TX_DONE.
LoRaWANStack::process_transmission_timeout() is called (this function is described as a fatal error)
the second line in LoRaMac:: post_process_mcps_req(); is:
this clears the error event flag, and the LoRaWAN stack returns the event : TX_DONE.
Removing the line LoRaMac:: post_process_mcps_req();
I have not tested this solution thoroughly or using different classes.
Issue request type
[ ] Question
added a commit
Jun 27, 2018
referenced this issue
Jun 27, 2018
@tpet93 There was no need to post process anything there. It was a mistake. However, the issue was a bit more grim than expected. Radio driver was trying to reset the chip which would result in a charade of misfired interrupts causing an ISR queue overflow. In addition to that the timout handling in the upper layers was directed only at MCPS type of data (normal messages) and not the MLME type. Whereas this timeout could have happened in MLME data path as well. Nice catch and thank you for escalating it.