Left here for archival purposes.
User avatar
By vado
#49806 Hello.
I have problem with connection to wifi after dsleep.
First time after power reset node connect to wifi. Next time after sleep don't connect to wifi. Node with old firmware (1.4.0) is OK.

my current firmware is:
NodeMCU custom build by frightanic.com
branch: master
commit: cdaf6344457ae427d8c06ac28a645047f9e0f588
SSL: false
modules: adc,bit,crypto,file,gpio,mqtt,net,node,ow,tmr,uart,wifi
build built on: 2016-06-26 13:11
powered by Lua 5.1.4 on SDK 1.5.1(e67da894)

Old functional firmware ( ...but without adc.force_init_mode)
NodeMCU custom build by frightanic.com
branch: master
commit: c8037568571edb5c568c2f8231e4f8ce0683b883
SSL: false
modules: adc,bit,crypto,file,gpio,mqtt,net,node,ow,tmr,uart,wifi
build built on: 2016-04-09 16:33
powered by Lua 5.1.4 on SDK 1.4.0


code is:
Code: Select all wifi.setmode(wifi.STATION)
 wifi.sta.config(sett.ssid,sett.password)
 wifi.sta.connect()

.....
node.dsleep(sett.Period * 60000000 -tmr.now(), 4)


thank you for your help.