Datasheet

Then you can run the scanner and have it print out the available AP's
or for more detail...
We can connect to the access point with wifi.sta.config and wifi.sta.connect - it will take a second or two to complete
the connection, you can query the module to ask the status with wifi.sta.status() - when you get a 5 it means the
connection is completed and DHCP successful
wifi.setmode(wifi.STATION)
-- print ap list
function listap(t)
for k,v in pairs(t) do
print(k.." : "..v)
end
end
wifi.sta.getap(listap)
-- print ap list
function listap(t)
for ssid,v in pairs(t) do
authmode, rssi, bssid, channel =
string.match(v, "(%d),(-?%d+),(%x%x:%x%x:%x%x:%x%x:%x%x:%x%x),(%d+)")
print(ssid,authmode,rssi,bssid,channel)
end
end
wifi.sta.getap(listap)
© Adafruit Industries https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout Page 26 of 43