wifi rssi

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
KJM
Posts: 158
Joined: Sun Nov 18, 2018 10:53 pm
Location: Sydney AU

wifi rssi

Post by KJM » Mon Jan 03, 2022 7:43 am

if I do a

Code: Select all

for net in sta.scan(): print (net, sta.status('rssi'))
I get

Code: Select all

(b'', b'\xfa\x8f\xcai\xa9,', 7, -86, 0, 1) 5 -82
If the -82 is the rssi then what does the -86 represent?

davef
Posts: 811
Joined: Thu Apr 30, 2020 1:03 am
Location: Christchurch, NZ

Re: wifi rssi

Post by davef » Mon Jan 03, 2022 8:23 am

I use:

Code: Select all

    rssi = sta_if.status('rssi')
    print (rssi)
Don't know what the other keywords are.

KJM
Posts: 158
Joined: Sun Nov 18, 2018 10:53 pm
Location: Sydney AU

Re: wifi rssi

Post by KJM » Tue Jan 04, 2022 1:25 am

According to https://docs.micropython.org/en/latest/ ... .WLAN.html the return from the .scan is (ssid, bssid, channel, RSSI, authmode, hidden), so -86 on channel 7 in my case. My question is why that does not agree with the -82 from .status('rssi')? Is it -82 for channel 5? If so why is the ESP8266 talking to the router on 2 different channels?

davef
Posts: 811
Joined: Thu Apr 30, 2020 1:03 am
Location: Christchurch, NZ

Re: wifi rssi

Post by davef » Tue Jan 04, 2022 6:03 am

This will need an expert. Meanwhile, maybe STA and AP are both active, try making sta.active(False) or ap.active(False). I have read that there is a STA_AP mode which seems to be used in a ESPNow/WiFi implementation at randomnerdtutorials.com

Post Reply