2

On a laptop running Linux Mint, I can run these commands to stand up a WiFi hotspot:

nmcli con add type wifi ifname [interface name] con-name test_ssid autoconnect yes ssid test_ssid
nmcli con modify test_ssid 802-11-wireless.mode ap ipv4.method shared
nmcli con modify test_ssid wifi-sec.key-mgmt wpa-psk
nmcli con modify test_ssid 802-11-wireless-security.pairwise ccmp
nmcli con modify test_ssid 802-11-wireless-security.group ccmp
nmcli con modify test_ssid wifi-sec.psk [password]

The resulting test_ssid can be joined by iPhone, Windows, and even Intel MacBook Pros running macOS 12.6. But it can't be joined by an M1 MacBook Pro running macOS 13.0. Does anyone know why, or if there's a way to get M1 Macs to join Linux WiFi hotspots, or if there's a way to get debug output from the connection attempt? When I try to join the network from the M1 MBP, it says The Wi-Fi network "test_ssid" requires a WPA3 Personal., which is odd.

Giacomo1968
  • 53,069
  • 19
  • 162
  • 212
Theron S
  • 191
  • 6
  • 1
    To get Wi-Fi debug logs on macOS, Option-click on the Wi-Fi Menu Extra, and select "Open Wireless Diagnostics…". In the utility that opens, check the Window menu for additional wireless diagnostic tool windows you can open, including one that helps you enable a few different types of debug logging. – Spiff Mar 03 '23 at 18:26
  • BTW, is your PSK passphrase at least 8, and no more than 63, characters long? Also, what does the Mac's failure to join look like? Do you get an error dialog? If so, what exactly does it say? – Spiff Mar 03 '23 at 19:43
  • @Spiff I'll look into those additional diagnostics, thanks. Passphrase is more than 8 characters and works fine on the other OSes. On the M1 MBP, the connection fails ~instantly and just gives a normal `The Wi-Fi network "test_ssid" could not be joined.` error. – Theron S Mar 03 '23 at 21:10
  • The logs at `/var/log/wifi.log` weren't helpful, nor were the diagnostics as far as I could tell, but I did find more useful logs by running `log stream --predicate '(processImagePath contains "airportd")'`. Viewing that output while attempting to join the network, I see messages like `Failed to associate to Wi-Fi network test_ssid2 on interface en0, returned error code -3906`. Looking at `CoreWLANTypes.h`, I see that `-3906` is `kCWUnspecifiedFailureErr`. So not so helpful after all... – Theron S Mar 03 '23 at 21:43
  • In the comments of that same header file, `kCWUnspecifiedFailureErr` is described as `Access point did not specify a reason for authentication/association failure.` So I figured I'd check the access point end of things. If I `tail -f /var/log/syslog` on the Linux machine/hotspot, I can see when other clients associate/disassociate, but nothing happens at all when the M1 MBP tries to join. – Theron S Mar 03 '23 at 22:04
  • See additional troubleshooting methods in the article [Top 6 Ways to Fix Mac Not Connecting to Hotspot](https://www.guidingtech.com/top-ways-to-fix-mac-not-connecting-to-hotspot/). – harrymc Mar 06 '23 at 08:53
  • Check out [this thread](https://osxdaily.com/2022/11/07/fix-wi-fi-internet-connection-problems-in-macos-ventura/) especially boot into safe mode might help to find the issue – 1NN Mar 07 '23 at 21:20
  • 1
    also, maybe you can find more help on https://apple.stackexchange.com/ – 1NN Mar 07 '23 at 21:23
  • @harrymc Regarding the troubleshooting steps you linked to: this is not a matter of forgetting a known network, nor an unstable connection, nor an open network in need of a password, and this already concerns a 2.4GHz network. I asked on apple.stackexchange.com. The MBP in question has no customizations that booting into Safe Mode would address. – Theron S Mar 10 '23 at 22:39
  • 2
    Could this be an issue with the Mac refusing anything but WPA3 and nmcli trying to revert to WPA2, perhaps due to a bug or configuration issue? You might find these threads relevant: Here is one where a persons router was reverting to WPA-WPA2 after they specified WPA3: https://askubuntu.com/questions/1290589/how-to-use-wpa3-with-ubuntu-20-04 Check out the comments to the answer of this one where they were having an issue with ubuntu connecting to wpa3 and they fixed it with a good old system upgrade (and also turning off secure boot?). – a e Mar 12 '23 at 19:51
  • 1
    @ae Your commend led me to find the answer, thanks. The problem is actually with wpasupplicant 2.10 on Linux. I found other threads online with people reporting regressions with this version so I tried a Ubuntu 20 boot disk which uses wpasupplicant 2.9: networks created with this are able to be joined by the MacBook Pro. – Theron S Mar 15 '23 at 04:54
  • 1
    Excellent info here. Will post a bounty when I can. – Giacomo1968 Mar 15 '23 at 05:17
  • Bounty rewarded. Great work! – Giacomo1968 Mar 16 '23 at 19:33
  • 1
    @Giacomo1968 thank you! – Theron S Mar 17 '23 at 20:02

1 Answers1

2

Edit: the solution, in this particular case, is to add a line like the following.

nmcli con modify test_ssid wifi-sec.pmf disable

This will disable SAE and force the use of WPA2 Personal/SHA-256/AES. It would be preferable to get WPA3/SAE working, but I have not been able to do so with my Qualcomm Atheros QCA6174. I suspect this card performs the authentication itself rather than delegate it to the OS (Linux in this case), and because it's from 2015 or so, is too old to do SAE.

Original answer:

The problem was wpa_supplicant 2.10 on Linux. Hotspots created with wpa_supplicant 2.9 are able to be joined by the M1 MacBook Pro. When making a network with these commands

nmcli con add type wifi ifname wlp2s0 con-name test_ssid autoconnect yes ssid test_ssid
nmcli con modify test_ssid 802-11-wireless.mode ap ipv4.method shared
nmcli con modify test_ssid wifi-sec.key-mgmt wpa-psk
nmcli con modify test_ssid 802-11-wireless-security.pairwise ccmp
nmcli con modify test_ssid 802-11-wireless-security.group ccmp
nmcli con modify test_ssid 802-11-wireless-security.proto rsn
nmcli con modify test_ssid wifi-sec.psk 12345678
nmcli con up test_ssid

On wpa_supplicant 2.10, and scanning for that network from an M1 MacBook Pro with this command:

/System/Library/PrivateFramework/Apple80211.framework/Versions/Current/Resources/airport -s

The network shows this in the security column:

RSN(PSK,PSK-SHA256,SAE/AES/AES)

On wpa_supplicant 2.9, it shows this in the security column:

RSN(PSK,PSK-SHA256/AES/AES)
Theron S
  • 191
  • 6