As the title says... Chat on...

User avatar
By DrRob
#31751 Hi,

If I node.dsleep(period, 4), where 4 means "disable RF after deep-sleep wake up", is it possible to re-enable RF later by calling something? I want to keep the RF off while I do some things (reading sensors...), then turn on RF only when I'm ready to send some data, then go back to deep sleep as quickly as possible.

Thanks,
Rob.
User avatar
By DrRob
#31756 Answering my own question!

It seems that if I:

node.dsleep(period, 4)

then when it wakes, node.sta.status() is 0, and then if I call wifi.sta.setip(cfg) and then wifi.sta.connect(), then it works.

I assume that this results in lower power consumption up until calling wifi.sta.connect(), but haven't checked it yet (don't have the right tools to hand).

Rob.