23.05.3 iwinfo scan disconnects AP



  • Can anyone confirm this behavior in OpenWrt 23.05.3:

    When no STA is connected or client is disabled iwinfo radio0 scan causes the AP to disconnect. If a client is connected iwinfo radio0 scan works and AP is stable. Also when using luci and no STA is connected and then using wifi scan the AP disconnects.

    Steps to reproduce the behavior:

    • install onion_omega2p-23.05.3-20250205.bin
    • Connect to Omega Wifi
    • connect over ssh
    • run "iwinfo radio0 scan"
    • WIFI connection gets lost

    An if you can confirm it, why is this happen?
    Thx



  • @DocHardinger Following your steps with omega2 client disabled running iwinfo does not disconnect my computer from the ap.



  • This post is deleted!


  • @crispyoz First image shows stable connection.
    Second after scan is started.
    Checked on my Gaming PC and my Laptop, both Win11. So maybe Windows is the problem as usual šŸ˜‰
    My mobile keeps connected...what is the difference in windows?
    I'm using an Omega2 Pro.

    d0c4c8bf-69ee-4e3c-9340-00211fb05178-image.png

    3fdac073-623e-478a-be37-d0a106f9f393-image.png



  • @DocHardinger My guess is windoze is being less tolerant of timeouts since the wifi device is busy when you scan, looking at the code its not switching channels or power levels or anything. I would try setting the log_level option to 0 or 1 on the wifi-device radio0 in config/wireless. 0 is verbose debug and 1 is debug. This may give a hint as to what is going on.



  • @crispyoz I meanwhile verified that there is no problem in 22.03.5 (http://repo.onioniot.com.s3.amazonaws.com/omega2/images/openwrt-22.03/onion_omega2p-22.03.5-20240517.bin). It seems there has something changed inside the wifi driver? @Lazar-Demin

    Anyway here is my output:

    Thu Mar 13 18:37:55 2025 authpriv.notice dropbear[5155]: Password auth succeeded for 'root' from 192.168.1.101:53107
    Thu Mar 13 18:37:55 2025 daemon.warn odhcpd[2771]: No default route present, overriding ra_lifetime!
    Thu Mar 13 18:37:57 2025 daemon.info dnsmasq[1]: read /etc/hosts - 12 names
    Thu Mar 13 18:37:57 2025 daemon.info dnsmasq[1]: read /tmp/hosts/dhcp.cfg01411c - 2 names
    Thu Mar 13 18:37:57 2025 daemon.info dnsmasq[1]: read /tmp/hosts/odhcpd - 2 names
    Thu Mar 13 18:37:57 2025 daemon.info dnsmasq-dhcp[1]: read /etc/ethers - 0 addresses
    Thu Mar 13 18:37:58 2025 daemon.warn odhcpd[2771]: No default route present, overriding ra_lifetime!
    Thu Mar 13 18:38:03 2025 user.info trm-2.1.3-3[31906]: no enabled station on radio 'radio0'
    

    here i start the scan

    Thu Mar 13 18:38:35 2025 daemon.notice hostapd: ra0: AP-STA-DISCONNECTED 34:7d:f6:c8:4a:ce
    Thu Mar 13 18:38:35 2025 daemon.debug hostapd: ra0: STA 34:7d:f6:c8:4a:ce IEEE 802.11: authentication OK (open system)
    Thu Mar 13 18:38:35 2025 daemon.debug hostapd: ra0: STA 34:7d:f6:c8:4a:ce WPA: event 0 notification
    Thu Mar 13 18:38:35 2025 daemon.debug hostapd: ra0: STA 34:7d:f6:c8:4a:ce MLME: MLME-AUTHENTICATE.indication(34:7d:f6:c8:4a:ce, OPEN_SYSTEM)
    Thu Mar 13 18:38:35 2025 daemon.debug hostapd: ra0: STA 34:7d:f6:c8:4a:ce MLME: MLME-DELETEKEYS.request(34:7d:f6:c8:4a:ce)
    Thu Mar 13 18:38:35 2025 daemon.info hostapd: ra0: STA 34:7d:f6:c8:4a:ce IEEE 802.11: authenticated
    Thu Mar 13 18:38:35 2025 daemon.debug hostapd: ra0: STA 34:7d:f6:c8:4a:ce IEEE 802.11: association OK (aid 1)
    Thu Mar 13 18:38:35 2025 daemon.info hostapd: ra0: STA 34:7d:f6:c8:4a:ce IEEE 802.11: associated (aid 1)
    Thu Mar 13 18:38:35 2025 daemon.debug hostapd: ra0: STA 34:7d:f6:c8:4a:ce MLME: MLME-ASSOCIATE.indication(34:7d:f6:c8:4a:ce)
    Thu Mar 13 18:38:35 2025 daemon.debug hostapd: ra0: STA 34:7d:f6:c8:4a:ce MLME: MLME-DELETEKEYS.request(34:7d:f6:c8:4a:ce)
    Thu Mar 13 18:38:35 2025 daemon.debug hostapd: ra0: STA 34:7d:f6:c8:4a:ce IEEE 802.11: binding station to interface 'ra0'
    Thu Mar 13 18:38:35 2025 daemon.debug hostapd: ra0: STA 34:7d:f6:c8:4a:ce WPA: event 1 notification
    Thu Mar 13 18:38:35 2025 daemon.debug hostapd: ra0: STA 34:7d:f6:c8:4a:ce WPA: sending 1/4 msg of 4-Way Handshake
    Thu Mar 13 18:38:35 2025 daemon.debug hostapd: ra0: STA 34:7d:f6:c8:4a:ce WPA: received EAPOL-Key frame (2/4 Pairwise)
    Thu Mar 13 18:38:35 2025 daemon.debug hostapd: ra0: STA 34:7d:f6:c8:4a:ce WPA: sending 3/4 msg of 4-Way Handshake
    Thu Mar 13 18:38:35 2025 daemon.debug hostapd: ra0: STA 34:7d:f6:c8:4a:ce WPA: received EAPOL-Key frame (4/4 Pairwise)
    Thu Mar 13 18:38:35 2025 daemon.notice hostapd: ra0: AP-STA-CONNECTED 34:7d:f6:c8:4a:ce auth_alg=open
    Thu Mar 13 18:38:35 2025 daemon.debug hostapd: ra0: STA 34:7d:f6:c8:4a:ce IEEE 802.1X: authorizing port
    Thu Mar 13 18:38:35 2025 daemon.info hostapd: ra0: STA 34:7d:f6:c8:4a:ce WPA: pairwise key handshake completed (RSN)
    Thu Mar 13 18:38:35 2025 daemon.info dnsmasq-dhcp[1]: DHCPREQUEST(ra0) 192.168.1.101 34:7d:f6:c8:4a:ce
    Thu Mar 13 18:38:35 2025 daemon.info dnsmasq-dhcp[1]: DHCPACK(ra0) 192.168.1.101 34:7d:f6:c8:4a:ce Master-PC
    Thu Mar 13 18:38:35 2025 daemon.notice hostapd: ra0: EAPOL-4WAY-HS-COMPLETED 34:7d:f6:c8:4a:ce
    Thu Mar 13 18:38:35 2025 daemon.warn odhcpd[2771]: No default route present, overriding ra_lifetime!
    Thu Mar 13 18:38:39 2025 daemon.warn odhcpd[2771]: No default route present, overriding ra_lifetime!
    

    here i reconnect and login to see the log

    Thu Mar 13 18:38:41 2025 authpriv.info dropbear[5187]: Child connection from 192.168.1.101:65003
    Thu Mar 13 18:38:41 2025 authpriv.notice dropbear[5187]: Password auth succeeded for 'root' from 192.168.1.101:65003
    Thu Mar 13 18:38:43 2025 daemon.warn odhcpd[2771]: No default route present, overriding ra_lifetime!
    

    So the thing is if there is a connection to a STA scanning is no problem. So im thinking about creating a dummy wifi interface but without a real connection this is not working. Any ideas on that?


  • administrators

    @DocHardinger said in 23.05.3 iwinfo scan disconnects AP:

    It seems there has something changed inside the wifi driver? @Lazar-Demin

    Yes, there have definitely been changes in the wifi driver between the 22.03 and 23.05 firmware releases:

    We're not as up to date on the internal changes since the new beta firmware uses the open source mt76 driver.
    But since it's open source, the good news is you can investigate this directly and open an issue if needed: https://github.com/openwrt/mt76



  • @DocHardinger In the first instance it would be worth reporting this as a defect with the maintainers of the MT driver.
    I tried it again, this time connecting to the AP with my Android 11 phone, it didn't drop the connection. So I tried on an iPhone 8 I use for testing stuff, it also didn't drop the connection. Tested using my Ubuntu 24.10 it didn't drop the connection.

    I tested all of these using a Dash with my own OpenWrt 23.05.4 on it, then retested each of these devices using Omega2 Pro running onion_omega2p-23.05.3-20250205.bin you referred to above.

    My final test was using another Dash running customised OpenWrt 24.10.0, I only tested on my android phone and Ubuntu 24



  • Hmm strange, i will do some further tests with different systems. Its definitive something inside the driver cause i xan reproduce that 22.03. Is working as expected and 23.05. not.

    Is it hard to build 24.10 with all onion packages? Or will i get isues because of missing packages? Maybe i can try 24.10.



  • @DocHardinger It's a bit of work depending on what packages you are using. I didn't test 24.10 on my windows device yet because it's not with me today. I can try tomorrow afternoon when I'm back at that house.



  • @crispyoz
    Seems these guys have the same problem here https://github.com/openwrt/mt76/issues/953 .
    And they are talking about an fix https://github.com/cmonroe/feed-wifi-master/raw/refs/heads/smartrg-master/mt76/patches/0925-wifi-mt76-do-not-report-ACK-when-TXS-is-lost.patch .

    But im not sure if this also counts for MT7688.

    So when using the onion build tool, is it possible to add this patch there? And should onion add this patch too? @Lazar-Demin



  • @DocHardinger I just checked 23.05.03 and the patch can be applied on both kernel 5.15 and 6.6. So you could also apply it if you are using the openwrt-buildsystem-wrapper. I don't know any way to apply the patch to the image builder, the patch would need to be added to the Onion's CI I guess, I don't use it anymore so I can't check, @Lazar-Demin can response to that. Perhaps let me know how you roll your firmware and we can see how best to apply it to your system. I'll apply the patch to my firmware and see if I can see a difference with windoze.



  • @DocHardinger I patched the driver and re-ran the same tests, I ran 4 tests using my windows 11 machine, only once it disconnected.



  • @crispyoz do you know if there is a docker container with openwrt-buildsystem-wrapper? i think youre using a normal pc with linux? Cause i once used a virtual machine and got a lot of problems when trying to run the openwrt builder.



  • @crispyoz ok once is better than always šŸ˜‰



  • @DocHardinger I built a test firmware for you, so you can test the patch. I put it here it is based on a stock OpenWrt 23.05 with some added packages etc, I ripped out the stuff I'm working on so as not to complicate things for you, but it has the patched mt76 driver so you can see if it fixes your issue. If it does then we can bug @Lazar-Demin to add the patch to the imagebuilder.



  • @crispyoz There seems to be some errors when booting. I run sysupgrade -n yourimage.bin on an Omega2Pro:

    [    7.243364] mmcblk0rpmb: mmc0:0001 DG4008 4.00 MiB, chardev (251:0)
    /etc/preinit: /lib/preinit/90_apply_dt_overlays.rej: line 1: ---: not found
    /etc/preinit: /lib/preinit/90_apply_dt_overlays.rej: line 2: +++: not found
    /etc/preinit: /lib/preinit/90_apply_dt_overlays.rej: line 3: @@: not found
    /etc/preinit: /lib/preinit/90_apply_dt_o[    7.871484] random: procd: uninitialized urandom read (4 bytes read)
    verlays.rej: line 4: +#!/bin/sh: not found
    /etc/preinit: /lib/p[    7.882382] procd: - early -
    reinit/90_apply_[    7.886986] procd: - watchdog -
    dt_overlays.rej: line 5: +: not found
    /etc/preinit: /lib/preinit/90_apply_dt_overlays.rej: line 12: syntax error: unexpected "do" (expecting "}")
    
    

    and also after boot i'm in read only filesystem...I think there is something wrong. I needed to use USb recovery and afterwards tried it again with same result.

    root@(none):~# wifi config > /etc/config/wireless
    -ash: can't create /etc/config/wireless: Read-only file system
    root@(none):~#
    
    


  • @DocHardinger Oops. I made a new one without that issue, it's for the Dash but will work on a Pro but you need to use -F parameter so it can be installed on a Pro:

    sysupgrade -n -F openwrt-23.05.3-ramips-mt76x8-onion_omega2dash-squashfs-sysupgrade.bin
    


  • Ok tested it and problem is the same, keeps disconnecting when scanning on both pc and laptop but stays stable on mobile. Also testing some settings on my wifi adapter on the pc but no luck. Will try to find out why windows keeps disconnecting while android doesnt. I mean it must be something inside the driver because 22.03. is working without problems. I wanna get behind this damn problem šŸ˜‰



  • @DocHardinger I updated the test firmware, try this one.


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.