-->
Page 1 of 1

help: SSID and Password lookup after failed wifi startsmart

PostPosted: Fri Nov 20, 2015 5:50 pm
by dan121212
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!

Re: help: SSID and Password lookup after failed wifi starts

PostPosted: Fri Nov 20, 2015 9:24 pm
by xtal
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!

Re: help: SSID and Password lookup after failed wifi starts

PostPosted: Sat Nov 21, 2015 12:41 am
by dan121212
Thanks for letting me know. Guess I'll need to find a USB to serial to fix it.