Page 1 of 1

Code for checking WiFi strength

Posted: Thu Feb 18, 2021 11:50 pm
by Zim
thanks to cicciocb, this is his code

Code: [Local Link Removed for Guests]

' wifi scanner example
mySSID$ = "mySSID" ' define your SSID here
wifi.scan
while wifi.networks(a$) = -1
wend

NL$ = chr$(10)   ' this means New Line
for z=1 to word.count(a$, NL$)  'browse all the lines
  z$ = word$(a$, z,NL$) 'extract line by line
  s$ = word$(z$, 1, ",") ' extract the SSID (the 1st argument)
  if (s$ = mySSID$) then ' if the SSID is the one we search
    RSSI$ = word$(z$, 3, ",") ' extract the RSSI (the 3rd argument)
    print s$, RSSI$
  end if
 next z


Re: Code for checking WiFi strength

Posted: Fri Feb 19, 2021 4:04 am
by N7QWT
Just a question, Doesn't a WiFi scan cause a disconnect from the AP?

Re: Code for checking WiFi strength

Posted: Fri Feb 19, 2021 7:26 am
by PeterN
There seems to be at least no permanent disconnect as I can send the results of Zim's WIFI search to a wlog without a problem. This shows all visible WIFI SSIDs:

Code: [Local Link Removed for Guests]

' wifi scanner example; shows ALL visible SSIDs

wifi.scan
while wifi.networks(a$) = -1
wend

NL$ = chr$(10)   ' this means New Line
for z=1 to word.count(a$, NL$)  'browse all the lines
  z$ = word$(a$, z,NL$) 'extract line by line
  s$ = word$(z$, 1, ",") ' extract the SSID (the 1st argument)
  RSSI$ = word$(z$, 3, ",") ' extract the RSSID (the 3rd argument)
  print s$, RSSI$
  wlog s$, RSSI$
 next z