-->
Page 1 of 1

Get IP and get RSSI at the same time

PostPosted: Tue May 24, 2016 7:13 am
by iburak
Hi everyone
I am trying to get RSSI and get IP form AP. I write this code below but it is not wortking.

[tmr.alarm(0, 1000, 0, function()
wifi.setmode(wifi.STATION)
wifi.sta.config("ssid","password")
ip = wifi.sta.getip()
print(ip)
end )
if ip==nil then
print("again")
else
print(wifi.sta.getap(listap))
function listap(t)
if t then
print("APs:\n")
for k,v in pairs(t) do
l=string.format("%-10s",k)
stringtoarray = {}
index = 1
for value in string.gmatch(v,"%w+") do
stringtoarray [index] = value
index = index + 1
end
print(l,stringtoarray[2])
end

print(#stringtoarray)
else
print("try again")
end
end
end ]

I want to do first the ESP8266 take an IP address then write RSSI and AP but i see different things like on photos in attachments. Can anybody help me?

Re: Get IP and get RSSI at the same time

PostPosted: Thu May 26, 2016 2:53 am
by iburak
I need help. Please give me an idea or suggestion.