MCUs like ESP8266 and ESP32 do not preserve RAM in sleep mode.
Waking up from sleep on these MCUs is similar to a reboot.
In order to make a node initially connect to the TTN network using OTAA and then each time when it wakes up from sleep reconnect to the network using ABP with keys received during the OTAA join (to minimize re-connection time, minimize power usage and to prevent issues with the maximum number of OTAA joins for a node),
What LMIC state (which parameters/variables) must be preserved during sleep (saved before entering sleep and restored when awaking from sleep) to make this work flawlessly?
Is an overview of all required LMIC state variables available somewhere?
Are there any specific actions (e.g. proces/functions calls) required to bring LMIC back to its pre-sleep state?
It would be nice if LMIC would have methods for getting and setting its state as a contiguous block of bytes so that it can be quickly and easily saved to and restored from non-volatile memory (of arbitrary type).