HelTecAutomation / CubeCell-Arduino

Heltec CubeCell Series (based on ASR6501, ASR6502 chip) Arduino support.
256 stars 140 forks source link

LoRaWan_interrupt example missing ~50% of transmits #271

Open metro69 opened 1 year ago

metro69 commented 1 year ago

I am running the LoRaWan_interrupt example on a HTCC-AB01 v2 board.

Without any changes, I am losing ~50% of all USER_KEY presses: the interrupt happens, but the LoRaWAN transmit never happens.

In the serial output below, every � coincides with a missed transmit.

It looks like some other interrupt is interfering with the LoRaWAN.send command.

20:51:34.145 -> Sending data packet
20:51:34.145 -> unconfirmed uplink sending ...
20:51:37.715 -> 131106accel woke
20:51:37.715 -> Sending data�134036accel woke
20:51:40.631 -> Sending data�136381accel woke
20:51:42.991 -> Sending data packet
20:51:42.991 -> unconfirmed uplink sending ...
ScholliYT commented 1 year ago

Are you being rate limited by your regional LoRaWAN parameters?

metro69 commented 1 year ago

I don't think so. It seems more a matter of the lorawan code generating interrupts that interfere with the serial.print and dropping the send request without any failure indication.

If I leave ~10s between button presses, transmits seem to work.

I would expect the API to be robust to signal the send call to not succeed if the system is not ready to accept another send.

ScholliYT commented 1 year ago

Yep, the codebase isn't that good. And it is not well maintained at the moment. Guys from Heltec are not really responsive on this repository.