I have a raspberry pi zero 2w running buster with kernel 5.10.103 dated April 4th, 2022. I used the guidelines from Access point as WiFi router/repeater with additional WiFi-dongle. It works well with wlan0 of the pi and wlan1 an external wifi dongle.
I have two issues.
1- Bandwidth variation
I connect to the pi as an access point. It seems the bandwidth is fairly good most of the time 400Kb/s but sometimes, for a few minutes, it goes down to about 20Kb/s. I am not running a special application then. Then, the higher bandwidth comes back. I am not sure how to investigate this. I looked at the processes running then and nothing seems to be hogging the CPU or taking a lot of memory. I am a bit puzzled. Is there any step I could take to investigate ?
2- Incorrect password
I connect to the pi and when nothing actually changed I get the message incorrect password on the Android phone I am connecting from. If I reboot the pi, the connection to the pi as an access point can work just fine. I ran systemctl status wpa_supplicant@wlan0.service and got an issue about 40MHz bandwidth not authorised. This issue does not happen very often but when it does I can't connect to the pi as acting as an AP. Is there anything I could configure or do to reproduce the issue more often and correct it ?
Regards
Regarding point 2 above, I captured the wpa_supplicant@wlan0.service and wpa_supplicant@wlan1.service statuses with systemctl status between a working system and a failing system.
On a working system:
wpa_supplicant@wlan0.service - WPA supplicant daemon (interface-specific version)
Loaded: loaded (/lib/systemd/system/wpa_supplicant@.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2022-06-05 08:01:41 BST; 1min 54s ago
Main PID: 316 (wpa_supplicant)
Tasks: 1 (limit: 985)
CGroup: /system.slice/system-wpa_supplicant.slice/wpa_supplicant@wlan0.service
└─316 /sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-wlan0.conf -Dnl80211,wext -iwlan0
Jun 05 08:01:41 pizero2w systemd[1]: Started WPA supplicant daemon (interface-specific version).
Jun 05 08:01:41 pizero2w wpa_supplicant[316]: Successfully initialized wpa_supplicant
Jun 05 08:01:42 pizero2w wpa_supplicant[316]: wlan0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=GB
Jun 05 08:01:42 pizero2w wpa_supplicant[316]: wlan0: Could not connect to kernel driver
Jun 05 08:01:42 pizero2w wpa_supplicant[316]: Using interface wlan0 with hwaddr xx:xx:xx:xx:xx:xx and ssid "AllIn0"
Jun 05 08:01:43 pizero2w wpa_supplicant[316]: wlan0: interface state UNINITIALIZED->ENABLED
Jun 05 08:01:43 pizero2w wpa_supplicant[316]: wlan0: AP-ENABLED
Jun 05 08:01:43 pizero2w wpa_supplicant[316]: wlan0: CTRL-EVENT-CONNECTED - Connection to xx:xx:xx:xx:xx:xx completed [id=0 id_str=]
wpa_supplicant@wlan1.service - WPA supplicant daemon (interface-specific version)
Loaded: loaded (/lib/systemd/system/wpa_supplicant@.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2022-06-05 08:01:41 BST; 2min 40s ago
Main PID: 294 (wpa_supplicant)
Tasks: 1 (limit: 985)
CGroup: /system.slice/system-wpa_supplicant.slice/wpa_supplicant@wlan1.service
└─294 /sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-wlan1.conf -Dnl80211,wext -iwlan1
Jun 05 08:01:41 pizero2w systemd[1]: Started WPA supplicant daemon (interface-specific version).
Jun 05 08:01:41 pizero2w wpa_supplicant[294]: Successfully initialized wpa_supplicant
Jun 05 08:01:42 pizero2w wpa_supplicant[294]: wlan1: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=GB
Jun 05 08:01:43 pizero2w wpa_supplicant[294]: wlan1: SME: Trying to authenticate with yy:yy:yy:yy:yy:yy (SSID='FRITZ!Box 7530 PV' freq=2412 MHz)
Jun 05 08:01:43 pizero2w wpa_supplicant[294]: wlan1: Trying to associate with yy:yy:yy:yy:yy:yy (SSID='FRITZ!Box 7530 PV' freq=2412 MHz)
Jun 05 08:01:43 pizero2w wpa_supplicant[294]: wlan1: Associated with yy:yy:yy:yy:yy:yy
Jun 05 08:01:43 pizero2w wpa_supplicant[294]: wlan1: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Jun 05 08:01:43 pizero2w wpa_supplicant[294]: wlan1: CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=GB
Jun 05 08:01:44 pizero2w wpa_supplicant[294]: wlan1: WPA: Key negotiation completed with yy:yy:yy:yy:yy:yy [PTK=CCMP GTK=CCMP]
Jun 05 08:01:44 pizero2w wpa_supplicant[294]: wlan1: CTRL-EVENT-CONNECTED - Connection to yy:yy:yy:yy:yy:yy completed [id=0 id_str=]
On a failing system:
wpa_supplicant@wlan0.service - WPA supplicant daemon (interface-specific version)
Loaded: loaded (/lib/systemd/system/wpa_supplicant@.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2022-06-05 07:38:19 BST; 6min ago
Main PID: 290 (wpa_supplicant)
Tasks: 1 (limit: 985)
CGroup: /system.slice/system-wpa_supplicant.slice/wpa_supplicant@wlan0.service
└─290 /sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-wlan0.conf -Dnl80211,wext -iwlan0
Jun 05 07:38:19 pizero2w systemd[1]: Started WPA supplicant daemon (interface-specific version).
Jun 05 07:38:19 pizero2w wpa_supplicant[290]: Successfully initialized wpa_supplicant
Jun 05 07:38:20 pizero2w wpa_supplicant[290]: wlan0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=GB
Jun 05 07:38:22 pizero2w wpa_supplicant[290]: Using interface wlan0 with hwaddr xx:xx:xx:xx:xx:xx and ssid "AllIn0"
Jun 05 07:38:22 pizero2w wpa_supplicant[290]: wlan0: interface state UNINITIALIZED->ENABLED
Jun 05 07:38:22 pizero2w wpa_supplicant[290]: wlan0: AP-ENABLED
Jun 05 07:38:22 pizero2w wpa_supplicant[290]: wlan0: CTRL-EVENT-CONNECTED - Connection to xx:xx:xx:xx:xx:xx completed [id=0 id_str=]
wpa_supplicant@wlan1.service - WPA supplicant daemon (interface-specific version)
Loaded: loaded (/lib/systemd/system/wpa_supplicant@.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2022-06-05 07:38:19 BST; 8min ago
Main PID: 320 (wpa_supplicant)
Tasks: 1 (limit: 985)
CGroup: /system.slice/system-wpa_supplicant.slice/wpa_supplicant@wlan1.service
└─320 /sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-wlan1.conf -Dnl80211,wext -iwlan1
Jun 05 07:38:19 pizero2w systemd[1]: Started WPA supplicant daemon (interface-specific version).
Jun 05 07:38:19 pizero2w wpa_supplicant[320]: Successfully initialized wpa_supplicant
Jun 05 07:38:20 pizero2w wpa_supplicant[320]: wlan1: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=GB
Jun 05 07:38:21 pizero2w wpa_supplicant[320]: wlan1: Trying to associate with SSID 'FRITZ!Box 7530 PV'
Jun 05 07:38:22 pizero2w wpa_supplicant[320]: wlan1: Associated with yy:yy:yy:yy:yy:yy
Jun 05 07:38:22 pizero2w wpa_supplicant[320]: wlan1: CTRL-EVENT-CONNECTED - Connection to yy:yy:yy:yy:yy:yy completed [id=0 id_str=]
Jun 05 07:38:22 pizero2w wpa_supplicant[320]: wlan1: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Jun 05 07:38:22 pizero2w wpa_supplicant[320]: wlan1: CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=GB
There is a significant difference between wlan1 status where one has a WPA key negotiation completed and not when it fails. I did not expect this as wlan1 is the client to the internet router and internet works fine so the client connection seems to work. However, the connection via wlan0 to the Rpi as an access point does not work. I get the "Incorrect password" message.
I captured the first packets exchanged on wlan0 when requesting a connection to the RPi AP.
When it works:
No. Time Source Destination Protocol Length Info
1 0.000000000 Raspberr_xx:xx:xx yy:yy:yy:yy:yy:yy EAPOL 113 Key (Message 1 of 4)
2 0.015441346 yy:yy:yy:yy:yy:yy Raspberr_xx:xx:xx EAPOL 137 Key (Message 2 of 4)
3 0.017014157 Raspberr_xx:xx:xx yy:yy:yy:yy:yy:yy EAPOL 141 Key (Message 3 of 4)
4 0.032316128 yy:yy:yy:yy:yy:yy Raspberr_xx:xx:xx EAPOL 113 Key (Message 4 of 4)
5 0.047697006 Raspberr_xx:xx:xx yy:yy:yy:yy:yy:yy EAPOL 153 Key (Group Message 1 of 2)
6 0.056710230 yy:yy:yy:yy:yy:yy Raspberr_xx:xx:xx EAPOL 113 Key (Group Message 2 of 2)
There are then additional messages exchanged and th Rpi works as an access point.
When it does not work:
No. Time Source Destination Protocol Length Info
1 0.000000000 zz:zz:zz:zz:zz:zz yy:yy:yy:yy:yy:yy EAPOL 113 Key (Message 1 of 4)
2 0.100374141 zz:zz:zz:zz:zz:zz yy:yy:yy:yy:yy:yy EAPOL 113 Key (Message 1 of 4)
3 1.100721634 zz:zz:zz:zz:zz:zz yy:yy:yy:yy:yy:yy EAPOL 113 Key (Message 1 of 4)
4 2.101044204 zz:zz:zz:zz:zz:zz yy:yy:yy:yy:yy:yy EAPOL 113 Key (Message 1 of 4)
No other type of messages are exchanged and the negotiation fails.
I would really appreciate some guidance on what might be wrong and how to fix it other than rebooting and hoping the working configuration is set up.
Best regards,
JF