Closed fcar12 closed 3 years ago
Nevermind, this is caused by using reset to wakeup the esp32. When I waited for the timer it resumed the session properly. So probably reset is erasing stuff from memory.
After further testing with esp_sleep_enable_ext0_wakeup() and esp_sleep_enable_timer_wakeup() and I'm getting some random behaviours: sometimes the session is restored (few), other it isn't (majority). Any ideas?
Ok, it seems that you have to actually call sendData() in the example in order for the session to be stored and everything work.
Hi,
I was looking at https://github.com/rgot-org/TheThingsNetwork_esp32/issues/8 and I couldn't understand how the session is being stored/restored. When I run the sleep example, after waking up the device (reset) it always performs a network join. Also, it seems that storeSession() and storeFrameCounter() methods are never called, which would avoid this. Shouldn't those methods be called somewhere so the logic in join() would reuse the session and avoid multiple joins? Am I missing something here?
Debug output is always:
cc: @enwi
Cheers