yi-hack-Allwinner icon indicating copy to clipboard operation
yi-hack-Allwinner copied to clipboard

Wi-Fi issues (multiple SSID?)

Open andriej opened this issue 2 years ago • 12 comments

I have latest firmware on my cams and strange situation.

In garage and base floor when they were placed - cameras are not connecting to WiFi anymore. They are working as I can hear IR switching on/off depending on light.

When I took them away for debugging - they are connecting with no issues.

Both of cameras are near 2 new APs which are WiFi6/AX (but with WPA2, no WPA3 enabled). They are connecting to 3rd new AP which is also WiFi6/AX (same WPA2 pass). All AP have same SSID and 802.11r turned on.

Has anyone else got same issues? How to avoid it? I did not change SSID or password when migrating from WiFi 5, all other IoTs connect with no issues (no single device have issues except cameras lost).

andriej avatar Oct 17 '22 14:10 andriej

Are you sure thaht 2.4 GHz is enabled?

roleoroleo avatar Oct 17 '22 15:10 roleoroleo

100%, most of my esphome devices run on that network (and only mostly phones and laptop on 5GHz)

andriej avatar Oct 17 '22 16:10 andriej

Never seen anything like this.

roleoroleo avatar Oct 18 '22 06:10 roleoroleo

Do you have any ideas how could I debug this or at least get some more info on what's happening? Except for the AP logs which I will try to gather later

So far on AP I see only this in log on openwrt AP:

Wed Oct 19 10:37:17 2022 daemon.info hostapd: phy1-ap0: STA 38:00:25:xx:xx:xx IEEE 802.11: authenticated
Wed Oct 19 10:37:17 2022 daemon.info hostapd: phy1-ap0: STA 38:00:25:xx:xx:xx IEEE 802.11: associated (aid 4)
Wed Oct 19 10:37:17 2022 daemon.notice hostapd: phy1-ap0: STA-OPMODE-SMPS-MODE-CHANGED 38:00:25:xx:xx:xx off
Wed Oct 19 10:37:26 2022 daemon.info hostapd: phy1-ap0: STA 38:00:25:xx:xx:xx IEEE 802.11: deauthenticated due to local deauth request

andriej avatar Oct 19 '22 08:10 andriej

You should try to increase debug log using "-dd" option. In wifi.sh and wificonnect.sh.

roleoroleo avatar Oct 22 '22 17:10 roleoroleo

Is there any place that BSSID of AP is saved within? I can see from logs that camera tries to connect to the AP that far-far-away instead of the one that is 1 meter away...

andriej avatar Oct 24 '22 13:10 andriej

Is there any place that BSSID of AP is saved within?

Yi saves these configs in a raw flash partition.

CURRENT_SSID=$(dd bs=1 skip=28 count=64 if=/dev/mtdblock6 2>/dev/null)
CURRENT_KEY=$(dd bs=1 skip=92 count=64 if=/dev/mtdblock6 2>/dev/null)

roleoroleo avatar Oct 26 '22 15:10 roleoroleo

Those are SSID and KEY, proper ones. Can't still figure out why it's trying to connect to 'old' BSSID (MAC of AP) instead of the one Yi has next to it

andriej avatar Nov 03 '22 01:11 andriej

AFAIK the cam doesn't save the mac address of the AP. Only SSID and key.

Maybe a wrong channel... Are you using a channel not licensed for your country?

roleoroleo avatar Nov 03 '22 14:11 roleoroleo

Yeah, I couldn't find any place with BSSID encoded too. Definietly not channels issue, as I use 1, 6 and 11 which all are allowed in EU

Really strange one here. :)

andriej avatar Nov 03 '22 17:11 andriej

As I had to repair SD card (not able to upgrade), I've taken some steps after the upgrade to investigate more. Camera was in same room as AP although having only 37% WiFi signal strength. I went to the panel and I can see two networks detected with same SSID.

I've selected the first from the top, saved the password and rebooted camera - it has reconnected to the 'closer' AP.

What I would recommend then is to add BSSID/MAC address of AP near to the SSID name or at least it's signal strength. It would allow to fix that and choose proper network if few with same SSID are detected.

-- Few reboots after: I can see it came back to the weaker signal and 2 reboots later it's back to stronger one. So it didn't change anything... ;)

andriej avatar Feb 21 '23 23:02 andriej

Unfortunately this process is not under my control: Yi manages the wifi connection. And the firmware saves only SSID and password.

roleoroleo avatar Feb 22 '23 08:02 roleoroleo

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Mar 31 '24 17:03 github-actions[bot]