JackGruber / ESP32-LMIC-DeepSleep-example

31 stars 6 forks source link

OP_TXRXPEND pending #3

Closed JackGruber closed 3 years ago

JackGruber commented 3 years ago

Hi all,

I'm using an EZSBC ESP32 Dev board with separate rfm95w (EU868) and having the same problem when using TTN V3 credeńtials. Problem starts when TTN sends an unconfirmed downlink LinkADReq after a regular unconfirmed uplink by the node (FCnt 19 in the attachment) and this gets answered with an LinkADRAns. After this, the node is starting it's deepsleep , and the value for LMIC.opmode that is written to RTC seems to refer to a busy mode. After waking up, the node continues with LMIC.opmode: OP_TXRXPEND OP_NEXTCHNL which causes the system to be unable to send data to TTN See Attachments.

@JackGruber : can we solve this issue by checking the LMIC.opmode status before writing it to RTC and -if necessary- correct it. Do we need the value for LMIC.opmode saved to RTC anyway?

Thanks a lot!

BR Marc Error ESP32 DeepSleep TTNV3.txt Screenshot_2021-06-29 RAK7258 - LoRa Packet Logger - LuCI

Originally posted by @MarcESP32 in https://github.com/JackGruber/ESP32-LMIC-DeepSleep-example/issues/1#issuecomment-871524131

JackGruber commented 3 years ago

@MarcESP32 you can try the fix 0ea9de3

MarcESP32 commented 3 years ago

fix tested. Issue solved. Thanks a lot.