Chat about current Lua tools and IDEs

User avatar
By dan121212
#34592 Hi, I'm using firmware dev096. Can someone do a quick test for me... Set wifi to wifi.STATION mode and start wifi.startsmart. When failed, what is the default SSID and Password? I forgot fallback code and tested the wifi.startsmart feature. I don't have my USB to Serial adaptor with me. Need to figure out what's the default SSID and Password after failed startsmart so I can reconnect to the ESP.

code:
wifi.setmode(wifi.STATION)
wifi.startsmart(0,
function(ssid, password)
--do something
end
)

When it fails or reboots, then run:
--Get current Station configuration
ssid, password, bssid_set, bssid=wifi.sta.getconfig()
print("\nCurrent Station configuration:\nSSID : "..ssid
.."\nPassword : "..password
.."\nBSSID_set : "..bssid_set
.."\nBSSID: "..bssid.."\n")


Let me know what the SSID and Password is..

Thanks in advance!
User avatar
By xtal
#34597 tried code , and with several varations
all I could get was

Current Station configuration:
SSID :
Password :
BSSID_set : 0
BSSID: ff:ff:ff:ff:ff:ff

I think something else is missing ! --- yep need SDK 1.4.0 the following code works
My Dev 0.9.6 Float does NOT..

Code: Select allwifi.setmode(wifi.STATION)
 wifi.startsmart(0, function()
        print("Auto config success!")
    end) 
 
ssid, password, bssid_set, bssid=wifi.sta.getconfig()
print("\nCurrent Station configuration:\nSSID : "..ssid
.."\nPassword : "..password
.."\nBSSID_set : "..bssid_set
.."\nBSSID: "..bssid.."\n")

---------------------------------------- SDK 1.4.0 Results -----------------------------------------
Current Station configuration:
SSID : 12345-NETGEAR81
Password : mikeis12345
BSSID_set : 0
BSSID: 04:a1:51:d9:f7:dc

I guess the ssid/password was the last one I used on the ESP  -- it remembers!