Open sektorhybrid opened 1 year ago
I'm pondering whether the following patch is applicable to your problem:
The author, @whitslack , is a user here.
@morrownr recompiled the module in my NUC box with https://github.com/whitslack 's patch and I am up and running without issue in 4G, the culprit seems to be in that direction. I will leave it as is to test its stability and report back after a while.
No hangs
Απρ 22 02:08:44 kitana systemd[1]: hostapd@wlanap_CF953AX.service: Deactivated successfully.
Απρ 22 02:11:01 kitana systemd[1]: Started Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator.
Απρ 22 02:11:02 kitana hostapd[4311]: wlanap_CF953AX: interface state UNINITIALIZED->COUNTRY_UPDATE
Απρ 22 02:11:13 kitana hostapd[4311]: wlanap_CF953AX: interface state COUNTRY_UPDATE->HT_SCAN
Απρ 22 02:11:13 kitana hostapd[4311]: wlanap_CF953AX: interface state HT_SCAN->ENABLED
Απρ 22 02:11:13 kitana hostapd[4311]: wlanap_CF953AX: AP-ENABLED
Απρ 24 23:54:21 kitana hostapd[23330]: wlanap_CF953AX: AP-STA-CONNECTED 6a:a5:dc:14:2e:5a
Απρ 24 23:54:21 kitana hostapd[23330]: wlanap_CF953AX: STA 6a:a5:dc:14:2e:5a IEEE 802.1X: authorizing port
Απρ 24 23:54:21 kitana hostapd[23330]: wlanap_CF953AX: STA 6a:a5:dc:14:2e:5a RADIUS: starting accounting session A0D6D7E6A439F024
Απρ 24 23:54:21 kitana hostapd[23330]: wlanap_CF953AX: STA 6a:a5:dc:14:2e:5a WPA: pairwise key handshake completed (RSN)
Απρ 24 23:54:21 kitana hostapd[23330]: wlanap_CF953AX: EAPOL-4WAY-HS-COMPLETED 6a:a5:dc:14:2e:5a
Απρ 24 23:54:21 kitana hostapd[23330]: wlanap_CF953AX: STA 6a:a5:dc:14:2e:5a IEEE 802.1X: authorizing port
Απρ 24 23:54:21 kitana hostapd[23330]: wlanap_CF953AX: STA 6a:a5:dc:14:2e:5a RADIUS: starting accounting session A0D6D7E6A439F024
Απρ 24 23:54:21 kitana hostapd[23330]: wlanap_CF953AX: STA 6a:a5:dc:14:2e:5a WPA: pairwise key handshake completed (RSN)
.........
.........
If you need extra testing from my side with various configurations feel free to ask and thanks for your support.
I will leave it as is to test its stability and report back after a while.
Interesting. I look forward to your report. @whitslack is the one who needs the report as he could add additional info to his patch if a version 2 is necessary. It will be interesting what Felix has to say about the patch.
I was unable to duplicate the problem when @whitslack brought it up. I am of the opinion that there are differences in how I set up AP mode and that is the reason I am not seeing the issue. If you can take a look and isolate the differences in your setup and mind, that could provide some clues. The guide I made and use is located:
https://github.com/morrownr/USB-WiFi/blob/main/home/AP_Mode/Bridged_Wireless_Access_Point.md
@morrownr (and of course @whitslack in case it helps you, thanks for the fix) I am leaving here my current configuration notes until I read your instructions page and compare them with my setup. There might be other configs that might be missing from my side, I 'll report them after my reading session. It is indeed interesting, and from my side an opportunity to learn more.
##################################### ll /etc/systemd/network/
total 24K
drwxr-xr-x 3 root root 4,0K Απρ 12 00:30 .
drwxr-xr-x 6 root root 4,0K Απρ 8 21:01 ..
-rw-r--r-- 1 root root 30 Απρ 10 00:51 10-br0.netdev
-rw-r--r-- 1 root root 125 Απρ 10 01:57 13-eth0-bridged.network
-rw-r--r-- 1 root root 271 Απρ 10 02:16 15-br0.network
##################################### iw dev
phy#
Interface wlanap_CF953AX
ifindex 10
wdev 0x700000001
addr d0:37:45:96:50:51
ssid killing_technology_4G
type AP
channel 6 (2437 MHz), width: 20 MHz, center1: 2437 MHz
txpower 3.00 dBm
multicast TXQ:
qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets
0 0 856988 0 0 0 2 81538690 859415
##################################### hostapd -v
hostapd v2.10
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2022, Jouni Malinen <j@w1.fi> and contributors
##################################### systemctl status dhcpcd
○ dhcpcd.service - dhcpcd on all interfaces
Loaded: loaded (/usr/lib/systemd/system/dhcpcd.service; disabled; preset: disabled)
Active: inactive (dead)
##################################### systemctl status systemd-networkd
● systemd-networkd.service - Network Configuration
Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled; preset: enabled)
Active: active (running) since Mon 2023-04-24 22:06:37 EEST; 22h ago
TriggeredBy: ● systemd-networkd.socket
Docs: man:systemd-networkd.service(8)
Main PID: 238 (systemd-network)
Status: "Processing requests..."
Tasks: 1 (limit: 4487)
Memory: 3.7M
CPU: 1.443s
CGroup: /system.slice/systemd-networkd.service
└─238 /usr/lib/systemd/systemd-networkd
##################################### sudo systemctl status NetworkManager
○ NetworkManager.service - Network Manager
Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; disabled; preset: disabled)
Active: inactive (dead)
Docs: man:NetworkManager(8)
##################################### rfkill
ID TYPE DEVICE SOFT HARD
21 bluetooth hci0 unblocked unblocked
22 wlan phy7 unblocked unblocked
##################################### [/etc/default/grub]
...
GRUB_CMDLINE_LINUX_DEFAULT="udev.log_priority=3 net.ifnames=0 audit=0"
...
##################################### [/etc/systemd/network/10-br0.netdev]
[NetDev]
Name=br0
Kind=bridge
##################################### [/etc/systemd/network/13-eth0-bridged.network]
[Match]
Name=eth0
[Link]
RequiredForOnline=no
[Network]
Bridge=br0
##################################### [/etc/systemd/network/15-br0.network]
[Match]
Name=br0
[Network]
Address=192.168.1.10/24
Gateway=192.168.1.1
DNS=1.1.1.1
LinkLocalAddressing=ipv4
[Route]
Gateway=192.168.1.1
Destination=192.168.1.0/24
GatewayOnlink=yes
##################################### [/etc/hostapd/hostapd_wlanap_CF953AX.conf]
country_code=FM
interface=wlanap_CF953AX
bridge=br0
driver=nl80211
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
ssid=killing_technology_4G
bssid=XX:XX:XX:XX:XX:XX
wpa_passphrase=XXXXXXXXXXXXXXXXX
hw_mode=g
channel=6
ieee80211n=1
ieee80211d=1
wmm_enabled=1
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
logger_syslog=-1
logger_syslog_level=1
logger_stdout=-1
logger_stdout_level=1
ctrl_interface=/var/run/hostapd_CF953AX
##################################### [/usr/lib/systemd/system/hostapd@.service]
[Unit]
Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
After=network.target
[Service]
ExecStart=/usr/bin/hostapd /etc/hostapd/hostapd_%i.conf
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
RestartSec=4
[Install]
WantedBy=multi-user.target
Everything is still up and running without issue and seems stable. I have a minidlna server in an Rpi2 connected through switch to the subnet (1G), the first graph's STA is my current STA's dbms (one wall between CF953AX AP and 00:51:ed:00:16:82, the rest of STAs are closer to AP). The other two graphs show utilization from a yesterday's session, minidlna streaming 1080p movie through AP to the STA for a couple of hours.
I am leaving here my current configuration notes until I read your instructions page and compare them with my setup.
That is fine. I need to do a fresh round of testing on my guide soon since there was a recent RasPiOS release. I can look at this while doing the new setup.
I suspect the issue may involve my use of systemd-network. My guide is the result of long term testing to get the most stable AP setup possible. I don't care what it is based on as long as it is ultra stable and fast.
Hopefully the patch is what was needed and can proceed on into the kernel.
Hello
I have the following setup
The box freezes always while receiving the first 4-Way handshake from the first STA trying to connect. I tested with 4G, 5G and 6G with exact the same result. When the box hangs, the cursor in terminal screen stops blinking and nothing works except hard shutdown using the box shutdown button so this is a proper kernel panic.
I tested directly in USB2 port, USB3 port, externally powered USB2 and USB3 hubs, USB2 and USB3 extension cords etc Two USB setups I tried can be seen below
As USB2
As USB3
The same settings are working flawlessly for all the adapters except the CF953AX, also sharing my udev rules which shows the adapters.
Logs from previous boot that ultimately hanged
In another try some more information appeared in dmesg, so feedback from Kernel varies, in some tries I receive more info, in other tries I may receive nothing.
The same info as above in picture
ip a (before starting hostapd, thats why it is DOWN)
Tested a multitude of configs with exact same result, indicatively
iw list