Skip to content

Conversation

@jvonau
Copy link
Contributor

@jvonau jvonau commented Aug 31, 2025

Fixes bug:

should workaround #4077

Description of changes proposed in this pull request:

add networkctl feedback
Skip matching channel and country_code just record detected values.
#4076 (comment)
#4076 (comment)
use nmcli radio wifi on

Smoke-tested on which OS or OS's:

pending

Mention a team member @username e.g. to help with code review:

@jvonau jvonau changed the title Wifi code DRAFT: Wifi code Aug 31, 2025
@holta holta added this to the 8.3 milestone Aug 31, 2025
@jvonau
Copy link
Contributor Author

jvonau commented Aug 31, 2025

#4077 (comment)

@jvonau
Copy link
Contributor Author

jvonau commented Aug 31, 2025

Seems to work.

@jvonau
Copy link
Contributor Author

jvonau commented Sep 1, 2025

Clean wired install on Trixie
https://paste.centos.org/view/7d0dccb8
Toggle network_installed and network_enabled
sudo iiab-network
https://paste.centos.org/view/918a0b4f

@jvonau jvonau changed the title DRAFT: Wifi code Wifi code Sep 1, 2025
@holta
Copy link
Member

holta commented Sep 1, 2025

What OS's are most useful to test here?

Maybe Linux Mint 22.2 and a few others?

@jvonau
Copy link
Contributor Author

jvonau commented Sep 1, 2025

The 'follows NetworkManager' commits removes the WiFi constraints around channel and just use the supplied country_code as it appears that hostapd just follows what NetworkManager has detected to be in use for both. If you are going to test Mint it should be on a hard metal WiFi based install, should be the same as RasPiOS. Ubuntu desktops should tested the same way but should behave the same way as NetworkManager is the backend. Ubuntu server images don't have iw installed and use systemd-network as the backend so those images won't work without setting the WiFi up in netplan first. WiFi installs will need to reboot to have hotspot active due to having no_net_restart set to True

@jvonau
Copy link
Contributor Author

jvonau commented Sep 1, 2025

What OS's are most useful to test here?

The target of the nmcli radio wifi on change is just RasPiOS wired installs as both Stage2 and Stage4 images use NetworkManager as the backend on both but the WiFi is soft-blocked by default.

Screenshot from 2025-08-31 19-39-37

@holta
Copy link
Member

holta commented Sep 1, 2025

Very helpful explanations; Thanks.

I (and others if they can?) will try to help with testing on Monday (tomorrow).

@jvonau
Copy link
Contributor Author

jvonau commented Sep 1, 2025

Being curious I ran raspi-config setting the WiFi country to GB and rebooted
https://paste.centos.org/view/560438ef
Line 1230

