You are not logged in.

#1 2025-04-06 14:28:05

Nmstr
Member
Registered: 2025-04-06
Posts: 3

[Solved] Hostapd breaking after a few minutes

I am trying to use hostapd to host a hotspot from my pc. The reason behind that is that I want to use WiVRn to stream PCVR games to my Meta Quest 2. My home network is to weak to do video streaming (I get between 5 and 50 Mbps). I use an Intel AX210 module (Gigabyte GC-WBAX210 wifi card). Receiving WiFi has always worked fine. The following is in "/etc/hostapd/hostapd.conf":

interface=wlan0
driver=nl80211
ssid=YourHotspotName
hw_mode=a
country_code=DE
channel=149
ieee80211n=1
ieee80211ac=1
ieee80211ax=1
wmm_enabled=1
auth_algs=1
wpa=2
wpa_passphrase=<MyPasshphrase>
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
ht_capab=[HT40+][HT40-][SHORT-GI-40][TX-STBC][RX-STBC1]
vht_capab=[MAX-MPDU-11454][SHORT-GI-80][RX-STBC-1]

I also tried without the "ht_capab=" and "vht_capab=" lines. I can connect fine and I get around 150-300 Mbps on a local speed test. I don't actually have internet access but I don't care about that. I only need to reach my pc. After a few minutes hostapd starts spitting out "handle_probe_req: send failed" and I get kicked from the hotspot. I also can't reconnect anymore. At this point I am forced to restart hostapd. This also happens when I don't start WiVRn and wait in the Quests menu, or when I connect to the hotspot from my ThinkPad.

This is the entire output:

user@archlinux~ $ sudo hostapd /etc/hostapd/hostapd.conf
[sudo] password for user: 
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED 
wlan0: INTERFACE-DISABLED 
wlan0: INTERFACE-ENABLED 
handle_probe_req: send failed
handle_probe_req: send failed
handle_probe_req: send failed
handle_probe_req: send failed
handle_probe_req: send failed
handle_probe_req: send failed
... this line repeats until I kill the process

I am using KDE. I also have network manager installed. Hosting a hotspot through that doesn't work nicely either, as I have issues connecting and can't seem to create a WiFi 6 hotspot.
What might be causing these disconnects? Any help is appreciated. Thanks in advance!

Last edited by Nmstr (2025-04-07 19:53:39)

Offline

#2 2025-04-07 04:56:15

-thc
Member
Registered: 2017-03-15
Posts: 1,066

Re: [Solved] Hostapd breaking after a few minutes

Did you tell NetworkManager to leave the WiFi interface alone (unmanaged)?
https://wiki.archlinux.org/title/Networ … ic_devices

Offline

#3 2025-04-07 17:46:47

Nmstr
Member
Registered: 2025-04-06
Posts: 3

Re: [Solved] Hostapd breaking after a few minutes

Once I set the Interface to unmanaged I can not start hostapd anymore. This is the error I get:

user@archlinux~ $ sudo hostapd /etc/hostapd/hostapd.conf
Frequency 5745 (primary) not allowed for AP mode, flags: 0x20853 NO-IR
Primary frequency not allowed
wlan0: IEEE 802.11 Configured channel (149) or frequency (5745) (secondary_channel=1) not found from the channel list of the current mode (2) IEEE 802.11a
wlan0: IEEE 802.11 Hardware does not support configured channel
Could not select hw_mode and channel. (-3)

I am on channel 149. Using "iw list" I can find 2 relevant sections in the output. These are those sections before setting the interface to unmanaged:

user@archlinux~ $ iw list
...
Band 2:
    ...
    HE Iftypes: AP, P2P-GO
        ...
        Frequencies:
            ...
            * 5745.0 MHz [149] (22.0 dBm)
...
Band 4:
    HE Iftypes: managed, P2P-client
        ...
        Frequencies:
            ...
            * 6695.0 MHz [149] (disabled)

