Page MenuHomeVyOS Platform

Wireless hw_mode=a with ACS , not working
Closed, InvalidPublicBUG

Description

I am using WLE900VX hardware
and using following set of vyos commands

#delete interfaces wireless
#commit

#set system wifi-regulatory-domain US
#set interfaces wireless wlan4 physical-device phy0
#set interfaces wireless wlan4 hw-id xx:xx:xx:xx:xx:xx
#set interfaces wireless wlan4 mac xx:xx:xx:xx:xx:xx
#commit

#set interfaces wireless wlan4 type access-point
#set interfaces wireless wlan4 mode a
#set interfaces wireless wlan4 channel 0
#set interfaces wireless wlan4 ssid testSSID0
#commit

do not start hostapd, so I restart in manually

#sudo /opt/vyatta/sbin/hostapd-init restart wlan4

it did not start testSSID0.
to debug the issue, I even tried to running the hostapd manually using

#sudo hostapd /var/run/wlan4.cfg
but I get error as
hostapd: /usr/lib/aarch64-linux-gnu/libssl.so.1.0.0: no version information available (required by hostapd)
hostapd: /usr/lib/aarch64-linux-gnu/libssl.so.1.0.0: no version information available (required by hostapd)
hostapd: /usr/lib/aarch64-linux-gnu/libcrypto.so.1.0.0: no version information available (required by hostapd)
Configuration file: /var/run/hostapd/wlan4.cfg
wlan4: interface state UNINITIALIZED->COUNTRY_UPDATE
ACS: Automatic channel selection started, this may take a bit
wlan4: interface state COUNTRY_UPDATE->ACS
wlan4: ACS-STARTED
ACS: Unable to collect survey data
ACS: All study options have failed
Interface initialization failed
wlan4: interface state ACS->DISABLED
wlan4: AP-DISABLED
ACS: Possibly channel configuration is invalid, please report this along with your config file.
ACS: Failed to start
wlan4: AP-DISABLED
hostapd_free_hapd_data: Interface wlan4 wasn’t started
wlan4: interface state DISABLED->DISABLED
hostapd_free_hapd_data: Interface wlan4 wasn’t started

hostapd.conf
Hostapd configuration for wlan4

interface=wlan4
driver=nl80211
logger_syslog=-1
logger_syslog_level=0
logger_stdout=-1
logger_stdout_level=4
country_code=US
ieee80211d=1
ssid=testSSID0
channel=0
hw_mode=a
ieee80211w=0
macaddr_acl=0
ap_isolate=1
auth_algs=1
tx_queue_data3_aifs=7
tx_queue_data3_cwmin=15
tx_queue_data3_cwmax=1023
tx_queue_data3_burst=0
tx_queue_data2_aifs=3
tx_queue_data2_cwmin=15
tx_queue_data2_cwmax=63
tx_queue_data2_burst=0
tx_queue_data1_aifs=1
tx_queue_data1_cwmin=7
tx_queue_data1_cwmax=15
tx_queue_data1_burst=3.0
tx_queue_data0_aifs=1
tx_queue_data0_cwmin=3
tx_queue_data0_cwmax=7
tx_queue_data0_burst=1.5
wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=4
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmax=4
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47
wmm_ac_vo_acm=0

Details

Difficulty level
Normal (likely a few hours)
Version
1.2 Rolling 20180703
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

Hi there,

I'm the one that pimped the VyOS Wifi stack to support 5GHz access points. I use Compex WLE600VX cards which use the QCA9882 chips.

First, I need to install a more recent atheros firmware package and then overwrite the present firmware with even more recent firmware to the respective path: /lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
You may achieve this as follows:

wget http://ftp.de.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-atheros_20170823-1~bpo9+1_all.deb
dpkg -i firmware-atheros_20170823-1~bpo9+1_all.deb
wget -O /lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin https://github.com/kvalo/ath10k-firmware/raw/master/QCA988X/hw2.0/10.2.4.70/firmware-5.bin_10.2.4.70.67

Then, after rebooting your device (I know this sucks), you may check if your regulatory domain ws accepted by the VyOS Kernel. If your regulatory domain cannot be set correctly, your wifi device will always refuse to work.

After booting, test if the firmware was loaded using:

dmesg | grep ath10k

You should see something like this (please note that I use 2 WLE600VX cards, therfore lines are duplicate, one set for each card):