COMMAND: /usr/sbin/iw reg get # Detected WiFi country code / legal frequencies
global
country US: DFS-FCC
(902 - 904 @ 2), (N/A, 30), (N/A)
(904 - 920 @ 16), (N/A, 30), (N/A)
(920 - 928 @ 8), (N/A, 30), (N/A)
(2400 - 2472 @ 40), (N/A, 30), (N/A)
(5150 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
(5250 - 5350 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
(5470 - 5730 @ 160), (N/A, 24), (0 ms), DFS
(5730 - 5850 @ 80), (N/A, 30), (N/A), AUTO-BW
(5850 - 5895 @ 40), (N/A, 27), (N/A), NO-OUTDOOR, AUTO-BW, PASSIVE-SCAN
(5925 - 7125 @ 320), (N/A, 12), (N/A), NO-OUTDOOR, PASSIVE-SCAN
(57240 - 71000 @ 2160), (N/A, 40), (N/A)
phy#0
country 99: DFS-UNSET
(2402 - 2482 @ 40), (6, 20), (N/A)
(2474 - 2494 @ 20), (6, 20), (N/A)
(5140 - 5360 @ 160), (6, 20), (N/A)
(5460 - 5860 @ 160), (6, 20), (N/A)

Line 1488

Sep 01 08:14:24 pi500 hostapd[791]: ap0: interface state UNINITIALIZED->COUNTRY_UPDATE

Line 1898

cmdline.txt has cfg80211.ieee80211_regdom=GB

The morel of the story is testing over the years has shown the order from greatest to least is NetworkManager, hostapd, cmdline for WiFi Regulatory Domain Codes priority.

@jvonau
Copy link
Contributor Author

jvonau commented Sep 1, 2025

4: ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br0 state UP group default qlen 1000
link/ether 02:af:6c:1d:f4:df brd ff:ff:ff:ff:ff:ff permaddr 2e:cf:67:68:1c:4a
inet6 fe80::af:6cff:fe1d:f4df/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever

ecbaa88

4: ap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br0 state UP group default qlen 1000
link/ether 02:af:6c:1d:f4:df brd ff:ff:ff:ff:ff:ff permaddr 2e:cf:67:68:1c:4a

https://github.com/iiab/iiab/blob/master/roles/network/tasks/install.yml#L74 is ineffective in disabling ipv6

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 2c:cf:67:c8:1c:49 brd ff:ff:ff:ff:ff:ff
inet 10.0.0.35/24 brd 10.0.0.255 scope global dynamic noprefixroute eth0
valid_lft 172772sec preferred_lft 172772sec
inet6 2604:3d09:a57a:e000::a760/128 scope global dynamic noprefixroute
valid_lft 172774sec preferred_lft 172774sec
inet6 2604:3d09:a57a:e000:8d24:1a43:a40c:719/64 scope global dynamic noprefixroute
valid_lft 299sec preferred_lft 299sec
inet6 fe80::8f1b:16fe:8469:c257/64 scope link noprefixroute

@holta
Copy link
Member

holta commented Sep 1, 2025

https://github.com/iiab/iiab/blob/master/roles/network/tasks/install.yml#L74 is ineffective in disabling ipv6

Some OS's / kernels changing maybe?

(Just FWIW 8 days ago I was working with an individual whose IPv6 was successfully disabled by IIAB as he watched the IIAB install proceed... but that was a "Trisquelized" version of Ubuntu Server 24.04 LTS.)

@jvonau
Copy link
Contributor Author

jvonau commented Sep 2, 2025

Hope he didn't lose internet access, lol Whatever, kernel_LL on ap0 is the wrong thing to do, should be a dummy under br0, period.

@holta
Copy link
Member

holta commented Sep 3, 2025

If you are going to test Mint it should be on a hard metal WiFi based install, should be the same as RasPiOS.

This PR (#4078) on Linux Mint 22.2 result — iiab-diagnostics: https://paste.centos.org/view/8a60bcff (does that help confirm assumptions?)

And I can test Ubuntu Desktop 24.04 (or Ubuntu Desktop 25.10) next in coming hours if that helps.

@jvonau
Copy link
Contributor Author

jvonau commented Sep 3, 2025

If you are going to test Mint it should be on a hard metal WiFi based install, should be the same as RasPiOS.

This PR (#4078) on Linux Mint 22.2 result — iiab-diagnostics: https://paste.centos.org/view/8a60bcff (does that help confirm assumptions?)

And I can test Ubuntu Desktop 24.04 (or Ubuntu Desktop 25.10) next in coming hours if that helps.

Well that was a wired install, looks fine, does it work ok? I did ask for a wifi install but this is a start...

@holta
Copy link
Member

holta commented Sep 3, 2025

Well that was a wired install, looks fine, does it work ok?

Looks fine: connecting to hotspot works fine, prior to and after reboot.

I did ask for a wifi install but this is a start...

Ok. On a completely new install of Mint 22.2 Beta, with IIAB installed over WiFi, the final result (below) isn't perfect — but perhaps tolerable ?

  1. WiFi client could not connect to IIAB's hotspot prior to reboot — perhaps this is completely normal for WiFi installs of IIAB? Output of systemctl status hostapd was:
○ hostapd.service - Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
     Loaded: loaded (/etc/systemd/system/hostapd.service; enabled; preset: enabled)
     Active: inactive (dead)

Sep 03 02:52:07 box systemd[1]: hostapd.service - Access point and authentication server for Wi-Fi and Ethernet was skipped because of an unmet condition check (ConditionFileNotEmpty=/etc/hostapd/hostapd.conf).
  1. ...until after IIAB reboot, whereupon IIAB's hotspot worked — i.e. student WiFi client devices can connect to IIAB's hotspot, and browse to its http://10.10.10.10
  2. iiab-diagnostics: https://paste.centos.org/view/979e3e7c
  3. Linux Mint was (and is) however unable to "ping mit.edu" — even after after running iiab-hotspot-off then clicking Linux Mint's graphical widget in the bottom-right of its desktop (it had remembered the home's SSID password from earlier, temporarily allowing "ping mit.edu" to work), and then running iiab-hotspot-on then rebooting. RECAP: Upon reboot, WiFi client devices can once again connect to IIAB, but IIAB still can't "ping mit.edu" (i.e. no dice with simultaneous upstream WiFi).
  4. Linux Mint beeps and shows this message about every minute: (for the first 5 minutes after each boot)
image
  1. Is it possible the Wi-Fi firmware for this ThinkPad T14 gen 1 just doesn't support AP+STA mode? Even despite "* managed" and "* AP" being listed in the output of iw list ?
  2. Would it be useful for me to do another Linux Mint 22.2 install (on ThinkPad T14 bare metal) with wifi_up_down: False ? (Or any other test(s) that would be more useful?) Given that Linux Mint is extremely popular in quite a number of schools in many low-income countries.
    • Or, I could test this PR (or others?) with Ubuntu Desktop 25.10 next, if that's more immediately useful.

@jvonau
Copy link
Contributor Author

jvonau commented Sep 3, 2025

Well that was a wired install, looks fine, does it work ok?

Looks fine: connecting to hotspot works fine, prior to and after reboot.

Good.

I did ask for a wifi install but this is a start...

Ok. On a completely new install of Mint 22.2 Beta, with IIAB installed over WiFi, the final result (below) isn't perfect — but perhaps tolerable ?

1. WiFi client could not connect to IIAB's hotspot prior to reboot — perhaps this is completely normal for WiFi installs of IIAB?  Output of `systemctl status hostapd` was:
○ hostapd.service - Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
     Loaded: loaded (/etc/systemd/system/hostapd.service; enabled; preset: enabled)
     Active: inactive (dead)

Sep 03 02:52:07 box systemd[1]: hostapd.service - Access point and authentication server for Wi-Fi and Ethernet was skipped because of an unmet condition check (ConditionFileNotEmpty=/etc/hostapd/hostapd.conf).
2. ...until after IIAB reboot, whereupon IIAB's hotspot worked — i.e. student WiFi client devices can connect to IIAB's hotspot, and browse to its http://10.10.10.10

3. iiab-diagnostics: https://paste.centos.org/view/979e3e7c

By design #3886
no_net_restart = True

4. Linux Mint was (and is) however unable to "ping mit.edu" — even after after running `iiab-hotspot-off` then clicking Linux Mint's graphical widget in the bottom-right of its desktop (it had remembered the home's SSID password from earlier, temporarily allowing "ping mit.edu" to work), and then running `iiab-hotspot-on` then rebooting.  RECAP: Upon reboot, WiFi client devices can once again connect to IIAB, but IIAB still can't "ping mit.edu" (i.e. no dice with simultaneous upstream WiFi).

5. Linux Mint beeps and shows this message about every minute: (for the first 5 minutes after each boot)

Change in Netplan perhaps? Looks like the installer wrote the netplan file. Might want to try sudo netplan apply at this point and report back.

snip
6. Is it possible the Wi-Fi firmware for this ThinkPad T14 gen 1 just doesn't support AP+STA mode? Even despite "* managed" and "* AP" being listed in the output of iw list ?

Maybe

7. Would it be useful for me to do another Linux Mint 22.2 install (on ThinkPad T14 bare metal) with `wifi_up_down: False` ?  (Or any other test(s) that would be more useful?)  Given that Linux Mint is extremely popular in quite a number of schools in many low-income countries.

Can't hurt but iiab-hotspot-on and disabling netplan's wifi stanza would need to be preformed.

   * Or, I could test this PR (or others?) with Ubuntu Desktop 25.10 next, if that's more immediately useful.

Give it a go more info the better.

@holta
Copy link
Member

holta commented Sep 3, 2025

Change in Netplan perhaps? Looks like the installer wrote the netplan file. Might want to try sudo netplan apply at this point and report back.

a. On the existing https://paste.centos.org/view/979e3e7c (IIAB installed over WiFi) I tried netplan apply
b. 'ping mit.edu' and 'ping 1.1.1.1' still do not work.
c. IIAB (ThinkPad T14 laptop) then rebooted.
d. 'ping mit.edu' and 'ping 1.1.1.1' still do not work. PS IIAB's hotspot continues to work fine.

➡️ Would a fresh install of Linux Mint somehow be useful, to run netplan apply earlier on? (I suspect not, but advise me of any recommendation...)

useful for me to do another Linux Mint 22.2 install (on ThinkPad T14 bare metal) with wifi_up_down: False ?

Can't hurt but iiab-hotspot-on and disabling netplan's wifi stanza would need to be [performed].

➡️ I can do that. Is a WiFi install or Ethernet install of IIAB most useful?

And Clarify If Possible: if a netplan file appears in /etc/netplan that looks roughly like 90-NM-a3100392-2aa6-47f5-b293-d3e227b4ce9a.yaml — which lines should be commented out or removed? (Almost all of the file's 25 lines [i.e. Lines 845-869 from iiab-diagnostics pasted in below] appear to be about connecting to the home's wifi — so should I maybe just move this entire 90-NM-...ce9a.yml file aside?)

image

test this PR (or others?) with Ubuntu Desktop 25.10

Give it a go more info the better.

➡️ Ok. I'll do that afterwards. And I can adjust towards testing anything you recommend.

@jvonau
Copy link
Contributor Author

jvonau commented Sep 3, 2025

4. Linux Mint was (and is) however unable to "ping mit.edu" — even after after running `iiab-hotspot-off` then clicking Linux Mint's graphical widget in the bottom-right of its desktop (it had remembered the home's SSID password from earlier, temporarily allowing "ping mit.edu" to work), and then running `iiab-hotspot-on` then rebooting.  RECAP: Upon reboot, WiFi client devices can once again connect to IIAB, but IIAB still can't "ping mit.edu" (i.e. no dice with simultaneous upstream WiFi).

client_wifi_channel_found = 9
ssid=unittest
channel=6

Lets back up a second sudo iiab-hotspot-off then get ping to work as above and reboot then post sudo iw dev sudo iiab-test-wifi

This is new/different

phy#0 (self-managed)
country US: DFS-UNSET

@jvonau
Copy link
Contributor Author

jvonau commented Sep 4, 2025

useful for me to do another Linux Mint 22.2 install (on ThinkPad T14 bare metal) with wifi_up_down: False ?

Can't hurt but iiab-hotspot-on and disabling netplan's wifi stanza would need to be [performed].

➡️ I can do that. Is a WiFi install or Ethernet install of IIAB most useful?

Given that wifi_up_down: False is not usually tested I'd say both, the desktop might try to scan for available WiFi's despite having a WiFi device not being managed by NetworkManager.

Sep 03 03:02:39 box NetworkManager[924]: [1756882959.1189] manager: (lo): new Loopback device (/org/freedesktop/NetworkManager/Devices/1)
Sep 03 03:02:39 box NetworkManager[924]: [1756882959.1210] manager: (br0): new Bridge device (/org/freedesktop/NetworkManager/Devices/2)
Sep 03 03:02:39 box NetworkManager[924]: [1756882959.1233] manager: (enp0s31f6): new Ethernet device (/org/freedesktop/NetworkManager/Devices/3)
ep 03 03:02:39 box NetworkManager[924]: [1756882959.3038] manager: (wlp0s20f3): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/4)
Sep 03 03:02:39 box NetworkManager[924]: [1756882959.3076] manager: (ap0): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/5)
Sep 03 03:02:39 box NetworkManager[924]: [1756882959.4331] manager: (p2p-dev-wlp0s20f3): new 802.11 Wi-Fi P2P device (/org/freedesktop/NetworkManager/Devices/6)
Sep 03 03:02:39 box NetworkManager[924]: [1756882959.5535] manager: (tailscale0): new Tun device (/org/freedesktop/NetworkManager/Devices/7)
Sep 03 03:02:49 box NetworkManager[924]: [1756882969.4863] device (wlp0s20f3): Activation: (wifi) connection 'Auto magoun' has security, and secrets exist. No new secrets needed.
Sep 03 03:02:49 box NetworkManager[924]: [1756882969.4864] Config: added 'ssid' value 'magoun'
Sep 03 03:02:49 box NetworkManager[924]: [1756882969.4864] Config: added 'scan_ssid' value '1'
Sep 03 03:02:49 box NetworkManager[924]: [1756882969.4864] Config: added 'bgscan' value 'simple:30:-70:86400'
Sep 03 03:02:49 box NetworkManager[924]: [1756882969.4864] Config: added 'key_mgmt' value 'WPA-PSK WPA-PSK-SHA256 FT-PSK SAE FT-SAE'
Sep 03 03:02:49 box NetworkManager[924]: [1756882969.4864] Config: added 'auth_alg' value 'OPEN'
Sep 03 03:02:49 box NetworkManager[924]: [1756882969.4864] Config: added 'psk' value ''
Sep 03 03:02:49 box NetworkManager[924]: [1756882969.6025] device (wlp0s20f3): supplicant interface state: disconnected -> scanning
Sep 03 03:02:49 box NetworkManager[924]: [1756882969.6026] device (p2p-dev-wlp0s20f3): supplicant management interface state: disconnected -> scanning
Sep 03 03:02:59 box NetworkManager[924]: [1756882979.6172] device (wlp0s20f3): supplicant interface state: scanning -> disconnected

Note for below

Sep 03 03:02:38 box systemd[1]: Started wpa_supplicant.service - WPA supplicant.
Sep 03 03:02:39 box wpa_supplicant[915]: nl80211: kernel reports: Match already configured
Sep 03 03:02:39 box wpa_supplicant[915]: nl80211: Could not configure driver mode
Sep 03 03:02:39 box wpa_supplicant[915]: nl80211: deinit ifname=ap0 disabled_11b_rates=0
Sep 03 03:02:39 box wpa_supplicant[915]: ioctl[SIOCSIWPMKSA]: Invalid argument
Sep 03 03:02:39 box wpa_supplicant[915]: ioctl[SIOCSIWMODE]: Device or resource busy
Sep 03 03:02:39 box wpa_supplicant[915]: ioctl[SIOCSIWENCODEEXT]: Operation not supported
Sep 03 03:02:39 box wpa_supplicant[915]: ioctl[SIOCSIWENCODE]: Operation not supported
Sep 03 03:02:39 box wpa_supplicant[915]: ioctl[SIOCSIWENCODEEXT]: Operation not supported
Sep 03 03:02:39 box wpa_supplicant[915]: ioctl[SIOCSIWENCODE]: Operation not supported
Sep 03 03:02:39 box wpa_supplicant[915]: ioctl[SIOCSIWENCODEEXT]: Operation not supported
Sep 03 03:02:39 box wpa_supplicant[915]: ioctl[SIOCSIWENCODE]: Operation not supported
Sep 03 03:02:39 box wpa_supplicant[915]: ioctl[SIOCSIWENCODEEXT]: Operation not supported
Sep 03 03:02:39 box wpa_supplicant[915]: ioctl[SIOCSIWENCODE]: Operation not supported
Sep 03 03:02:39 box wpa_supplicant[915]: ioctl[SIOCSIWENCODEEXT]: Operation not supported
Sep 03 03:02:39 box wpa_supplicant[915]: ioctl[SIOCSIWENCODE]: Operation not supported
Sep 03 03:02:39 box wpa_supplicant[915]: ioctl[SIOCSIWENCODEEXT]: Operation not supported
Sep 03 03:02:39 box wpa_supplicant[915]: ioctl[SIOCSIWENCODE]: Operation not supported
Sep 03 03:02:39 box wpa_supplicant[915]: ioctl[SIOCSIWPMKSA]: Invalid argument
Sep 03 03:02:49 box wpa_supplicant[915]: ioctl[SIOCSIWSCAN]: Operation not supported
Sep 03 03:02:49 box wpa_supplicant[915]: ap0: CTRL-EVENT-SCAN-FAILED ret=-1
Sep 03 03:02:49 box wpa_supplicant[915]: ioctl[SIOCSIWSCAN]: Operation not supported
Sep 03 03:02:49 box wpa_supplicant[915]: ap0: CTRL-EVENT-SCAN-FAILED ret=-1
Sep 03 03:02:49 box wpa_supplicant[915]: ioctl[SIOCSIWSCAN]: Operation not supported
Sep 03 03:02:49 box wpa_supplicant[915]: ap0: CTRL-EVENT-SCAN-FAILED ret=-1
Sep 03 03:02:49 box wpa_supplicant[915]: wlp0s20f3: WPS-CANCEL
Sep 03 03:02:49 box wpa_supplicant[915]: wlp0s20f3: SME: Trying to authenticate with 8c:90:2d:21:34:1e (SSID='magoun' freq=2452 MHz)
Sep 03 03:02:49 box wpa_supplicant[915]: wlp0s20f3: SME: Authentication request to the driver failed

This is where NM gave up (scanning -> disconnected) but the desktop continues scanning

Sep 03 03:02:54 box iiab-test-wifi[1051]: Couldn't find an UPSTREAM SSID in files like wpa_supplicant.conf -- so exiting.
Sep 03 03:02:59 box wpa_supplicant[915]: ioctl[SIOCGIWSCAN]: Resource temporarily unavailable
Sep 03 03:02:59 box wpa_supplicant[915]: wlp0s20f3: SME: Trying to authenticate with 8c:90:2d:21:34:1e (SSID='magoun' freq=2452 MHz)
Sep 03 03:02:59 box wpa_supplicant[915]: wlp0s20f3: SME: Authentication request to the driver failed
Sep 03 03:02:59 box wpa_supplicant[915]: BSSID 8c:90:2d:21:34:1e ignore list count incremented to 2, ignoring for 10 seconds
Sep 03 03:02:59 box wpa_supplicant[915]: ioctl[SIOCSIWSCAN]: Operation not supported
Sep 03 03:02:59 box wpa_supplicant[915]: ap0: CTRL-EVENT-SCAN-FAILED ret=-1
Sep 03 03:03:09 box wpa_supplicant[915]: wlp0s20f3: CTRL-EVENT-REGDOM-CHANGE init=DRIVER type=COUNTRY alpha2=US
Sep 03 03:03:09 box wpa_supplicant[915]: wlp0s20f3: SME: Trying to authenticate with 8c:90:2d:21:34:1e (SSID='magoun' freq=2452 MHz)
Sep 03 03:03:09 box wpa_supplicant[915]: wlp0s20f3: SME: Authentication request to the driver failed
Sep 03 03:03:09 box wpa_supplicant[915]: ioctl[SIOCSIWSCAN]: Operation not supported
Sep 03 03:03:09 box wpa_supplicant[915]: ap0: CTRL-EVENT-SCAN-FAILED ret=-1
Sep 03 03:03:13 box wpa_supplicant[915]: wlp0s20f3: SME: Trying to authenticate with 8c:90:2d:21:34:1e (SSID='magoun' freq=2452 MHz)
Sep 03 03:03:13 box wpa_supplicant[915]: wlp0s20f3: SME: Authentication request to the driver failed
Sep 03 03:03:13 box wpa_supplicant[915]: wlp0s20f3: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="magoun" auth_failures=1 duration=10 reason=CONN_FAILED

Sep 03 03:04:07 box wpa_supplicant[915]: ioctl[SIOCSIWSCAN]: Operation not supported
Sep 03 03:04:07 box wpa_supplicant[915]: ap0: CTRL-EVENT-SCAN-FAILED ret=-1
Sep 03 03:04:13 box wpa_supplicant[915]: wlp0s20f3: WPS-CANCEL
Sep 03 03:04:13 box wpa_supplicant[915]: wlp0s20f3: SME: Trying to authenticate with 8c:90:2d:21:34:1e (SSID='magoun' freq=2452 MHz)
Sep 03 03:04:13 box wpa_supplicant[915]: wlp0s20f3: SME: Authentication request to the driver failed
Sep 03 03:04:13 box wpa_supplicant[915]: wlp0s20f3: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="magoun" auth_failures=1 duration=10 reason=CONN_FAILED
Sep 03 03:04:26 box wpa_supplicant[915]: wlp0s20f3: CTRL-EVENT-SSID-REENABLED id=0 ssid="magoun"
Sep 03 03:04:26 box wpa_supplicant[915]: wlp0s20f3: SME: Trying to authenticate with 8c:90:2d:21:34:1e (SSID='magoun' freq=2452 MHz)
Sep 03 03:04:26 box wpa_supplicant[915]: wlp0s20f3: SME: Authentication request to the driver failed
Sep 03 03:04:26 box wpa_supplicant[915]: BSSID 8c:90:2d:21:34:1e ignore list count incremented to 2, ignoring for 10 seconds
Sep 03 03:04:26 box wpa_supplicant[915]: wlp0s20f3: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="magoun" auth_failures=2 duration=20 reason=CONN_FAILED
Sep 03 03:04:38 box wpa_supplicant[915]: wlp0s20f3: Reject scan trigger since one is already pending
Sep 03 03:04:50 box wpa_supplicant[915]: ioctl[SIOCSIWSCAN]: Operation not supported
Sep 03 03:04:50 box wpa_supplicant[915]: ap0: CTRL-EVENT-SCAN-FAILED ret=-1
Sep 03 03:05:54 box wpa_supplicant[915]: ioctl[SIOCSIWSCAN]: Operation not supported
Sep 03 03:05:54 box wpa_supplicant[915]: ap0: CTRL-EVENT-SCAN-FAILED ret=-1
Sep 03 03:07:29 box wpa_supplicant[915]: ioctl[SIOCSIWSCAN]: Operation not supported
Sep 03 03:07:29 box wpa_supplicant[915]: ap0: CTRL-EVENT-SCAN-FAILED ret=-1

And Clarify If Possible: if a netplan file appears in /etc/netplan that looks roughly like 90-NM-a3100392-2aa6-47f5-b293-d3e227b4ce9a.yaml — which lines should be commented out or removed? (Almost all of the file's 25 lines [i.e. Lines 845-869 from iiab-diagnostics pasted in below] appear to be about connecting to the home's wifi — so should I maybe just move this entire 90-NM-...ce9a.yml file aside?)

I'd just move it for now, with an eye to see the result #4039

@holta
Copy link
Member

holta commented Sep 4, 2025

Lets back up a second sudo iiab-hotspot-off then get ping to work as above and reboot then post sudo iw dev sudo iiab-test-wifi

Done: results below... again on that original WiFi-installed IIAB on Mint 22.2:

root@box:~# iw dev
phy#0
	Unnamed/non-netdev interface
		wdev 0x2
		addr bc:54:2f:a6:60:fe
		type P2P-device
	Interface wlp0s20f3
		ifindex 3
		wdev 0x1
		addr bc:54:2f:a6:60:fd
		ssid magoun
		type managed
		channel 9 (2452 MHz), width: 20 MHz, center1: 2452 MHz
		txpower 22.00 dBm
		multicast TXQ:
			qsz-byt	qsz-pkt	flows	drops	marks	overlmt	hashcol	tx-bytes	tx-packets
			0	0	0	0	0	0	0	0		0

root@box:~# iiab-test-wifi
iiab-test-wifi called
running pid 2627
NetworkManager
ssid is magoun
frequency is 2452 for magoun
Using 2452 for magoun
channel is 9 for magoun
Hostapd set for 6
Editing Hostapd for channel 9
Restarted hostapd

root@box:~# 

(Just FYI the iiab-test-wifi command took ~27 seconds to run... which appears completely normal... hope this helps.)

@holta
Copy link
Member

holta commented Sep 9, 2025

What is the result of cat /var/run/NetworkManager/no-stub-resolv.conf

FWIW there is no /var/run/NetworkManager

(And there is no no-stub-resolv.conf — according to the results of the 'updatedb' then 'locate no-stub-resolv.conf' commands.)

@jvonau
Copy link
Contributor Author

jvonau commented Sep 9, 2025

What is the result of cat /var/run/NetworkManager/no-stub-resolv.conf

FWIW there is no /var/run/NetworkManager

(And there is no no-stub-resolv.conf — according to the results of the 'updatedb' then 'locate no-stub-resolv.conf' commands.)

Think the /run directory is excluded from 'updatedb'. Right, NM isn't running. How about cat /run/systemd/resolve/resolv.conf, there should be entries under /run/systemd/resolve/netif/ if each upstream connection but you need sudo to view them.

@holta
Copy link
Member

holta commented Sep 9, 2025

root@box:~# cat /run/systemd/resolve/resolv.conf
# This is /run/systemd/resolve/resolv.conf managed by man:systemd-resolved(8).
# Do not edit.
#
# This file might be symlinked as /etc/resolv.conf. If you're looking at
# /etc/resolv.conf and seeing this text, you have followed the symlink.
#
# This is a dynamic resolv.conf file for connecting local clients directly to
# all known uplink DNS servers. This file lists all configured search domains.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 192.168.0.1
search lan
root@box:/run/systemd/resolve/netif# ls -l
total 4
-rw-r--r-- 1 systemd-resolve systemd-resolve 97 Sep  8 23:03 6

root@box:/run/systemd/resolve/netif# cat 6
# This is private data. Do not parse.
LLMNR=no
MDNS=no
DNSSEC=no
DNSOVERTLS=no
DEFAULT_ROUTE=yes

@holta
Copy link
Member

holta commented Sep 9, 2025

Just FYI I'd like to wipe the ThinkPad T14 very soon — e.g. to reconfirm this PR with testing on fresh installs of the most common OS's (Linux distros). And a couple RPi tests would be wise too no doubt (:

@holta
Copy link
Member

holta commented Sep 9, 2025

Probably not worth worrying about — but just FYI systemctl status dnsmasq after apt updates were applied to Ubuntu Server 25.10:

10~3

And then it's more "back to normal" after reboot:

11

@holta
Copy link
Member

holta commented Sep 10, 2025

Fresh install test of this PR (#4078) on a new WiFi-install on the very latest pre-release of Ubuntu Desktop 25.10 -- looks good here with "Dual WiFi" (AP+STA mode):

iiab-diagnostics: https://paste.centos.org/view/fb6b0669

@jvonau
Copy link
Contributor Author

jvonau commented Sep 10, 2025

iiab-diagnostics after reboot correct? Looks pretty good from here.

@holta
Copy link
Member

holta commented Sep 10, 2025

iiab-diagnostics after reboot correct?

Yes.

PS I'll try to test another OS or two later this evening. [make that Thur evening, tonight]

@holta
Copy link
Member

holta commented Sep 12, 2025

Quick tests of this PR on Linux Mint 22.2 all look good, FYI.

@holta
Copy link
Member

holta commented Sep 13, 2025

Quick test of this PR on RasPiOS 12 (Bookworm) with desktop... on RPi 500... looks good:

"PR4078--WiFi-installed--AP+STA-mode--RasPiOS-12-Desktop"
https://paste.centos.org/view/e13c1db7

@holta
Copy link
Member

holta commented Sep 13, 2025

Quick test of this PR on RasPiOS 13 (Trixie) with desktop... on RPi 500... looks good:

"PR4078--WiFi-installed--AP+STA-mode--RasPiOS-13-Desktop"
https://paste.centos.org/view/cd2310fa

@holta
Copy link
Member

holta commented Sep 13, 2025

@jvonau

Any idea why "Dual WiFi" (AP+STA Mode) is not working on Debian 13 "Trixie" on x86_64 below? This might not be the most important OS/distro among IIAB implementers, but FWIW:

  • The output of ip a unexpectedly indicates that WiFi interface wlp0s20f3 is DOWN instead of UP.
  • The "Dual WiFi" (AP+STA Mode) capability works on the very same laptop, with other OS's like Ubuntu & Mint.
  • Doesn't seem like a WiFi firmware issue, but just in case...
root@box:~# dmesg | grep iwlwifi
[    4.736894] iwlwifi 0000:00:14.3: enabling device (0000 -> 0002)
[    4.738966] iwlwifi 0000:00:14.3: Detected crf-id 0x3617, cnv-id 0x20000302 wfpm id 0x80000000
[    4.738987] iwlwifi 0000:00:14.3: PCI dev 02f0/0070, rev=0x351, rfid=0x10a100
[    4.738990] iwlwifi 0000:00:14.3: Detected Intel(R) Wi-Fi 6 AX201 160MHz
[    4.749933] iwlwifi 0000:00:14.3: TLV_FW_FSEQ_VERSION: FSEQ Version: 89.3.35.37
[    4.750225] iwlwifi 0000:00:14.3: firmware: failed to load iwl-debug-yoyo.bin (-2)
[    4.750233] iwlwifi 0000:00:14.3: firmware: failed to load iwl-debug-yoyo.bin (-2)
[    4.750239] iwlwifi 0000:00:14.3: firmware: failed to load iwl-debug-yoyo.bin (-2)
[    4.750241] iwlwifi 0000:00:14.3: loaded firmware version 77.2753b721.0 QuZ-a0-hr-b0-77.ucode op_mode iwlmvm
[    5.316447] iwlwifi 0000:00:14.3: Detected RF HR B3, rfid=0x10a100
[    5.400977] iwlwifi 0000:00:14.3: base HW address: bc:54:2f:a6:60:fd
[    5.452525] iwlwifi 0000:00:14.3 wlp0s20f3: renamed from wlan0
[    6.130611] iwlwifi 0000:00:14.3: Registered PHC clock: iwlwifi-PTP, with index: 1
[    6.658138] iwlwifi 0000:00:14.3 ap0: entered allmulticast mode
[    6.658203] iwlwifi 0000:00:14.3 ap0: entered promiscuous mode

iiab-diagnostics after several reboots: (Ethernet cable inserted right afterwards, to create this pastebin...)
https://paste.centos.org/view/97427bc2

@jvonau
Copy link
Contributor Author

jvonau commented Sep 13, 2025

Given I don't see the usual channel 9 embedded within hostapd.conf when connected to your AP while installing, I suggest the workaround you used before

@holta
Copy link
Member

holta commented Sep 13, 2025

I suggest the workaround you used #4078 (comment)

Thanks: I finally got it to work, great. Earlier I'd overlooked a step. So I should write down the steps for everyone -- presumably in the order below? (Here is a DRAFT 'How do i turn on "Dual WiFi" a.k.a. "AP+STA Mode" ?' for https://FAQ.IIAB.IO ...)

WARNING: Not all WiFi firmware supports "Dual WiFi" a.k.a. "AP+STA Mode", and WiFi performance can sometimes be severely degraded even when it is working. But if you want to give it a shot, here are 9 suggested step:

  1. On your IIAB, run iw list and look at the output. If see * AP and * managed (each on their own line), then there's a good shot it will work. (Similar to: "Can I create a Wi-Fi hotspot using an old laptop?")
  2. Verify that your IIAB's /etc/iiab/local_vars.yml contains wifi_up_down: true
  3. Run: sudo iiab-hotspot-off
  4. Confirm IIAB is connected to your home's WiFi Internet (e.g. use your IIAB OS's graphical desktop widget, or equivalent). Test it by running: ping mit.edu
  5. OPTIONAL: Run iw dev just to be aware of your upstream WiFi channel.
  6. Run: sudo iiab-test-wifi (to align channels for "Dual WiFi" a.k.a. AP+STA Mode; this takes about 30 seconds, but is much faster than running iiab-network !)
  7. Run: sudo iiab-hotspot-on
  8. Run: sudo reboot
  9. Try to confirm that both are working:
    • Test your IIAB's upstream WiFi by running: ping mit.edu
    • Test your IIAB's downstream WiFi by running: systemctl status hostapd -- and with actual, functional tests using WiFi-capable "student devices".

ASIDE: Ubuntu 25.10 ISOs are a real mess in recent days (recent dailies completely fail to install) so I'm glad I got that pre-release testing done last week -- and I'll look at that OS again later in September &/or October.

@holta
Copy link
Member

holta commented Sep 13, 2025

Here is a DRAFT

Cleaned up & posted:

(If something's explained very poorly, please LMK!)

@holta
Copy link
Member

holta commented Sep 13, 2025

Let's give this PR a shot, as it's now been tested in many different scenarios.

I'd like to merge it (or very similar) overnight if there are no objections?

@holta
Copy link
Member

holta commented Sep 14, 2025

Either way, I'll merge this PR in coming hours:

➡️ Thanks to @jvonau for making it happen! ⬅️

@holta
Copy link
Member

holta commented Sep 14, 2025

Good suggestions above thanks to @jvonau for linting + cleaner output, that are now part of:

I'll let those 4 CI [GitHub Actions] workflows on PR #4083 run to completion, then merge it all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants