01-31-2025, 10:27 PM
(This post was last modified: 01-31-2025, 10:51 PM by philrandal.)
(01-31-2025, 10:16 PM)Tim Curtis Wrote:(01-31-2025, 10:06 PM)philrandal Wrote: OK, I have made some progress.
Default AP on a Pi 3B has connection proto "rsn". Even after using nmcli to set pairwise to "ccmp" advertises tkip and ccmp, which I suspect is the problem.
I can login from windows 11 but not from my Android 14 phone.
Changing the proto to "wpa" enables me to connect from both my phone and from windows, with warnings of insecure connection, of course.
Thanks Phil.
Below is the code that generates the Hotspot.nmconnection file. Is the fix to set "proto=wpa\n" for Pi-3B ?
If yes then I'll find my 3B and run some tests.
Code:// Wireless: Hotspot
$fh = fopen('/etc/NetworkManager/system-connections/Hotspot.nmconnection', 'w');
$data = "#########################################\n";
$data .= "# This file is managed by moOde \n";
$data .= "# Wireless: Hotspot \n";
$data .= "#########################################\n\n";
$data .= "[connection]\n";
$data .= "id=" . $cfgNetwork[2]['wlanssid'] . "\n";
$data .= "uuid=" . $cfgNetwork[2]['wlanuuid'] . "\n";
$data .= "type=wifi\n";
$data .= "interface-name=wlan0\n";
$data .= "autoconnect=false\n";
$data .= "[wifi]\n";
$data .= "mode=ap\n";
$data .= "ssid=" . $cfgNetwork[2]['wlanssid'] . "\n";
$data .= "[wifi-security]\n";
$data .= "group=ccmp\n";
$data .= "pairwise=ccmp\n";
$data .= "proto=rsn\n";
$data .= "key-mgmt=wpa-psk\n";
$data .= "psk=" . $cfgNetwork[2]['wlanpsk'] . "\n";
$data .= "[ipv4]\n";
$data .= "method=shared\n";
$data .= "address1=" . $_SESSION['ap_network_addr'] . "\n";
$data .= "[ipv6]\n";
$data .= "addr-gen-mode=default\n";
$data .= "method=ignore\n";
fwrite($fh, $data);
fclose($fh);
More a workaround to degrade it to WPA instead of WPA2, than a real fix.
I suspect the uiltimate problem is buggy firmware on the 3B's WiFi chip. This will apply to the original Pi Zero W. Pi Zero 2 W should be fine.
Afterthought: WPA2 works if you're trying to connect from a Windows PC. The problem arises only when connecting from Android (and iPhones?).
Best workaround is an option to choose via the UI with suitable warnings not to use WPA unless WPA2 doesn't work for you. If you only have an Android device you won't be able to change from WPA2 to WPA, which leads us back to square one. Default to WPA for the Pi 1 W and Pi 3B, with an option to change it to WPA2?
I haven't tried AP mode on a Pi 4 or 5. Do those both advertise TKIP with WPA2 as well?