Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Help]: suggested Wifi6 5Ghz hostapd.conf results in "80/80+80 MHz: no second channel offset" error #520

Open
2 tasks done
DurvalMenezes opened this issue Oct 13, 2024 · 9 comments

Comments

@DurvalMenezes
Copy link

Checklist

  • I acknowledge that support is provided on a best-effort basis.
  • I acknowledge that the authors and contributors to this repository cannot be held responsible for the results of my use of any information contained in or linked from this repository.

uname

Linux REDACTED 6.10.6+bpo-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.10.6-1~bpo12+1 (2024-08-26) x86_64 GNU/Linux

lsusb

Bus 001 Device 077: ID 0e8d:7961 MediaTek Inc. Wireless_Device

rfkill

8: phy6: Wireless LAN Soft blocked: no Hard blocked: no

dkms

zfs/2.2.6, 6.10.6+bpo-amd64, x86_64: installed

iw

phy#6
        Interface wlan1
                ifindex 12
                wdev 0x600000001
                addr e8:4e:06:ac:f4:1f
                type managed
                txpower 3.00 dBm
                multicast TXQ:
                        qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes        tx-packets
                        0       0       115     0       0       0       0       20416           121

What happened?

I just bought this adapter: https://www.amazon.com/EDUP-Wireless-802-11AX-Tri-Band-Compatible/dp/B0CZ82RM5L, as recommended here: https:/morrownr/USB-WiFi/blob/main/home/USB_WiFi_Adapters_that_are_supported_with_Linux_in-kernel_drivers.md

I'm trying to use it with hostapd using this configuration file: https:/morrownr/USB-WiFi/blob/main/home/AP_Mode/hostapd-WiFi6.conf (only lines changed: ssid=, wpa_passphrase= and interface=.

When I run hostapd with this configuration file, I get a 80/80+80 MHz: no second channel offset error:

# /usr/sbin/hostapd -B /etc/hostapd/hostapd_liliput_5ghz.conf
wlan1: interface state UNINITIALIZED->COUNTRY_UPDATE
80/80+80 MHz: no second channel offset
Could not set channel for kernel driver
Interface initialization failed

Further details:

  • Distro: Devuan Daedalus (Debian Bookworm without systemd)
  • Machine: Geekom A7 configured with Ryzen 9 7940HS and 32GB RAM
  • The adapter is connected via a USB 3.0 powered hub

Thanks in advance for any and all help and tips.

@morrownr
Copy link
Owner

Hi @DurvalMenezes

Distro: Devuan Daedalus (Debian Bookworm without systemd)

My ability to help is limited because of your use of Devuan Daedalus. It would be easier for me to help if you used Debian 12 Bookworm or any of the many distros directly based on it that retain systemd. That they have pulled out systemd makes me wonder about what else they have messed with.

The errors you are seeing are not something I have had to deal with so I'm not sure where to start. I have kept a guide to building an ap up on this site for several years and it has evolved over time as I test and improve it as I can. The guide currently makes heavy use of systemd and has proven to be a really solid guide. The guide is on the Main Menu just above the link to the WiFi 6 hostapd.conf example you are using. While the guide uses RaspBerry Pi OS, it works well with Debian 12 as well. The guide currently is tilted toward WiFi 4 and WiFi 5 but it is simple to substitute the WiFi 6 example.

If you do try Debian 12, it defaults to kernel 6.1 but it has additional more modern kernels to choose from. You can start synaptic and search for linux-image. I recommend kernel 6.6. You might also want to follow the Firmware guide on the Main Menu so as to make sure the firmware for your adapter is up to date. Once you are set up, you can follow the AP guide and if you have any questions, come back here and ask.

I have the same Edup adapter that you have and it is currently pulling duty as an AP following my AP guide and the WiFi 6 guide you are trying so I am well equipped to help if you need it.

Regards

@DurvalMenezes
Copy link
Author

Hi @morrownr, thanks for your prompt response and sorry for the delay in getting back to you.

My ability to help is limited because of your use of Devuan Daedalus. It would be easier for me to help if you used Debian 12 Bookworm or any of the many distros directly based on it that retain systemd

This is not a problem, it's not much trouble for me to try and reproduce the issue under Debian.

That said, I do not understand why or how systemd could be in play here: you see, the problem comes up with me executing hostapd directly, so no init system is involved (be it systemd, sysvinit, openrc or whatever).

I have kept a guide to building an ap up on this site for several years and it has evolved over time as I test and improve it as I can. The guide currently makes heavy use of systemd and has proven to be a really solid guide. The guide is on the Main Menu just above the link to the WiFi 6 hostapd.conf example you are using.

You mean this one, right? https:/morrownr/USB-WiFi/blob/main/home/AP_Mode/Bridged_Wireless_Access_Point.md

The reason I have not followed it is because my AP does not operate in "bridge" mode, but rather in "router" mode and with some complexities involved (ipfilter rules, virtual machines running and being routed/filtered, etc).

I will try and follow this guide of yours and try to reproduce the issue, as many of the steps involved apply only to a Raspberry Pi setup ("Reduce overall power consumption", etc) I will skip these steps.

I will get back to you with the results. Thanks again.

@morrownr
Copy link
Owner

