What should I do when getPacketLength() returns 0 in RX IRQ mode? #1705
Replies: 1 comment 1 reply
-
|
That's a very good question and it depends on whether there are any additional IRQ flags set. If there are some CRC or header errors, it should return an appropriate error code. If not, then it will read 0 bytes of data into your In any case it would be interesting to figure ouit why is |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am dealing with an intermittent issue where my SX1262 radio randomly stops receiving in RX interrupt mode after a few days of uptime. According to logs, the failure starts immediately after the early-return path is taken with
packetLength == 0, and the IRQ pin remains high afterwards.This strongly suggests that the IRQ is left uncleared in that situation. Calling
clearIrqFlags(RADIOLIB_SX126X_IRQ_ALL)should fix that, but I have not been able to confirm it yet. Also, from a software design point of view, I do not like duplicating parts of whatreadData()already does internally.My questions:
packetLength == 0check and always callreadData()(even when the length is 0), relying on it to clear the IRQ? Is that safe and supported?readData()return in this case?Beta Was this translation helpful? Give feedback.
All reactions