[   19.644004] ath10k_pci 0000:01:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[   19.765268] ath10k_pci 0000:05:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[   19.965523] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/pre-cal-pci-0000:01:00.0.bin failed with error -2
[   19.965595] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/cal-pci-0000:01:00.0.bin failed with error -2
[   20.014340] ath10k_pci 0000:05:00.0: Direct firmware load for ath10k/pre-cal-pci-0000:05:00.0.bin failed with error -2
[   20.014448] ath10k_pci 0000:05:00.0: Direct firmware load for ath10k/cal-pci-0000:05:00.0.bin failed with error -2
[   20.031494] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/firmware-6.bin failed with error -2
[   20.160824] ath10k_pci 0000:05:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043222ff sub 0000:0000
[   20.160831] ath10k_pci 0000:01:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043222ff sub 0000:0000
[   20.160838] ath10k_pci 0000:01:00.0: kconfig debug 0 debugfs 0 tracing 0 dfs 1 testmode 1
[   20.160869] ath10k_pci 0000:05:00.0: kconfig debug 0 debugfs 0 tracing 0 dfs 1 testmode 1
[   20.161447] ath10k_pci 0000:01:00.0: firmware ver 10.2.4.70.67 api 5 features no-p2p,raw-mode,mfp,allows-mesh-bcast crc32 c7476231
[   20.161453] ath10k_pci 0000:05:00.0: firmware ver 10.2.4.70.67 api 5 features no-p2p,raw-mode,mfp,allows-mesh-bcast crc32 c7476231
[   20.224441] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/board-2.bin failed with error -2
[   20.264432] ath10k_pci 0000:01:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08
[   20.264438] ath10k_pci 0000:05:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08
[   21.534934] ath10k_pci 0000:05:00.0: htt-ver 2.1 wmi-op 5 htt-op 2 cal otp max-sta 128 raw 0 hwcrypto 1
[   21.536649] ath10k_pci 0000:01:00.0: htt-ver 2.1 wmi-op 5 htt-op 2 cal otp max-sta 128 raw 0 hwcrypto 1
[   25.789742] ath10k_pci 0000:05:00.0 rename6: renamed from wlan0
[   26.280873] ath10k_pci 0000:01:00.0 wlan0: renamed from wlan1
[   26.370574] ath10k_pci 0000:05:00.0 wlan1: renamed from rename6

After that, I have cards wlan0 and wlan1 available, one of which I use for 2,4GHz AP and the other for 5GHz AP. I have them both form a bridge and provide that with dual-stack wifi phy while keeping layer 2 and above uniform to the bridge.

Please note that you also need to be picky about the "interfaces wireless wlanX capabilities" config section. Please test what your card may support. I configured mine as follows:

vyos@vyos# show interfaces wireless wlan1
 bridge-group {
     bridge br0
 }
 capabilities {
     ht {
         40MHz-incapable false
         auto-powersave true
         channel-set-width ht20
         channel-set-width ht40+
         channel-set-width ht40-
         delayed-block-ack false
         dsss-cck-40 true
         greenfield false
         ldpc true
         lsig-protection false
         max-amsdu 7935
         short-gi 20
         short-gi 40
         stbc {
             rx 1
             tx true
         }
     }
     require-ht true
     require-vht false
     vht {
         antenna-count 2
         antenna-pattern-fixed true
         center-channel-freq {
             freq-1 42
         }
         channel-set-width 1
         ldpc true
         link-adaptation both
         max-mpdu 11454
         max-mpdu-exp 3
         short-gi 80
         stbc {
             rx 1
             tx true
         }
         tx-powersave false
         vht-cf false
     }
 }
 channel 36
 debug disable
 description "5GHz AP"
 expunge-failing-stations false
 hw-id 04:f0:21:XX:XX:XX
 isolate-stations true
 max-stations 16
 mgmt-frame-protection disabled
 mode ac
 security {
     wpa {
         cipher CCMP
         mode wpa2
         passphrase XXXXXXXXXXXXX
     }
 }
 ssid my-accesspoint.ac
 type access-point
[edit]
vyos@vyos#

Did this answer help you?

Best regards,
Al

syncer triaged this task as Low priority.Sep 1 2018, 3:00 PM
zsdc changed the task status from Open to Needs testing.Mar 11 2021, 5:28 PM
zsdc changed Difficulty level from Unknown (require assessment) to Normal (likely a few hours).
zsdc set Is it a breaking change? to Unspecified (possibly destroys the router).

Closing as invalid as the error was towards aarch64 which is yet not supported by VyOS.

Also I could not see this error the last time I ran my Compex Card using the following chipset: 05:00.0 Network controller: Qualcomm Atheros QCA986x/988x 802.11ac Wireless Network Adapter on VyOS 1.3.0-rc5

[email protected]# show interfaces wireless
 wireless wlan0 {
     country-code de
     hw-id 04:f0:21:54:2f:c3
     mode a
     physical-device phy0
     ssid VyOS
     type access-point
 }

Renders

[email protected]# cat /run/hostapd/wlan0.conf
### Autogenerated by interfaces-wireless.py ###

# AP netdevice name (without 'ap' postfix, i.e., wlan0 uses wlan0ap for
# management frames with the Host AP driver); wlan0 with many nl80211 drivers
# Note: This attribute can be overridden by the values supplied with the '-i'
# command line parameter.
interface=wlan0


# Driver interface type (hostap/wired/none/nl80211/bsd);
# default: hostap). nl80211 is used with all Linux mac80211 drivers.
# Use driver=none if building hostapd as a standalone RADIUS server that does
# not control any wireless/wired driver.
driver=nl80211

# Levels (minimum value for logged events):
#  0 = verbose debugging
#  1 = debugging
#  2 = informational messages
#  3 = notification
#  4 = warning
logger_syslog=-1
logger_syslog_level=0
logger_stdout=-1
logger_stdout_level=0

