I am having trouble getting ad-hoc to work on a Raspberry Pi CM4 board with an Intel(R) Wi-Fi 6 AX200 adapter. I built openwrt-22.03.0-rc5
and added/enabled these packages: pciutils kmod-iwlwifi luci wpa-cli iwlwifi-firmware-ax200 iwlwifi-firmware-ax210 which enabled me to successfully configure client mode and connect to a Nighthawk AX12 WiFi 6 Router in the 5GHz band (AX mode).
As great as that was, I am more interested in getting ad-hoc (5GHz AX mode) working.
iwlwifi messages from the system log:
Summary
[ 7.072942] Intel(R) Wireless WiFi driver for Linux
[ 7.077959] iwlwifi 0000:04:00.0: enabling device (0000 -> 0002)
[ 7.105922] iwlwifi 0000:04:00.0: api flags index 2 larger than supported by driver
[ 7.113679] iwlwifi 0000:04:00.0: TLV_FW_FSEQ_VERSION: FSEQ Version: 89.3.35.37
[ 7.122811] iwlwifi 0000:04:00.0: loaded firmware version 66.f1c864e0.0 cc-a0-66.ucode op_mode iwlmvm
[ 7.151030] iwlwifi 0000:04:00.0: Detected Intel(R) Wi-Fi 6 AX200 160MHz, REV=0x340
[ 7.160255] PPP generic driver version 2.4.2
[ 7.165128] NET: Registered protocol family 24
[ 7.167239] thermal thermal_zone1: failed to read out thermal zone (-61)
[ 7.176663] usbcore: registered new interface driver brcmfmac
[ 7.300397] iwlwifi 0000:04:00.0: Detected RF HR B3, rfid=0x10a100
[ 7.370800] iwlwifi 0000:04:00.0: base HW address: 70:a6:cc:ce:f1:35
[ 7.400037] kmodloader: done loading kernel modules from /etc/modules.d/*
In the LuCI web interface, under Interface Configuration >> General Setup, I changed the mode from Client to Ad-Hoc and added a BSSID. I also selected WPA2-PSK, Force CCMP, and added a key on the security tab.
After saving changes and enabling the interface, best I can tell, based on the system log, wpa_supplicant repeatedly attempts to and fails to “Join IBSS”. I turned on debug output for wpa_supplicant in the hope that I would get more specific info as to what it does not like.
There is one error in particular that alludes to an invalid argument that I have not been able to figure out:
daemon.debug wpa_supplicant[737]: nl80211: Join IBSS failed: ret=-22 (Invalid argument)
This is followed by (and I suspect the above error is the cause of):
daemon.notice wpa_supplicant[737]: wlan0: Association request to the driver failed
Any help pointing out what may be obvious to some of you is appreciated.
I will post the repeating section of the system log below:
Summary
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: radio_work_free('connect'@0x7f84c37780): num_active_works --> 0
Fri Jul 15 16:04:36 2022 daemon.notice wpa_supplicant[737]: BSSID 00:00:00:00:00:00 ignore list count incremented to 2, ignoring for 10 seconds
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: Consecutive connection failures: 2 --> request scan in 500 ms
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: Setting scan request: 0.500000 sec
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: State: ASSOCIATING -> DISCONNECTED
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Set wlan0 operstate 0->0 (DORMANT)
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: netlink: Operstate: ifindex=6 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: State: DISCONNECTED -> SCANNING
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: Re-association to the same ESS
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: No ongoing scan/p2p-scan found to abort
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: Add radio work 'connect'@0x7f84c378a0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: First radio work item in the queue - schedule start immediately
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: Starting radio work 'connect'@0x7f84c378a0 after 0.000047 second wait
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: WPA: clearing own WPA/RSN IE
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: RSN: clearing own RSNXE
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: WPA: No WPA/RSN IE available from association info
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: WPA: Set cipher suites based on configuration
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: WPA: Selected cipher suites: group 24 pairwise 24 key_mgmt 2 proto 2
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: WPA: Selected mgmt group cipher 32
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: WPA: clearing AP WPA IE
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: WPA: clearing AP RSN IE
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: WPA: clearing AP RSNXE
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: WPA: AP group 0x18 network profile group 0x18; available group 0x18
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: WPA: using GTK CCMP
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: WPA: AP pairwise 0x18 network profile pairwise 0x18; available pairwise 0x18
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: WPA: using PTK CCMP
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: WPA: AP key_mgmt 0x2 network profile key_mgmt 0x2; available key_mgmt 0x2
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: WPA: using KEY_MGMT WPA-PSK
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: WPA: AP mgmt_group_cipher 0x20 network profile mgmt_group_cipher 0x0; available mgmt_group_cipher 0x0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: WPA: not using MGMT group cipher
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: RSN: Set own RSNXE default - hexdump(len=0):
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: PSK (set in config) - hexdump(len=32): [REMOVED]
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: WPA: Set PMK based on external data - hexdump(len=32): [REMOVED]
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: Automatic auth_alg selection: 0x1
Fri Jul 15 16:04:36 2022 daemon.notice wpa_supplicant[737]: wlan0: Trying to associate with SSID 'OpenWrt'
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: Cancelling scan request
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: State: SCANNING -> ASSOCIATING
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Set wlan0 operstate 0->0 (DORMANT)
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: netlink: Operstate: ifindex=6 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: IBSS/mesh: setup freq channel 52, sec_channel_offset 0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: IBSS: VHT setup freq cf1 5260, cf2 0, bw 20
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: wlan0: set_disable_ht40: 1
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Join IBSS (ifindex=6)
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Set mode ifindex 6 iftype 1 (ADHOC)
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Unsubscribe mgmt frames handle 0x7f0c5999f9 (mode change)
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Subscribe to mgmt frames with non-AP handle 0x7f84d11130
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Register frame type=0xb0 (WLAN_FC_STYPE_AUTH) nl_handle=0x7f84d11130 match= multicast=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7f84d11130 match=0104 multicast=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7f84d11130 match=040a multicast=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7f84d11130 match=040b multicast=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7f84d11130 match=040c multicast=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7f84d11130 match=040d multicast=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7f84d11130 match=090a multicast=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7f84d11130 match=090b multicast=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7f84d11130 match=090c multicast=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7f84d11130 match=090d multicast=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7f84d11130 match=0801 multicast=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7f84d11130 match=06 multicast=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7f84d11130 match=0a07 multicast=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7f84d11130 match=0a11 multicast=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7f84d11130 match=0a0b multicast=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7f84d11130 match=0a1a multicast=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7f84d11130 match=1101 multicast=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7f84d11130 match=1102 multicast=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7f84d11130 match=0505 multicast=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7f84d11130 match=0500 multicast=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7f84d11130 match=0502 multicast=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7f84d11130 match=1301 multicast=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7f84d11130 match=1305 multicast=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7f84d11130 match=7e506f9a1a multicast=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: * SSID=OpenWrt
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: * freq=5260
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: * he_enabled=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: * vht_enabled=1
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: * ht_enabled=1
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: * bandwidth=20
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: * channel_width=1
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: * center_freq1=5260
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: * center_freq2=0
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: * beacon_int=100
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: * fixed_freq
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: * beacon_int=100
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: * BSSID=f8:d1:11:52:0c:4e
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: * fixed_freq
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: * control port
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: * Extra IEs for Beacon/Probe Response frames - hexdump(len=35): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00 7f 0b 04 00 4a 02 01 00 40 40 00 01 20
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: * htcaps - hexdump(len=26): 61 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: * htcaps_mask - hexdump(len=26): 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: * vhtcaps - hexdump(len=12): 00 00 00 00 00 00 00 00 00 00 00 00
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: * vhtcaps_mask - hexdump(len=12): 00 00 00 00 00 00 00 00 00 00 00 00
Fri Jul 15 16:04:36 2022 daemon.debug wpa_supplicant[737]: nl80211: Join IBSS failed: ret=-22 (Invalid argument)
Fri Jul 15 16:04:36 2022 daemon.notice wpa_supplicant[737]: wlan0: Association request to the driver failed