This is fine because on one band my channel allows IR, which I can use. Once I set my interface to unmanaged, the frequency on band 2 changes to "no IR" (* 5745.0 MHz [149] (22.0 dBm) (no IR)). Since the whole output of "iw list" is quite long, I put the whole output before and after setting the interface to unmanaged on pastebin (https://pastebin.com/FkN3ZyrN) so that this thread doesn't get too cluttered. This is likely why hostapd is spitting out an error. This is confusing though since every single channel is either no IR or disabled, which doesn't make much sense to me. I am in the regulatory domain of germany (DE).
I tried setting it again using "sudo iw reg set DE" to no avail. On the internet I found conflicting information about what channels/frequencies are available. Some don't state channel 149 explicitly, some say it's fine and some say it is not. I found the following table on one website, which lists allowed frequencies:

    20MHz: 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140
    40MHz:  38, 46, 54, 62, 102, 110, 118, 126, 134
    80MHz: 42, 58, 106, 122
    160MHz: 50, 114

I tried multiple channels from each row and every single one failed. At this point I tried to check what channel my phones 5GHz network runs on. It was reported as channel 149, the exact one I am trying to use. This leads me to believe that the channel isn't actually blocked but that this is some other issue in my configuration. What could cause all channels to appear as no IR?

The following is the output of "iw reg get" btw:

user@archlinux~ $ sudo iw reg set DE
user@archlinux~ $ iw reg get
global
country 00: DFS-UNSET
        (2402 - 2472 @ 40), (6, 20), (N/A)
        (2457 - 2482 @ 20), (6, 20), (N/A), AUTO-BW, PASSIVE-SCAN
        (2474 - 2494 @ 20), (6, 20), (N/A), NO-OFDM, PASSIVE-SCAN
        (5170 - 5250 @ 80), (6, 20), (N/A), AUTO-BW, PASSIVE-SCAN
        (5250 - 5330 @ 80), (6, 20), (0 ms), DFS, AUTO-BW, PASSIVE-SCAN
        (5490 - 5730 @ 160), (6, 20), (0 ms), DFS, PASSIVE-SCAN
        (5735 - 5835 @ 80), (6, 20), (N/A), PASSIVE-SCAN
        (57240 - 63720 @ 2160), (N/A, 0), (N/A)

phy#0 (self-managed)
country DE: DFS-UNSET
        (2402 - 2437 @ 40), (6, 22), (N/A), AUTO-BW, NO-HT40MINUS, NO-80MHZ, NO-160MHZ
        (2422 - 2462 @ 40), (6, 22), (N/A), AUTO-BW, NO-80MHZ, NO-160MHZ
        (2447 - 2482 @ 40), (6, 22), (N/A), AUTO-BW, NO-HT40PLUS, NO-80MHZ, NO-160MHZ
        (5170 - 5190 @ 160), (6, 22), (N/A), NO-OUTDOOR, AUTO-BW, IR-CONCURRENT, NO-HT40MINUS, NO-320MHZ, PASSIVE-SCAN
        (5190 - 5210 @ 160), (6, 22), (N/A), NO-OUTDOOR, AUTO-BW, IR-CONCURRENT, NO-HT40PLUS, NO-320MHZ, PASSIVE-SCAN
        (5210 - 5230 @ 160), (6, 22), (N/A), NO-OUTDOOR, AUTO-BW, IR-CONCURRENT, NO-HT40MINUS, NO-320MHZ, PASSIVE-SCAN
        (5230 - 5250 @ 160), (6, 22), (N/A), NO-OUTDOOR, AUTO-BW, IR-CONCURRENT, NO-HT40PLUS, NO-320MHZ, PASSIVE-SCAN
        (5250 - 5270 @ 160), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, NO-320MHZ, PASSIVE-SCAN
        (5270 - 5290 @ 160), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, NO-320MHZ, PASSIVE-SCAN
        (5290 - 5310 @ 160), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, NO-320MHZ, PASSIVE-SCAN
        (5310 - 5330 @ 160), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, NO-320MHZ, PASSIVE-SCAN
        (5490 - 5510 @ 160), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, NO-320MHZ, PASSIVE-SCAN
        (5510 - 5530 @ 160), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, NO-320MHZ, PASSIVE-SCAN
        (5530 - 5550 @ 160), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, NO-320MHZ, PASSIVE-SCAN
        (5550 - 5570 @ 160), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, NO-320MHZ, PASSIVE-SCAN
        (5570 - 5590 @ 160), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, NO-320MHZ, PASSIVE-SCAN
        (5590 - 5610 @ 160), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, NO-320MHZ, PASSIVE-SCAN
        (5610 - 5630 @ 160), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, NO-320MHZ, PASSIVE-SCAN
        (5630 - 5650 @ 160), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, NO-320MHZ, PASSIVE-SCAN
        (5650 - 5670 @ 80), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, NO-160MHZ, NO-320MHZ, PASSIVE-SCAN
        (5670 - 5690 @ 80), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, NO-160MHZ, NO-320MHZ, PASSIVE-SCAN
        (5690 - 5710 @ 80), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, NO-160MHZ, NO-320MHZ, PASSIVE-SCAN
        (5735 - 5755 @ 80), (6, 22), (N/A), AUTO-BW, NO-HT40MINUS, NO-160MHZ, NO-320MHZ
        (5755 - 5775 @ 80), (6, 22), (N/A), AUTO-BW, NO-HT40PLUS, NO-160MHZ, NO-320MHZ
        (5775 - 5795 @ 80), (6, 22), (N/A), AUTO-BW, NO-HT40MINUS, NO-160MHZ, NO-320MHZ
        (5795 - 5815 @ 80), (6, 22), (N/A), AUTO-BW, NO-HT40PLUS, NO-160MHZ, NO-320MHZ
        (5815 - 5835 @ 40), (6, 22), (N/A), AUTO-BW, NO-HT40MINUS, NO-80MHZ, NO-160MHZ, NO-320MHZ
        (5835 - 5855 @ 40), (6, 22), (N/A), AUTO-BW, NO-HT40PLUS, NO-80MHZ, NO-160MHZ, NO-320MHZ
        (5855 - 5875 @ 20), (6, 22), (N/A), AUTO-BW, NO-HT40MINUS, NO-HT40PLUS, NO-80MHZ, NO-160MHZ, NO-320MHZ
        (5945 - 6425 @ 160), (6, 22), (N/A), NO-OUTDOOR, AUTO-BW, IR-CONCURRENT, NO-320MHZ, PASSIVE-SCAN

Offline

#4 2025-04-07 17:55:29

-thc
Member
Registered: 2017-03-15
Posts: 1,066

Re: [Solved] Hostapd breaking after a few minutes

Offline

#5 2025-04-07 19:52:05

Nmstr
Member
Registered: 2025-04-06
Posts: 3

Re: [Solved] Hostapd breaking after a few minutes

Thank you. This last resource helped me solve the issue.

For anyone stumbling across this in the future:

Apparently my network card did support LAR, meaning I can not host a hotspot with it using hostapd. However, you can use wpa_supplicant (which is what I am doing now). It does not support WiFi6, but with some trickery you can still get better speeds. I now get roughly 300 Mbps, with 100 Mbps in the lowest lows. Not what I wanted but the best I can get without spending even more time on this. The 2nd answer from this stack exchange question proved useful in solving this: https://unix.stackexchange.com/question … -5ghz-band

Offline

Board footer

Powered by FluxBB