# Country code (ISO/IEC 3166-1). Used to set regulatory domain.
# Set as needed to indicate country in which device is operating.
# This can limit available channels and transmit power.
country_code=DE

# Enable IEEE 802.11d. This advertises the country_code and the set of allowed
# channels and transmit power levels based on the regulatory limits. The
# country_code setting must be configured with the correct country for
# IEEE 802.11d functions.
ieee80211d=1

# SSID to be used in IEEE 802.11 management frames
ssid=GEF

# Channel number (IEEE 802.11)
# (default: 0, i.e., not set)
# Please note that some drivers do not use this value from hostapd and the
# channel will need to be configured separately with iwconfig.
channel=0

# Operation mode (a = IEEE 802.11a (5 GHz), b = IEEE 802.11b (2.4 GHz),
# g = IEEE 802.11g (2.4 GHz), ad = IEEE 802.11ad (60 GHz); a/g options are used
# with IEEE 802.11n (HT), too, to specify band). For IEEE 802.11ac (VHT), this
# needs to be set to hw_mode a. For IEEE 802.11ax (HE) on 6 GHz this needs
# to be set to hw_mode a. When using ACS (see channel parameter), a
# special value "any" can be used to indicate that any support band can be used.
# This special case is currently supported only with drivers with which
# offloaded ACS is used.
hw_mode=a

# ieee80211w: Whether management frame protection (MFP) is enabled
# 0 = disabled (default)
# 1 = optional
# 2 = required


# Required for full HT and VHT functionality
wme_enabled=1




# ieee80211n: Whether IEEE 802.11n (HT) is enabled
# 0 = disabled (default)
# 1 = enabled
# Note: You will also need to enable WMM for full HT functionality.
# Note: hw_mode=g (2.4 GHz) and hw_mode=a (5 GHz) is used to specify the band.
ieee80211n=0


# Station MAC address -based authentication
# Please note that this kind of access control requires a driver that uses
# hostapd to take care of management frame processing and as such, this can be
# used with driver=hostap or driver=nl80211, but not with driver=atheros.
# 0 = accept unless in deny list
# 1 = deny unless in accept list
# 2 = use external RADIUS server (accept/deny lists are searched first)
macaddr_acl=0







# TX queue parameters (EDCF / bursting)
# tx_queue_<queue name>_<param>
# queues: data0, data1, data2, data3
#               (data0 is the highest priority queue)
# parameters:
#   aifs: AIFS (default 2)
#   cwmin: cwMin (1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191,
#          16383, 32767)
#   cwmax: cwMax (same values as cwMin, cwMax >= cwMin)
#   burst: maximum length (in milliseconds with precision of up to 0.1 ms) for
#          bursting
#
# Default WMM parameters (IEEE 802.11 draft; 11-03-0504-03-000e):
# These parameters are used by the access point when transmitting frames
# to the clients.
#
# Low priority / AC_BK = background
tx_queue_data3_aifs=7
tx_queue_data3_cwmin=15
tx_queue_data3_cwmax=1023
tx_queue_data3_burst=0
# Note: for IEEE 802.11b mode: cWmin=31 cWmax=1023 burst=0
#
# Normal priority / AC_BE = best effort
tx_queue_data2_aifs=3
tx_queue_data2_cwmin=15
tx_queue_data2_cwmax=63
tx_queue_data2_burst=0
# Note: for IEEE 802.11b mode: cWmin=31 cWmax=127 burst=0
#
# High priority / AC_VI = video
tx_queue_data1_aifs=1
tx_queue_data1_cwmin=7
tx_queue_data1_cwmax=15
tx_queue_data1_burst=3.0
# Note: for IEEE 802.11b mode: cWmin=15 cWmax=31 burst=6.0
#
# Highest priority / AC_VO = voice
tx_queue_data0_aifs=1
tx_queue_data0_cwmin=3
tx_queue_data0_cwmax=7
tx_queue_data0_burst=1.5

# Default WMM parameters (IEEE 802.11 draft; 11-03-0504-03-000e):
# for 802.11a or 802.11g networks
# These parameters are sent to WMM clients when they associate.
# The parameters will be used by WMM clients for frames transmitted to the
# access point.
#
# note - txop_limit is in units of 32microseconds
# note - acm is admission control mandatory flag. 0 = admission control not
# required, 1 = mandatory
# note - Here cwMin and cmMax are in exponent form. The actual cw value used
# will be (2^n)-1 where n is the value given here. The allowed range for these
# wmm_ac_??_{cwmin,cwmax} is 0..15 with cwmax >= cwmin.
#
wmm_enabled=1

# Low priority / AC_BK = background
wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0
# Note: for IEEE 802.11b mode: cWmin=5 cWmax=10
#
# Normal priority / AC_BE = best effort
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=4
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0
# Note: for IEEE 802.11b mode: cWmin=5 cWmax=7
#
# High priority / AC_VI = video
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmax=4
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0
# Note: for IEEE 802.11b mode: cWmin=4 cWmax=5 txop_limit=188
#
# Highest priority / AC_VO = voice
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47
wmm_ac_vo_acm=0
dmbaturin set Issue type to Unspecified (please specify).