JackGruber / ESP32-LMIC-DeepSleep-example

32 stars 6 forks source link

Code Can only run with no more than 6 byte of payload ? #5

Closed jjopittaya closed 2 years ago

jjopittaya commented 2 years ago

Hi, I have some problems When I run ESP32-LMIC-DeepSleep-example Code If I set data to send to TTN more than 6 bytes like static uint8_t mydata[] = "12345678"; It will send join request and send uplink only one time then the code stop working properly and stuck at the Packet queued Process

However, if I use data with 6 bytes or less like static uint8_t mydata[] = "123456"; It can work properly without any problem

I wonder what am I doing wrong. I stuck here for so long. Can you help me solve this problem? I use the AS923 band plan but I think this code can work normally because if I sent data less than 6 bytes. It works perfectly.

However, I appreciate your hard work creating this code very much!!

I will post pictures of this problems for you here

11 22

gmanrc commented 2 years ago

I'm experiencing something similar, but not exact. Mine will go to sleep, but with 6 bytes or more it will rejoin a new LoRa session (seqnoUp back to 0) every time it wakes up. Where when less than 6 bytes, it is able to maintain the LoRa session and continue on each cycle after sleep.

gmanrc commented 2 years ago

@jjopittaya what was your solution to this problem?

jjopittaya commented 2 years ago

@gmanrc I just use longer TX_INTERVAL Time (Time wait between sent another packet) then the problem is solved. Not sure why it solved too.