Skip to content

[BUG]: v2 crashes on MTK 6E with 11be #243

@joshschmelzle

Description

@joshschmelzle

What happened?

On the M4 with MTK 6E, v2 crashes because the hardware doesn't support 11be.

Relevant log output

wlanpi@wlanpi-3fc:~ $ sudo profiler --expert --debug
2026-02-05 21:24:25,063 [DEBUG] start: Environment: {"profiler": {"version": "2.0.0"}, "python": {"version": "3.9.2", "implementation": "CPython", "compiler": "GCC 10.2.1 20210110", "build": ["default", "Jan 25 2026 13:37:52"], "executable": "/opt/wlanpi-profiler/bin/python"}, "system": {"platform": "Linux", "release": "6.12.13-v8-wlanpi+", "version": "#1 SMP PREEMPT Fri Feb 14 07:48:47 UTC 2025", "architecture": "aarch64", "processor": "Cortex-A72", "cpu_count": 4}, "runtime": {"timestamp": "2026-02-05T21:24:25.059651", "utc_offset": "-0600"}, "dependencies": {"scapy": "2.7.0"}}
2026-02-05 21:24:25,064 [INFO] start: Profiler v2.0.0 | Python 3.9.2 | Linux aarch64
2026-02-05 21:24:25,065 [DEBUG] start: Arguments: {'command': None, 'pytest': False, 'channel': None, 'frequency': None, 'interface': None, 'ssid': None, 'passphrase': None, 'config': '/etc/wlanpi-profiler/config.ini', 'files_path': None, 'hostname_ssid': False, 'debug': True, 'expert': True, 'no_interface_prep': False, 'listen_only': False, 'ft_enabled': False, 'ft_disabled': False, 'security_mode': None, 'he_enabled': False, 'he_disabled': False, 'be_enabled': False, 'be_disabled': False, 'profiler_tlv_disabled': False, 'clean': False, 'files': False, 'yes': False, 'oui_update': False, 'pcap_analysis': None, 'no_bpf_filters': False, 'list_interfaces': False, 'ap_mode': False, 'fakeap': False, 'hostapd_config': None}
2026-02-05 21:24:25,086 [INFO] get_app_data_paths: Using files_path from config file: /var/www/html/profiler
2026-02-05 21:24:25,100 [DEBUG] start: profiler.manager pid 91802
2026-02-05 21:24:25,104 [DEBUG] verify_reporting_directories: Verified directory structure: /var/www/html/profiler
2026-02-05 21:24:25,105 [DEBUG] start: config {'GENERAL': {'channel': 36, 'interface': 'wlan0', 'ssid': 'Profiler 3fc', 'passphrase': 'profiler', 'security_mode': 'ft-wpa3-mixed', 'ft_disabled': False, 'he_disabled': False, 'be_disabled': False, 'profiler_tlv_disabled': False, 'listen_only': False, 'hostname_ssid': False, 'files_path': [PosixPath('/var/www/html/profiler')], 'debug': True, 'frequency': 0, 'expert': True, 'ap_mode': True, 'fakeap': False}}
2026-02-05 21:24:27,163 [DEBUG] interface: wlan0 has a mac80211 stack
2026-02-05 21:24:27,164 [DEBUG] interface: phy0 maps to provided wlan0
2026-02-05 21:24:27,164 [DEBUG] interface: new wlan0profiler will map to phy0
2026-02-05 21:24:27,164 [DEBUG] interface: frequency is set to 5180 which maps to channel 36
2026-02-05 21:24:27,225 [DEBUG] interface: reg domain set to country US: DFS-FCC
2026-02-05 21:24:27,226 [DEBUG] interface: see 'iw reg get' for details
2026-02-05 21:24:27,226 [DEBUG] interface: mac: d8:80:83:2c:87:ef, channel: 36, driver: mt7921e, driver-version: 6.12.13-v8-wlanpi+, chipset: MEDIATEK MT7922 802.11ax PCI Express Wireless Network Adapter
2026-02-05 21:24:27,226 [DEBUG] start: Staging interface for hostapd AP mode
2026-02-05 21:24:27,226 [DEBUG] interface: start stage_interface_hostapd
2026-02-05 21:24:27,226 [DEBUG] interface: run: ip link set wlan0 down
2026-02-05 21:24:27,300 [DEBUG] interface: run: iw dev wlan0 set type managed
2026-02-05 21:24:27,315 [DEBUG] interface: run: ip link set wlan0 up
2026-02-05 21:24:27,350 [DEBUG] interface: run: iw wlan0 scan
2026-02-05 21:24:31,057 [DEBUG] interface: run: iw dev wlan0 set type __ap
2026-02-05 21:24:31,180 [DEBUG] interface: run: ip link set wlan0 up
2026-02-05 21:24:31,300 [DEBUG] interface: run: iw phy phy0 interface add wlan0profiler type monitor
2026-02-05 21:24:31,425 [DEBUG] interface: run: ip link set wlan0profiler up
2026-02-05 21:24:31,586 [DEBUG] interface: monitor interface wlan0profiler created (operstate: unknown)
2026-02-05 21:24:31,587 [DEBUG] interface: finish stage_interface_hostapd
2026-02-05 21:24:31,587 [DEBUG] start: finish interface setup and staging for hostapd...
2026-02-05 21:24:31,627 [INFO] start: Detected country code: US
2026-02-05 21:24:31,627 [INFO] start: Starting in hostapd AP mode
2026-02-05 21:24:31,630 [DEBUG] start: Sniffer set to listen-only mode (hostapd handles all TX)
2026-02-05 21:24:31,632 [DEBUG] update_ssid_record: updated /run/wlanpi-profiler.ssid record with: Profiler 3fc
2026-02-05 21:24:31,755 [INFO] start: Generated hostapd config: /tmp/profiler_hostapd_91802.conf
2026-02-05 21:24:31,755 [DEBUG] start: Created ctrl_interface directory: /run/wlanpi-profiler/hostapd
2026-02-05 21:24:31,756 [INFO] start: Starting hostapd: /opt/wlanpi-profiler/bin/hostapd -d /tmp/profiler_hostapd_91802.conf
2026-02-05 21:24:31,769 [DEBUG] start: Started hostapd log streaming threads
2026-02-05 21:24:31,772 [DEBUG] start: [HOSTAPD] random: Trying to read entropy from /dev/random
2026-02-05 21:24:31,772 [DEBUG] start: [HOSTAPD] Configuration file: /tmp/profiler_hostapd_91802.conf
2026-02-05 21:24:31,773 [DEBUG] start: [HOSTAPD] ctrl_interface_group=0
2026-02-05 21:24:31,773 [DEBUG] start: [HOSTAPD] MLD: EMLSR support = 1
2026-02-05 21:24:31,773 [DEBUG] start: [HOSTAPD] MLD: EMLMR support = 1
2026-02-05 21:24:31,774 [DEBUG] start: [HOSTAPD] MLD: Max simultaneous links = 2
2026-02-05 21:24:31,774 [DEBUG] start: [HOSTAPD] MLD: Link ID override = 1
2026-02-05 21:24:31,774 [DEBUG] start: [HOSTAPD] MLD: Transition Timeout = 4 (bits 9-11 = 0x800)
2026-02-05 21:24:31,774 [DEBUG] start: [HOSTAPD] MLD: TID-To-Link Mapping Negotiation = 3 (bits 5-6 = 0x60)
2026-02-05 21:24:31,775 [DEBUG] start: [HOSTAPD] EHT: NSS override = 4
2026-02-05 21:24:31,775 [DEBUG] start: [HOSTAPD] AP MLD wlan0 created
2026-02-05 21:24:31,775 [DEBUG] start: [HOSTAPD] AP MLD: wlan0: Link ID 0 assigned.
2026-02-05 21:24:31,775 [DEBUG] start: [HOSTAPD] nl80211: Kernel version: Linux 6.12.13-v8-wlanpi+ (#1 SMP PREEMPT Fri Feb 14 07:48:47 UTC 2025; aarch64)
2026-02-05 21:24:31,775 [DEBUG] start: [HOSTAPD] nl80211: Maximum supported attribute ID: 332
2026-02-05 21:24:31,775 [DEBUG] start: [HOSTAPD] nl80211: Initialize interface wlan0 (driver: mt7921e)
2026-02-05 21:24:31,775 [DEBUG] start: [HOSTAPD] nl80211: TDLS supported
2026-02-05 21:24:31,775 [DEBUG] start: [HOSTAPD] nl80211: TDLS external setup
2026-02-05 21:24:31,775 [DEBUG] start: [HOSTAPD] nl80211: Supported cipher 00-0f-ac:1
2026-02-05 21:24:31,776 [DEBUG] start: [HOSTAPD] nl80211: Supported cipher 00-0f-ac:5
2026-02-05 21:24:31,776 [DEBUG] start: [HOSTAPD] nl80211: Supported cipher 00-0f-ac:2
2026-02-05 21:24:31,776 [DEBUG] start: [HOSTAPD] nl80211: Supported cipher 00-0f-ac:4
2026-02-05 21:24:31,776 [DEBUG] start: [HOSTAPD] nl80211: Supported cipher 00-0f-ac:10
2026-02-05 21:24:31,776 [DEBUG] start: [HOSTAPD] nl80211: Supported cipher 00-0f-ac:8
2026-02-05 21:24:31,776 [DEBUG] start: [HOSTAPD] nl80211: Supported cipher 00-0f-ac:9
2026-02-05 21:24:31,776 [DEBUG] start: [HOSTAPD] nl80211: Supported cipher 00-0f-ac:6
2026-02-05 21:24:31,776 [DEBUG] start: [HOSTAPD] nl80211: Supported cipher 00-0f-ac:13
2026-02-05 21:24:31,777 [DEBUG] start: [HOSTAPD] nl80211: Supported cipher 00-0f-ac:11
2026-02-05 21:24:31,777 [DEBUG] start: [HOSTAPD] nl80211: Supported cipher 00-0f-ac:12
2026-02-05 21:24:31,777 [DEBUG] start: [HOSTAPD] nl80211: Using driver-based off-channel TX
2026-02-05 21:24:31,777 [DEBUG] start: [HOSTAPD] nl80211: Driver-advertised extended capabilities (default) - hexdump(len=8): 00 00 00 00 00 00 00 40
2026-02-05 21:24:31,777 [DEBUG] start: [HOSTAPD] nl80211: Driver-advertised extended capabilities mask (default) - hexdump(len=8): 00 00 00 00 00 00 00 40
2026-02-05 21:24:31,777 [DEBUG] start: [HOSTAPD] nl80211: Use separate P2P group interface (driver advertised support)
2026-02-05 21:24:31,777 [DEBUG] start: [HOSTAPD] nl80211: Enable multi-channel concurrent (driver advertised support)
2026-02-05 21:24:31,777 [DEBUG] start: [HOSTAPD] nl80211: key_mgmt=0x1ff0f enc=0xfef auth=0x7 flags=0x24003d10d35bfbe0 flags2=0x123 rrm_flags=0x30 probe_resp_offloads=0x0 max_stations=0 max_remain_on_chan=5000 max_scan_ssids=4
2026-02-05 21:24:31,778 [DEBUG] start: [HOSTAPD] nl80211: interface wlan0 in phy phy0
2026-02-05 21:24:31,778 [DEBUG] start: [HOSTAPD] nl80211: Set mode ifindex 8 iftype 3 (AP)
2026-02-05 21:24:31,778 [ERROR] start: [HOSTAPD] nl80211: Failed to set interface 8 to mode 3: -16 (Device or resource busy)
2026-02-05 21:24:31,778 [DEBUG] start: [HOSTAPD] nl80211: Try mode change after setting interface down
2026-02-05 21:24:31,818 [DEBUG] start: [HOSTAPD] nl80211: Set mode ifindex 8 iftype 3 (AP)
2026-02-05 21:24:31,818 [DEBUG] start: [HOSTAPD] nl80211: Mode change succeeded while interface is down
2026-02-05 21:24:31,835 [DEBUG] start: [HOSTAPD] nl80211: Setup AP(wlan0) - device_ap_sme=0 use_monitor=0
2026-02-05 21:24:31,835 [DEBUG] start: [HOSTAPD] nl80211: Subscribe to mgmt frames with AP handle 0x559b281ea0
2026-02-05 21:24:31,836 [DEBUG] start: [HOSTAPD] nl80211: Register frame type=0xb0 (WLAN_FC_STYPE_AUTH) nl_handle=0x559b281ea0 match= multicast=0
2026-02-05 21:24:31,836 [DEBUG] start: [HOSTAPD] nl80211: Register frame type=0x0 (WLAN_FC_STYPE_ASSOC_REQ) nl_handle=0x559b281ea0 match= multicast=0
2026-02-05 21:24:31,837 [DEBUG] start: [HOSTAPD] nl80211: Register frame type=0x20 (WLAN_FC_STYPE_REASSOC_REQ) nl_handle=0x559b281ea0 match= multicast=0
2026-02-05 21:24:31,837 [DEBUG] start: [HOSTAPD] nl80211: Register frame type=0xa0 (WLAN_FC_STYPE_DISASSOC) nl_handle=0x559b281ea0 match= multicast=0
2026-02-05 21:24:31,837 [DEBUG] start: [HOSTAPD] nl80211: Register frame type=0xc0 (WLAN_FC_STYPE_DEAUTH) nl_handle=0x559b281ea0 match= multicast=0
2026-02-05 21:24:31,837 [DEBUG] start: [HOSTAPD] nl80211: Register frame type=0x40 (WLAN_FC_STYPE_PROBE_REQ) nl_handle=0x559b281ea0 match= multicast=0
2026-02-05 21:24:31,837 [DEBUG] start: [HOSTAPD] nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x559b281ea0 match=04 multicast=0
2026-02-05 21:24:31,837 [DEBUG] start: [HOSTAPD] nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x559b281ea0 match=0501 multicast=0
2026-02-05 21:24:31,837 [DEBUG] start: [HOSTAPD] nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x559b281ea0 match=0503 multicast=0
2026-02-05 21:24:31,837 [DEBUG] start: [HOSTAPD] nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x559b281ea0 match=0504 multicast=0
2026-02-05 21:24:31,838 [DEBUG] start: [HOSTAPD] nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x559b281ea0 match=06 multicast=0
2026-02-05 21:24:31,838 [DEBUG] start: [HOSTAPD] nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x559b281ea0 match=08 multicast=0
2026-02-05 21:24:31,838 [DEBUG] start: [HOSTAPD] nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x559b281ea0 match=09 multicast=0
2026-02-05 21:24:31,838 [DEBUG] start: [HOSTAPD] nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x559b281ea0 match=0a multicast=0
2026-02-05 21:24:31,838 [DEBUG] start: [HOSTAPD] nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x559b281ea0 match=11 multicast=0
2026-02-05 21:24:31,838 [DEBUG] start: [HOSTAPD] nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x559b281ea0 match=7f multicast=0
2026-02-05 21:24:31,838 [DEBUG] start: [HOSTAPD] rfkill: initial event: idx=1 type=1 op=0 soft=0 hard=0
2026-02-05 21:24:31,838 [DEBUG] start: [HOSTAPD] nl80211: Add own interface ifindex 8 (ifidx_reason -1)
2026-02-05 21:24:31,839 [DEBUG] start: [HOSTAPD] nl80211: if_indices[16]: 8(-1)
2026-02-05 21:24:31,839 [DEBUG] start: [HOSTAPD] nl80211: Do not open EAPOL RX socket - using control port for RX
2026-02-05 21:24:31,839 [DEBUG] start: [HOSTAPD] AP MLD wlan0: Link ID 0 added. num_links: 1
2026-02-05 21:24:31,839 [DEBUG] start: [HOSTAPD] AP MLD wlan0: First link BSS set to 0x559b27ffa0
2026-02-05 21:24:31,839 [DEBUG] start: [HOSTAPD] Setup of first link (0) BSS of MLD wlan0
2026-02-05 21:24:31,839 [DEBUG] start: [HOSTAPD] PROFILER: MLD EML capabilities override to 0x0881
2026-02-05 21:24:31,839 [DEBUG] start: [HOSTAPD] PROFILER: MLD capabilities override to 0x0062
2026-02-05 21:24:31,839 [DEBUG] start: [HOSTAPD] MLD: Not supported by the driver
2026-02-05 21:24:31,839 [DEBUG] start: [HOSTAPD] hostapd_interface_deinit_free(0x559b27eb00)
2026-02-05 21:24:31,840 [DEBUG] start: [HOSTAPD] hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
2026-02-05 21:24:31,840 [DEBUG] start: [HOSTAPD] hostapd_interface_deinit(0x559b27eb00)
2026-02-05 21:24:31,840 [DEBUG] start: [HOSTAPD] wlan0: interface state UNINITIALIZED->DISABLED
2026-02-05 21:24:31,840 [DEBUG] start: [HOSTAPD] hostapd_bss_deinit: deinit bss wlan0
2026-02-05 21:24:31,840 [DEBUG] start: [HOSTAPD] wlan0: Deauthenticate all stations
2026-02-05 21:24:31,840 [DEBUG] start: [HOSTAPD] nl80211: send_mlme - da=ff:ff:ff:ff:ff:ff sa=d8:80:83:2c:87:ef bssid=d8:80:83:2c:87:ef noack=0 freq=0 no_cck=0 offchanok=0 wait_time=0 no_encrypt=0 fc=0xc0 (WLAN_FC_STYPE_DEAUTH) nlmode=3
2026-02-05 21:24:31,840 [DEBUG] start: [HOSTAPD] nl80211: send_mlme - Use bss->freq=0
2026-02-05 21:24:31,840 [DEBUG] start: [HOSTAPD] nl80211: send_mlme -> send_frame_cmd
2026-02-05 21:24:31,840 [ERROR] start: [HOSTAPD] nl80211: Frame command failed: ret=-22 (Invalid argument) (freq=0 wait=0)
2026-02-05 21:24:31,841 [ERROR] start: [HOSTAPD] FATAL EVENT: wlan0: AP-DISABLED
2026-02-05 21:24:31,841 [DEBUG] start: [HOSTAPD] wlan0: AP-DISABLED
2026-02-05 21:24:31,841 [DEBUG] start: [HOSTAPD] AP MLD wlan0: Link ID 0 removed. num_links: 0
2026-02-05 21:24:31,841 [DEBUG] start: [HOSTAPD] AP MLD wlan0: First link BSS set to (nil)
2026-02-05 21:24:31,841 [DEBUG] start: [HOSTAPD] hostapd_cleanup(hapd=0x559b27ffa0 (wlan0))
2026-02-05 21:24:31,841 [DEBUG] start: [HOSTAPD] wlan0: CTRL-EVENT-TERMINATING
2026-02-05 21:24:31,841 [DEBUG] start: [HOSTAPD] hostapd_free_hapd_data: Interface wlan0 wasn't started
2026-02-05 21:24:31,841 [DEBUG] start: [HOSTAPD] hostapd_interface_deinit_free: driver=0x555e2de758 drv_priv=0x559b284c80 -> hapd_deinit
2026-02-05 21:24:31,841 [DEBUG] start: [HOSTAPD] nl80211: deinit ifname=wlan0 disabled_11b_rates=0
2026-02-05 21:24:31,841 [DEBUG] start: [HOSTAPD] nl80211: Remove monitor interface: refcount=0
2026-02-05 21:24:31,842 [DEBUG] start: [HOSTAPD] netlink: Operstate: ifindex=8 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
2026-02-05 21:24:31,842 [DEBUG] start: [HOSTAPD] nl80211: Set mode ifindex 8 iftype 2 (STATION)
2026-02-05 21:24:31,842 [ERROR] start: [HOSTAPD] nl80211: Failed to set interface 8 to mode 2: -16 (Device or resource busy)
2026-02-05 21:24:31,842 [DEBUG] start: [HOSTAPD] nl80211: Try mode change after setting interface down
2026-02-05 21:24:31,878 [DEBUG] start: [HOSTAPD] nl80211: Set mode ifindex 8 iftype 2 (STATION)
2026-02-05 21:24:31,878 [DEBUG] start: [HOSTAPD] nl80211: Mode change succeeded while interface is down
2026-02-05 21:24:31,899 [DEBUG] start: [HOSTAPD] nl80211: Teardown AP(wlan0) - device_ap_sme=0 use_monitor=0
2026-02-05 21:24:31,899 [DEBUG] start: [HOSTAPD] nl80211: Unsubscribe mgmt frames handle 0x888888dd13a09629 (AP teardown)
2026-02-05 21:24:31,900 [DEBUG] start: [HOSTAPD] hostapd_interface_free(0x559b27eb00)
2026-02-05 21:24:31,900 [DEBUG] start: [HOSTAPD] hostapd_interface_free: free hapd 0x559b27ffa0
2026-02-05 21:24:31,901 [DEBUG] start: [HOSTAPD] hostapd_cleanup_iface(0x559b27eb00)
2026-02-05 21:24:31,901 [DEBUG] start: [HOSTAPD] hostapd_cleanup_iface_partial(0x559b27eb00)
2026-02-05 21:24:31,901 [DEBUG] start: [HOSTAPD] hostapd_cleanup_iface: free iface=0x559b27eb00
2026-02-05 21:24:33,771 [ERROR] start: Failed to start hostapd: Failed to start hostapd: Hostapd died immediately after startup.
Exit code: 1
Configuration error or interface already in use.
(See hostapd logs above for details)
2026-02-05 21:24:33,773 [DEBUG] removeVif: Removing monitor vif ...
2026-02-05 21:24:33,773 [DEBUG] interface: run: ip link set wlan0profiler down
2026-02-05 21:24:33,809 [DEBUG] interface: run: iw dev wlan0profiler del
2026-02-05 21:24:33,865 [DEBUG] interface: run: ip link set wlan0 up
2026-02-05 21:24:33,882 [INFO] profiler.status: Last session file written: failed (code 1)
wlanpi@wlanpi-3fc:~ $

How often does this bug happen?

Every time

What version of the app are you using?

v2.0.0-1 on a M4 with MTK on WLAN Pi OS 3.4.2

Contributions

  • I have read the contribution guidelines

Code of Conduct

  • I agree to follow WLAN Pi's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions