morrownr / USB-WiFi

USB WiFi Adapter Information for Linux
2.4k stars 161 forks source link

Issue with hostapd config AWUS036AXM #463

Open tiix95 opened 4 days ago

tiix95 commented 4 days ago

Checklist

uname

Linux xwing 6.6.31+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.31-1+rpt1 (2024-05-29) aarch64 GNU/Linux

lsusb

Bus 002 Device 002: ID 0e8d:7961 MediaTek Inc. Wireless_Device

rfkill

1: hci1: Bluetooth Soft blocked: no Hard blocked: no 2: phy0: Wireless LAN Soft blocked: no Hard blocked: no 3: hci0: Bluetooth Soft blocked: no Hard blocked: no 4: phy1: Wireless LAN Soft blocked: no Hard blocked: no

dkms

N/A

iw

phy#1
    Interface wifi-alfa
        ifindex 5
        wdev 0x100000001
        addr 00:c0:ca:b5:61:17
        type managed
        txpower 3.00 dBm
        multicast TXQ:
            qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes    tx-packets
            0   0   0   0   0   0   0   0       0
phy#0
    Interface wifi-board
        ifindex 4
        wdev 0x1
        addr dc:a6:32:1c:f1:fa
        type managed
        channel 34 (5170 MHz), width: 20 MHz, center1: 5170 MHz
[0] 15:44:12 root @ xwing /etc/hostapd #

What happened?

Hello,

I can't manage to make hostapd start with your hostapd-Wifi6e.conf file (also tried wifi6 and 5) using brand new AWUS036AXM on a raspberry pi 4B. Here is the output :

[1] 15:45:52 root @ xwing /etc/hostapd # hostapd  -d -P /run/hostapd.pid /etc/hostapd/6e.conf
random: getrandom() support available
Configuration file: /etc/hostapd/6e.conf
ctrl_interface_group=0
nl80211: TDLS supported
nl80211: TDLS external setup
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-0f-ac:10
nl80211: Supported cipher 00-0f-ac:8
nl80211: Supported cipher 00-0f-ac:9
nl80211: Supported cipher 00-0f-ac:6
nl80211: Supported cipher 00-0f-ac:13
nl80211: Supported cipher 00-0f-ac:11
nl80211: Supported cipher 00-0f-ac:12
nl80211: Using driver-based off-channel TX
nl80211: Driver-advertised extended capabilities (default) - hexdump(len=8): 00 00 00 00 00 00 00 40
nl80211: Driver-advertised extended capabilities mask (default) - hexdump(len=8): 00 00 00 00 00 00 00 40
nl80211: Use separate P2P group interface (driver advertised support)
nl80211: Enable multi-channel concurrent (driver advertised support)
nl80211: key_mgmt=0x1ff0f enc=0xfef auth=0x7 flags=0x24003d10d35bfbe0 rrm_flags=0x30 probe_resp_offloads=0x0 max_stations=0 max_remain_on_chan=5000 max_scan_ssids=4
nl80211: interface wifi-alfa in phy phy1
nl80211: Set mode ifindex 5 iftype 3 (AP)
nl80211: Setup AP(wifi-alfa) - device_ap_sme=0 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x55be8ca710
nl80211: Register frame type=0xb0 (WLAN_FC_STYPE_AUTH) nl_handle=0x55be8ca710 match= multicast=0
nl80211: Register frame type=0x0 (WLAN_FC_STYPE_ASSOC_REQ) nl_handle=0x55be8ca710 match= multicast=0
nl80211: Register frame type=0x20 (WLAN_FC_STYPE_REASSOC_REQ) nl_handle=0x55be8ca710 match= multicast=0
nl80211: Register frame type=0xa0 (WLAN_FC_STYPE_DISASSOC) nl_handle=0x55be8ca710 match= multicast=0
nl80211: Register frame type=0xc0 (WLAN_FC_STYPE_DEAUTH) nl_handle=0x55be8ca710 match= multicast=0
nl80211: Register frame type=0x40 (WLAN_FC_STYPE_PROBE_REQ) nl_handle=0x55be8ca710 match= multicast=0
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55be8ca710 match=04 multicast=0
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55be8ca710 match=0501 multicast=0
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55be8ca710 match=0503 multicast=0
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55be8ca710 match=0504 multicast=0
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55be8ca710 match=06 multicast=0
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55be8ca710 match=08 multicast=0
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55be8ca710 match=09 multicast=0
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55be8ca710 match=0a multicast=0
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55be8ca710 match=11 multicast=0
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55be8ca710 match=12 multicast=0
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x55be8ca710 match=7f multicast=0
rfkill: initial event: idx=4 type=1 op=0 soft=0 hard=0
nl80211: Add own interface ifindex 3 (ifidx_reason 5)
nl80211: if_indices[16]: 3(5)
nl80211: Add own interface ifindex 5 (ifidx_reason -1)
nl80211: if_indices[16]: 3(5) 5(-1)
nl80211: Adding interface wifi-alfa into bridge br0
nl80211: Do not open EAPOL RX socket - using control port for RX
phy: phy1
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
wifi-alfa: interface state UNINITIALIZED->COUNTRY_UPDATE
Previous country code FR, new country code FRI
nl80211: Regulatory information - country=FR (DFS-ETSI)
nl80211: 2400-2483 @ 40 MHz 20 mBm
nl80211: 5150-5250 @ 80 MHz 23 mBm (no outdoor)
nl80211: 5250-5350 @ 80 MHz 20 mBm (no outdoor) (DFS)
nl80211: 5470-5725 @ 160 MHz 26 mBm (DFS)
nl80211: 5725-5875 @ 80 MHz 13 mBm
nl80211: 5945-6425 @ 160 MHz 23 mBm (no outdoor)
nl80211: 57000-71000 @ 2160 MHz 40 mBm
nl80211: Added 802.11b mode based on 802.11g information
nl80211: Mode IEEE 802.11g: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472 2484[DISABLED][NO_IR]
nl80211: Mode IEEE 802.11a: 5180 5200 5220 5240 5260[RADAR] 5280[RADAR] 5300[RADAR] 5320[RADAR] 5500[RADAR] 5520[RADAR] 5540[RADAR] 5560[RADAR] 5580[RADAR] 5600[RADAR] 5620[RADAR] 5640[RADAR] 5660[RADAR] 5680[RADAR]
nl80211: Mode IEEE 802.11a: 5955 5975 5995 6015 6035 6055 6075 6095 6115 6135 6155 6175 6195 6215 6235 6255 6275 6295 6315 6335 6355 6375 6395 6415 6435[DISABLED][NO_IR] 6455[DISABLED][NO_IR] 6475[DISABLED][NO_IR]
nl80211: Mode IEEE 802.11b: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472 2484[DISABLED][NO_IR]
DFS support is enabled
Completing interface initialization
Mode: IEEE 802.11a  Channel: 37  Frequency: 6135 MHz
nl80211: Set freq 6135 (ht_enabled=0, vht_enabled=0, he_enabled=1, bandwidth=80 MHz, cf1=6145 MHz, cf2=0 MHz)
  * freq=6135
  * he_enabled=1
  * vht_enabled=0
  * ht_enabled=0
  * bandwidth=80
  * channel_width=3
  * center_freq1=6145
  * center_freq2=0
RATE[0] rate=60 flags=0x1
RATE[1] rate=90 flags=0x0
RATE[2] rate=120 flags=0x1
RATE[3] rate=180 flags=0x0
RATE[4] rate=240 flags=0x1
RATE[5] rate=360 flags=0x0
RATE[6] rate=480 flags=0x0
RATE[7] rate=540 flags=0x0
hostapd_setup_bss(hapd=0x55be8cb5a0 (wifi-alfa), first=1)
nl80211: flush -> DEL_STATION wifi-alfa (all)
Using interface wifi-alfa with hwaddr 00:c0:ca:b5:61:17 and ssid "xwing"
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=5):
     78 77 69 6e 67                                    xwing           
PSK (ASCII passphrase) - hexdump_ascii(len=14): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
random: Got 20/20 random bytes
GMK - hexdump(len=32): [REMOVED]
Key Counter - hexdump(len=32): [REMOVED]
WPA: Delay group state machine start until Beacon frames have been configured
HE: MU EDCA Parameter Set element - hexdump(len=13): 00 08 00 00 00 00 00 00 00 00 00 a9 00
HE: MU EDCA Parameter Set element - hexdump(len=13): 00 08 00 00 00 00 00 00 00 00 00 a9 00
nl80211: Set beacon (beacon_set=0)
nl80211: Beacon head - hexdump(len=56): 80 00 00 00 ff ff ff ff ff ff 00 c0 ca b5 61 17 00 c0 ca b5 61 17 00 00 00 00 00 00 00 00 00 00 64 00 11 00 00 05 78 77 69 6e 67 01 08 8c 12 98 24 b0 48 60 6c 03 01 25
nl80211: Beacon tail - hexdump(len=145): 07 06 46 52 49 01 18 17 30 18 01 00 00 0f ac 04 02 00 00 0f ac 0a 00 0f ac 04 01 00 00 0f ac 08 cc 00 3b 02 85 00 7f 08 04 00 00 02 00 00 00 40 c3 04 02 2e 2e 2e ff 1c 23 01 00 08 1a 44 10 04 20 ce 12 00 00 a0 00 00 0c 00 fa ff fa ff 39 1c c7 71 1c 07 ff 0c 24 f4 3f 02 00 fc ff 25 02 27 00 06 ff 0e 26 00 08 00 00 00 00 00 00 00 00 00 a9 00 ff 03 3b b8 36 dd 18 00 50 f2 02 01 01 01 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00
nl80211: ifindex=5
nl80211: beacon_int=100
nl80211: beacon_rate=0
nl80211: rate_type=0
nl80211: dtim_period=2
nl80211: ssid=xwing
  * beacon_int=100
  * dtim_period=2
nl80211: hidden SSID not in use
nl80211: privacy=2
nl80211: auth_algs=0x3
nl80211: wpa_version=0x2
nl80211: key_mgmt_suites=0x400
nl80211: pairwise_ciphers=0x210
nl80211: group_cipher=0x10
nl80211: beacon_ies - hexdump(len=10): 7f 08 04 00 00 02 00 00 00 40
nl80211: proberesp_ies - hexdump(len=10): 7f 08 04 00 00 02 00 00 00 40
nl80211: assocresp_ies - hexdump(len=10): 7f 08 04 00 00 02 00 00 00 40
nl802111: sae_pwe=0
nl80211: kernel reports: integer out of range
nl80211: Beacon set failed: -34 (Numerical result out of range)
Failed to set beacon parameters
wifi-alfa: Flushing old station entries
nl80211: flush -> DEL_STATION wifi-alfa (all)
wifi-alfa: Deauthenticate all stations
nl80211: send_mlme - da=ff:ff:ff:ff:ff:ff noack=0 freq=0 no_cck=0 offchanok=0 wait_time=0 no_encrypt=0 fc=0xc0 (WLAN_FC_STYPE_DEAUTH) nlmode=3
nl80211: send_mlme - Use bss->freq=6135
nl80211: send_mlme -> send_frame_cmd
nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=6135 wait=0)
wpa_driver_nl80211_set_key: ifindex=5 (wifi-alfa) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0 key_flag=0x10
nl80211: DEL_KEY
   broadcast key
wpa_driver_nl80211_set_key: ifindex=5 (wifi-alfa) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0 key_flag=0x10
nl80211: DEL_KEY
   broadcast key
wpa_driver_nl80211_set_key: ifindex=5 (wifi-alfa) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0 key_flag=0x10
nl80211: DEL_KEY
   broadcast key
wpa_driver_nl80211_set_key: ifindex=5 (wifi-alfa) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0 key_flag=0x10
nl80211: DEL_KEY
   broadcast key
wpa_driver_nl80211_set_key: ifindex=5 (wifi-alfa) alg=0 addr=(nil) key_idx=4 set_tx=0 seq_len=0 key_len=0 key_flag=0x10
nl80211: DEL_KEY
   broadcast key
wpa_driver_nl80211_set_key: ifindex=5 (wifi-alfa) alg=0 addr=(nil) key_idx=5 set_tx=0 seq_len=0 key_len=0 key_flag=0x10
nl80211: DEL_KEY
   broadcast key
hostapd_free_hapd_data(wifi-alfa)
Interface initialization failed
wifi-alfa: interface state COUNTRY_UPDATE->DISABLED
wifi-alfa: AP-DISABLED 
wifi-alfa: Unable to setup interface.
hostapd_interface_deinit_free(0x55be8c8600)
hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
hostapd_interface_deinit(0x55be8c8600)
wifi-alfa: interface state DISABLED->DISABLED
hostapd_bss_deinit: deinit bss wifi-alfa
wifi-alfa: Deauthenticate all stations
nl80211: send_mlme - da=ff:ff:ff:ff:ff:ff noack=0 freq=0 no_cck=0 offchanok=0 wait_time=0 no_encrypt=0 fc=0xc0 (WLAN_FC_STYPE_DEAUTH) nlmode=3
nl80211: send_mlme - Use bss->freq=6135
nl80211: send_mlme -> send_frame_cmd
nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=6135 wait=0)
wifi-alfa: AP-DISABLED 
hostapd_cleanup(hapd=0x55be8cb5a0 (wifi-alfa))
wifi-alfa: CTRL-EVENT-TERMINATING 
hostapd_free_hapd_data: Interface wifi-alfa wasn't started
hostapd_interface_deinit_free: driver=0x559029e5a0 drv_priv=0x55be8cde30 -> hapd_deinit
nl80211: deinit ifname=wifi-alfa disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
nl80211: Remove beacon (ifindex=5)
netlink: Operstate: ifindex=5 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211: Set mode ifindex 5 iftype 2 (STATION)
nl80211: Teardown AP(wifi-alfa) - device_ap_sme=0 use_monitor=0
nl80211: Unsubscribe mgmt frames handle 0x888888dd36042f99 (AP teardown)
hostapd_interface_free(0x55be8c8600)
hostapd_interface_free: free hapd 0x55be8cb5a0
hostapd_cleanup_iface(0x55be8c8600)
hostapd_cleanup_iface_partial(0x55be8c8600)
hostapd_cleanup_iface: free iface=0x55be8c8600

Here is the configuration :

cat 6e.conf| grep -ve '^#'

ssid=pi
wpa_passphrase=REDACTED
hw_mode=a
channel=37
chanlist=37
op_class=133
country_code=FR
country3=0x49
ieee80211d=1
ieee80211h=1

bridge=br0
interface=wifi-alfa

driver=nl80211

logger_syslog=1
logger_syslog_level=2

ctrl_interface=/var/run/hostapd
ctrl_interface_group=0

beacon_int=100
tx_queue_data2_burst=2.0

auth_algs=3
macaddr_acl=0
ignore_broadcast_ssid=0
okc=1
wpa=2
wpa_pairwise=CCMP CCMP-256
wpa_key_mgmt=SAE
ieee80211w=2

ieee80211n=1
wmm_enabled=1
ht_capab=[LDPC][HT40+][HT40-][GF][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1]

ieee80211ac=1
vht_oper_chwidth=1
vht_oper_centr_freq_seg0_idx=39
vht_capab=[RXLDPC][SHORT-GI-80][TX-STBC-2BY1][RX-STBC-1][MAX-A-MPDU-LEN-EXP3][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN]

ieee80211ax=1
he_oper_chwidth=1
he_oper_centr_freq_seg0_idx=39
he_bss_color=128
he_default_pe_duration=4
he_rts_threshold=1023
he_mu_edca_qos_info_param_count=0
he_mu_edca_qos_info_q_ack=0
he_mu_edca_qos_info_queue_request=0
he_mu_edca_qos_info_txop_request=0
he_mu_edca_ac_be_aifsn=8
he_mu_edca_ac_be_aci=0
he_mu_edca_ac_vo_ecwmin=9
he_mu_edca_ac_vo_ecwmax=10

Could you please help ? I can be available for more tests.

Thanks a lot, for this and for all your git, this is amazing job !

morrownr commented 3 days ago

I can't manage to make hostapd start with your hostapd-Wifi6e.conf file...

I recommend that you stick with hostapd-Wifi6.conf for now. Using it for WiFi 6 on the 5 GHz band is well tested at this point. Notice that hostapd-Wifi6e.conf shows alpha for status. I have not had time to investigate why I had problems with the 6 GHz band but I think it has to do with some capabilities of the wifi stack and maybe hostapd that needed to be put in place. Users have reported that 6 GHz band is working in some countries such as DE and FR. The rest of the EU is probably working also. It really seems to be related to the country.

If you have time, it would be nice to have a review on the AXM.

tiix95 commented 2 days ago

Hi,

I will try with Wifi6 configuration more deeply and update here, thanks. I did not see the alpha status for Wifi6e.

I'd be glad to help with a review on the AXM, could you please tell me which kind of tests will be helpful for you ?

All I can say for now is that it is really plug-and play, tested on Linux debian 12 (kernel 6.1.20) and on a raspberry pi 4 (latest stable kernel on raspbian). Also, tell me where you want me to put the review if not in this issue :)