Lora-net / LoRaMac-node

Reference implementation and documentation of a LoRa network node.
Other
1.87k stars 1.09k forks source link

SX126x's driver crashing radio chip in sniff mode #456

Closed Atokulus closed 6 years ago

Atokulus commented 6 years ago

https://github.com/Lora-net/LoRaMac-node/blob/1cdd9ccec4c9f05b616e7112059be4a9e358c571/src/radio/sx126x/sx126x.c#L113

After having received a package in sniff mode and processing the IRQ_RX_DONE interrupt, SX126xWakeup() is called even though the chip is already awake.

This results in the SX126x getting into an illegal state (the chip, not the driver), which has different strange & erroneous effects:

To workaround this issue you can extend the code line referenced above:

if( ( SX126xGetOperatingMode( ) == MODE_SLEEP ) || ( ( SX126xGetOperatingMode( ) == MODE_RX_DC && GpioRead( &SX126x.BUSY ) == 1 ) ) )

Please check whether you can reproduce this issue.

Cheers @atokulus

mluis1 commented 6 years ago

This question is of topic for this project. This project only concerns LoRaWAN protocol implementation.

Could you please ask your question on Semtech LoRa Community portal. Under collaborate page there is a specific forum for the SX126x devices. You may need to register first. SX126x Forum

Thank you for your understanding.