@DurvalMenezes

I do not understand why or how systemd could be in play here...

It may not be in play but it is easier for me to help you if I can play along and test things here. I have various test systems but all are based on distros that use systemd.

You mean this one, right?

Yes

The reason I have not followed it is because my AP does not operate in "bridge" mode, but rather in "router" mode...

I understand. My guide is not for "router" mode but what I do is offer my opinion as to what might be the best solution for "router" mode in the document. I recommend using OpenWRT if you need "router" mode.

OpenWRT has the driver for your adapter. In fact, some of the Mediatek kernel devs hang out at OpenWRT so anything Mediatek is supported better than anything else. The soon to be released OpenWRT One router is based on the Mediatek mt7981 SOC.

I will try and follow this guide of yours and try to reproduce the issue...

If you are looking for "router" mode, my guide will not get you where you want to do as even the networking is handled by systemd. Think about using OpenWRT. I'll be glad to assist if you want as I have time.

@DurvalMenezes
Copy link
Author

Again, thanks for your kind and prompt response, @morrownr! Much appreciated!!

Think about using OpenWRT.

Thank you for your suggestion, but unfortunately I can't use OpenWRT because being an AP is only one of this machine's functions -- it must also run software that does not run in OpenWRT. Debian is mandatory for my use case.

It may not be in play but it is easier for me to help you if I can play along and test things here. I have various test systems but all are based on distros that use systemd.

Thanks for the detailed explanation, and I have good news: I brought up a machine using plain Debian 12 Bookworm and your aforementioned guide -- and hostapd works perfectly with the /etc/hostapd/hostapd-WiFi5.conf you indicate in the guide. But when I use it with your /etc/hostapd/hostapd-WiFi6.conf I pointed to in my OP, hostapd fails to start with exactly the same error message I was getting under Devuan, this time as recorded in ~/hostapd.log:

80/80+80 MHz: no second channel offset
Could not set channel for kernel driver
Interface initialization failed

The only things I changed on your /etc/hostapd/hostapd-WiFi6.conf were interface= (to reflect the correct interface name in my system, ie wlxXXXXXXXXXXXX as attributed to it by default by Debian based on its MAC address) and commenting-out the ctrl_interface= and ctrl_interface_group= lines (otherwise hostapd fails with a invalid line message mentioning the ctrl_interface_group= line).

Attached please find my /etc/hostapd/hostapd-WiFi6.conf (renamed with a TXT extension so Github won't reject it as an 'unsupported file type') and my ~/hostapd.log files; the latter comprises the successful invocation with your
/etc/hostapd/hostapd-WiFi5.conf including successful connection of an WiFi client to that AP, followed by the unsuccessful invocations with your /etc/hostapd/hostapd-WiFi6.conf, first with the wrong interface=, then with the error caused by ctrl_interface=, and finally with the same error I was getting with Devuan, depicted above.

Please let me know if you need anything else, and thanks again for all your help and kindness.

hostapd-WiFi6.conf.txt
hostapd.log

@morrownr
Copy link
Owner

Hmmm...

Post the contents of the following file:

$ sudo nano /etc/NetworkManager/NetworkManager.conf

Post the result of the following command:

$ iw dev

@DurvalMenezes
Copy link
Author

Sorry for the delay, something happened and I didn't get a notification for your comment above, just saw it now when I came back here to check.

Here's the info you asked for:

  • /etc/NetworkManager/NetworkManager.conf: no such file here (this machine doesn't even have X installed, much less a Desktop Environment and therefore no NetworkManager, as it's so far headless; if you need to simulate this condition in your test environment, it would be just like "Option 2: // Uninstall NetworkManager" as per your guide;

  • iw dev:

phy#0
        Interface wlxXXXXXXXXXXXX
                ifindex 3
                wdev 0x1
                addr XX:XX:XX:XX:XX:XX
                type managed
                txpower 3.00 dBm
                multicast TXQ:
                        qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes        tx-packets
                        0       0       81      0       0       0       0       18456           90

Please let me know if you need anything else, I will be camping on this page so as to be able to respond faster.

@morrownr
Copy link
Owner

This is a puzzle. What does the following command give you?

$ hostapd -v

@DurvalMenezes
Copy link
Author

$ 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 <[email protected]> and contributors

And here's the exact installed package:

# dpkg -l hostapd
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version           Architecture Description
+++-==============-=================-============-=============================================================
ii  hostapd        2:2.10-12+deb12u2 amd64        access point and authentication server for Wi-Fi and Ethernet

Anything else I can provide?

@morrownr
Copy link
Owner

hostapd v2.10

That is the same version I am running. My AP setup:

RasPi4b
RasPiOS 64 bit (based on Debian 12) (it does use Network Manager so I tell NM to ignore the wireless interface)
Kernel 6.6
Using the hostapd.conf and AP guide that I mentioned.

I am not seeing this issue and, infact, I cannot say that I have ever seen that specific set of issues. The only obvious difference in our setups is that you are running a routed setup and I am running a bridged setup but if that had something to do with it, I would expect to see different issues. This message is going through a connection to my AP and it is. It is on channel 36, 80 MHz channel width and is using WiFi 6.

If I come up with something, I'll let you know but I am stumped for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants