First of all I would like to thank you for all the info I found on this forum.
Recently, I decided to build a firmware with the online builder adding also SSL support as I plan to use it with MQTT.
Here is the problem: the very same script working on the previous firmware without SSL does not work on the new firmware with SSL.
The ESP8266 keeps waiting to get an IP!
Here are all the info from the working firmware:
NodeMCU custom build by frightanic.com
branch: master
commit: 5073c199c01d4d7bbbcd0ae1f761ecc4687f7217
SSL: false
modules: adc,bme280,dht,file,gpio,http,i2c,mqtt,net,node,tmr,uart,wifi
build built on: 2018-03-29 20:22
powered by Lua 5.1.4 on SDK 2.1.0(116b762)
And here are all the info from the not-working firmware (with SSL):
NodeMCU custom build by frightanic.com
branch: master
commit: 67027c0d05f7e8d1b97104e05a3715f6ebc8d07f
SSL: true
modules: adc,bme280,dht,file,gpio,http,i2c,mqtt,net,node,tmr,uart,wifi,tls
build created on 2018-04-14 19:37
powered by Lua 5.1.4 on SDK 2.2.1(cfd48f3)
Finally here is the script:
-- Set WiFi
station_cfg={}
station_cfg.ssid = "MyWiFiSSID"
station_cfg.pwd = "MyWiFiPASSWORD"
wifi.setmode (wifi.STATION)
wifi.setphymode (wifi.PHYMODE_N)
wifi.sta.config (station_cfg)
wifi.sta.connect()
tmr.alarm(1, 1000, 1, function()
if wifi.sta.getip() == nil then
print ("Waiting IP")
else
tmr.stop(1)
print ("Config done, IP is "..wifi.sta.getip())
main_loop()
end
end)
Using the same script, the first firmware gets IP after 3 iteration of the timer...Using the second firmware, ESP8266 keeps waiting...
Any clue?
Thanks to all!