raspberrypi / firmware

This repository contains pre-compiled binaries of the current Raspberry Pi kernel and modules, userspace libraries, and bootloader/GPU firmware.
5.1k stars 1.68k forks source link

Wifi AP broken with driver nl80211 between 4.14.90 (maybe after) and 4.19.25 #1117

Open ccleaud opened 5 years ago

ccleaud commented 5 years ago

Hi all,

Here's a bug report for you. I hope this helps you to fix. Thanks for you work.

Regards, C.CLEAUD


Problem description

Yesterday (2019-02-27) I updated my Raspberry Pi 3 B Rev 1.2 firmware, using rpi-update. This gets the most recent commit from https://github.com/Hexxeh/rpi-firmware/commits/master, which is a mirror to your repo https://github.com/raspberrypi/firmware/commits/master. This installed the firmware as in commit f84820ed7fcfd0f0d364e3d47cdbc83215596b2c (from your repo).

You need to known my Pi was configured to act as a Wifi Access Point. After restarting, I noticed Wifi Access Point didn't work anymore. I tried to changes Wifi-AP settings but the service hostapd always failed to start. When manually trying to start hostapd, I got an error (see later).

So, after Googling, I decided to downgrade firmware to the last release of yeaf 2018. Running command rpi-update da5948d8ef8354557732d9c8f5ad5e7e24374a69 installed the firmware as in commit e1bd9b0b8cda901ee9b23cbb8b3334cde71320a7 (from your repo). After reboot, the Wifi AP got back. No setting file was changed.

My Wifi settings use nl80211 driver. So, something is getting broken with this since 2018-12-21.

For security reasons, I've obfuscated my device name and wifi settings.

Symptoms

# service hostapd status
hostapd.service - LSB: Advanced IEEE 802.11 management daemon
   Loaded: loaded (/etc/init.d/hostapd; generated; vendor preset: enabled)
   Active: active (exited) since Wed 2019-02-27 21:05:29 UTC; 3s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2177 ExecStop=/etc/init.d/hostapd stop (code=exited, status=0/SUCCESS)
  Process: 2212 ExecStart=/etc/init.d/hostapd start (code=exited, status=0/SUCCESS)

Feb 27 21:05:29 xxxxxxxx systemd[1]: Starting LSB: Advanced IEEE 802.11 management daemon...
Feb 27 21:05:29 xxxxxxxx hostapd[2212]: Starting advanced IEEE 802.11 management: hostapd failed!
Feb 27 21:05:29 xxxxxxxx systemd[1]: Started LSB: Advanced IEEE 802.11 management daemon.

Manual start attempt

Please note the nl80211: Register frame command failed (type=208): ret=-22 (Invalid argument)

# hostapd -d /etc/hostapd/hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=2 op=0 soft=0 hard=0
nl80211: Using driver-based roaming
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: Using driver-based off-channel TX
nl80211: Supported vendor command: vendor_id=0x1018 subcmd=1
nl80211: Use separate P2P group interface (driver advertised support)
nl80211: Enable multi-channel concurrent (driver advertised support)
nl80211: use P2P_DEVICE support
nl80211: Disable use_monitor with device_ap_sme since no monitor mode support detected
nl80211: interface wlan0 in phy phy0
nl80211: Set mode ifindex 3 iftype 3 (AP)
nl80211: Setup AP(wlan0) - device_ap_sme=1 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x134a038 (device SME)
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x134a038 match=

nl80211: Register frame command failed (type=208): ret=-22 (Invalid argument)

nl80211: Register frame match - hexdump(len=0): [NULL]

nl80211: Could not configure driver mode

nl80211: deinit ifname=wlan0 disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
nl80211: Remove beacon (ifindex=3)
netlink: Operstate: ifindex=3 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Teardown AP(wlan0) - device_ap_sme=1 use_monitor=0

nl80211 driver initialization failed.

hostapd_interface_deinit_free(0x1348cd8)
hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
hostapd_interface_deinit(0x1348cd8)
wlan0: interface state UNINITIALIZED->DISABLED
hostapd_bss_deinit: deinit bss wlan0
wlan0: AP-DISABLED 
hostapd_cleanup(hapd=0x13499a0 (wlan0))
hostapd_free_hapd_data: Interface wlan0 wasn't started
hostapd_interface_deinit_free: driver=(nil) drv_priv=(nil) -> hapd_deinit
hostapd_interface_free(0x1348cd8)
hostapd_interface_free: free hapd 0x13499a0
hostapd_cleanup_iface(0x1348cd8)
hostapd_cleanup_iface_partial(0x1348cd8)
hostapd_cleanup_iface: free iface=0x1348cd8

Content of /etc/hostapd/hostapd.conf

Here is vi /etc/hostapd/hostapd.conf :

      1 # --- Hardware settings ---
      2 # --------
      3 interface=wlan0
      4 
      5 ssid=XXXXXXXX
      6 
      7 # Recommended channels 802.11b: 1, 6, 11, 14
      8 # Recommended channels 802.11g/n: 1, 6, 11
      9 channel=1
     10 
     11 # Beacon interval in kus (1.024 ms)
     12 beacon_int=512
     13 
     14 
     15 
     16 # --- WPA and WPA2 configuration ---
     17 # --------
     18 # Station MAC address -based authentication (driver=hostap or driver=nl80211)
     19 # 0 = accept unless in deny list, one MAC per line in the form 99:99:99:99:99:99
     20 # 1 = deny unless in accept list, one MAC per line in the form 99:99:99:99:99:99
     21 # 2 = use external RADIUS server (accept/deny lists are searched first)
     22 macaddr_acl=0
     23 
     24 # Accept/deny lists are read from separate files
     25 #accept_mac_file=/etc/hostapd.accept
     26 #deny_mac_file=/etc/hostapd.deny
     27 
     28 # Indicates algorithm specified by IEEE 802.11
     29 auth_algs=1
     30 
     31 # AP will broadcast SSID
     32 ignore_broadcast_ssid=0
     33 
     34 # --- WPA settings ---
     35 # WPA algorithm used (WPA2 in this case)
     36 wpa=2
     37 wpa_passphrase=XXXXXXXXXX
     38 wpa_key_mgmt=WPA-PSK
     39 wpa_pairwise=TKIP
     40 rsn_pairwise=CCMP
     41 
     42 
     43 
     44 # --- Hardware configuration ---
     45 # --------
     46 # Type of driver to be used (in may be different depending on your WiFi dongle chipset)
     47 # In majority of cases it will be 'driver=nl80211'
     48 driver=nl80211
     49 
     50 # Whether IEEE 802.11n (HT) is enabled
     51 # Note: You will also need to enable WMM for full HT functionality.
     52 # Note: hw_mode=g (2.4 GHz) and hw_mode=a (5 GHz) is used to specify the band.
     53 ieee80211n=1
     54 
     55 # User-friendly description of device (optional)
     56 device_name=RTL8192CU
     57 
     58 # Manufacturer name (optional)
     59 manufacturer=Realtek
     60 
     61 # WPS RF Bands (a = 5G, b = 2.4G, g = 2.4G, ag = dual band)
     62 hw_mode=g
     63 
     64 # Enable WMM
     65 wmm_enabled=1
     66 
     67 # Enable 40MHz channels with 20ns guard interval
     68 ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]
     69 
6by9 commented 5 years ago

(This is not a firmware issue and should really be reported in https://github.com/raspberrypi/linux/issues)

Slight difference as it's referencing the onboard wi-fi of the 3B+, but https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=224931&start=100#p1434854 https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=224931&start=25#p1396409 is similar. Can you try updating hostapd? You'll have to build it from source.

What exact make and model is your wifi dongle? It's very hard to tell what chipset is inside a dongle without having one, so if we're to try and reproduce then we need exactly the same module.

popcornmix commented 5 years ago

I belive buster hostapd is new enough. It should be possible to install this through debian backports.

popcornmix commented 5 years ago

Note: we are planning to update hostapd in raspbian soon, but confirmation that the update fixes your problem would be helpful.

XECDesign commented 5 years ago

hostapd is not in stretch-backports, but I've build the packages here: https://www.dropbox.com/s/qdy7jridugqkx7y/wpa_stretch.tar.xz?dl=1

ccleaud commented 5 years ago

Hi again,

Sorry for the delay. Also the test tells it doesn't work until reboot. I still have to give you the exact make and model of my WiFi dongle.

Step 0 - initial (and working) state

My R-Pi firmware is at commit e1bd9b0b8cda901ee9b23cbb8b3334cde71320a7 and hostapd is working.

Step 1 - downgrade firmware, keep hostapd

rpi-update 82f49d8dfd9c000a203fb1deae64a3eb87abf3c1
reboot

Test hostapd version:

hostapd -v
hostapd v2.4
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2015, Jouni Malinen <j@w1.fi> and contributors

Start hostapd:

hostapd -dd /etc/hostapd/hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=2 op=0 soft=0 hard=0
nl80211: Using driver-based roaming
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: Using driver-based off-channel TX
nl80211: Supported vendor command: vendor_id=0x1018 subcmd=1
nl80211: Use separate P2P group interface (driver advertised support)
nl80211: Enable multi-channel concurrent (driver advertised support)
nl80211: use P2P_DEVICE support
nl80211: Disable use_monitor with device_ap_sme since no monitor mode support detected
nl80211: interface wlan0 in phy phy0
nl80211: Set mode ifindex 3 iftype 3 (AP)
nl80211: Setup AP(wlan0) - device_ap_sme=1 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x1cf5038 (device SME)
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x1cf5038 match=
nl80211: Register frame command failed (type=208): ret=-22 (Invalid argument)
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Could not configure driver mode
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
nl80211: Remove beacon (ifindex=3)
netlink: Operstate: ifindex=3 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Teardown AP(wlan0) - device_ap_sme=1 use_monitor=0
nl80211 driver initialization failed.
hostapd_interface_deinit_free(0x1cf3cd8)
hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
hostapd_interface_deinit(0x1cf3cd8)
wlan0: interface state UNINITIALIZED->DISABLED
hostapd_bss_deinit: deinit bss wlan0
wlan0: AP-DISABLED
hostapd_cleanup(hapd=0x1cf49a0 (wlan0))
hostapd_free_hapd_data: Interface wlan0 wasn't started
hostapd_interface_deinit_free: driver=(nil) drv_priv=(nil) -> hapd_deinit
hostapd_interface_free(0x1cf3cd8)
hostapd_interface_free: free hapd 0x1cf49a0
hostapd_cleanup_iface(0x1cf3cd8)
hostapd_cleanup_iface_partial(0x1cf3cd8)
hostapd_cleanup_iface: free iface=0x1cf3cd8

-> We can see the initial error.

Step 2 - upgrade hostpad from .xz file

dpkg -i hostapd_2.6-21~bpo9~rpt1_armhf.deb
(Reading database ... 34514 files and directories currently installed.)
Preparing to unpack hostapd_2.6-21~bpo9~rpt1_armhf.deb ...
Unpacking hostapd (2:2.6-21~bpo9~rpt1) over (2:2.4-1+deb9u2) ...
Setting up hostapd (2:2.6-21~bpo9~rpt1) ...
Processing triggers for systemd (232-25+deb9u9) ...
Processing triggers for man-db (2.7.6.1-2) ...

Test hostapd version:

hostapd -v
hostapd v2.6
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2016, Jouni Malinen <j@w1.fi> and contributors

-> OK, it has been upgraded :)

Start hostapd:

hostapd -dd /etc/hostapd/hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
nl80211: Using driver-based roaming
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: Using driver-based off-channel TX
nl80211: Supported vendor command: vendor_id=0x1018 subcmd=1
nl80211: Use separate P2P group interface (driver advertised support)
nl80211: Enable multi-channel concurrent (driver advertised support)
nl80211: use P2P_DEVICE support
nl80211: interface wlan0 in phy phy0
nl80211: Set mode ifindex 3 iftype 3 (AP)
nl80211: Setup AP(wlan0) - device_ap_sme=1 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x203100 (device SME)
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x203100 match=04
nl80211: Register frame command failed (type=208): ret=-22 (Invalid argument)
nl80211: Register frame match - hexdump(len=1): 04
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x203100 match=0501
nl80211: Register frame command failed (type=208): ret=-22 (Invalid argument)
nl80211: Register frame match - hexdump(len=2): 05 01
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x203100 match=0504
nl80211: Register frame command failed (type=208): ret=-22 (Invalid argument)
nl80211: Register frame match - hexdump(len=2): 05 04
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x203100 match=06
nl80211: Register frame command failed (type=208): ret=-22 (Invalid argument)
nl80211: Register frame match - hexdump(len=1): 06
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x203100 match=08
nl80211: Register frame command failed (type=208): ret=-22 (Invalid argument)
nl80211: Register frame match - hexdump(len=1): 08
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x203100 match=09
nl80211: Register frame command failed (type=208): ret=-22 (Invalid argument)
nl80211: Register frame match - hexdump(len=1): 09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x203100 match=0a
nl80211: Register frame command failed (type=208): ret=-22 (Invalid argument)
nl80211: Register frame match - hexdump(len=1): 0a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x203100 match=11
nl80211: Register frame command failed (type=208): ret=-22 (Invalid argument)
nl80211: Register frame match - hexdump(len=1): 11
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x203100 match=7f
nl80211: Register frame command failed (type=208): ret=-22 (Invalid argument)
nl80211: Register frame match - hexdump(len=1): 7f
nl80211: Failed to subscribe for mgmt frames from SME driver - trying to run without it
nl80211: Enable Probe Request reporting nl_preq=0x203100
nl80211: Register frame type=0x40 (WLAN_FC_STYPE_PROBE_REQ) nl_handle=0x203100 match=
nl80211: Register frame command failed (type=64): ret=-22 (Invalid argument)
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Failed to enable Probe Request frame reporting in AP mode
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
nl80211: Add own interface ifindex 3 (ifidx_reason -1)
nl80211: if_indices[16]: 3(-1)
phy: phy0
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 20 MHz 20 mBm (no IR)
nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
nl80211: 5170-5250 @ 80 MHz 20 mBm (no IR)
nl80211: 5250-5330 @ 80 MHz 20 mBm (DFS) (no IR)
nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: 5735-5835 @ 80 MHz 20 mBm (no IR)
nl80211: 57240-63720 @ 2160 MHz 0 mBm
nl80211: Added 802.11b mode based on 802.11g information
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm
hw vht capab: 0x0, conf vht capab: 0x0
Completing interface initialization
Mode: IEEE 802.11g  Channel: 1  Frequency: 2412 MHz
DFS 0 channels required radar detection
nl80211: Set freq 2412 (ht_enabled=1, vht_enabled=0, bandwidth=20 MHz, cf1=2412 MHz, cf2=0 MHz)
  * freq=2412
  * vht_enabled=0
  * ht_enabled=1
  * sec_channel_offset=0
  * channel_type=1
nl80211: Failed to set channel (freq=2412): -16 (Device or resource busy)
Could not set channel for kernel driver
Interface initialization failed
wlan0: interface state UNINITIALIZED->DISABLED
wlan0: AP-DISABLED
wlan0: Unable to setup interface.
hostapd_interface_deinit_free(0x201cf8)
hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
hostapd_interface_deinit(0x201cf8)
wlan0: interface state DISABLED->DISABLED
hostapd_bss_deinit: deinit bss wlan0
wlan0: Deauthenticate all stations
nl80211: sta_remove -> DEL_STATION wlan0 ff:ff:ff:ff:ff:ff --> 0 (Success)
wlan0: AP-DISABLED
hostapd_cleanup(hapd=0x202a48 (wlan0))
hostapd_free_hapd_data: Interface wlan0 wasn't started
hostapd_interface_deinit_free: driver=0xe7448 drv_priv=0x2035b0 -> hapd_deinit
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
nl80211: Remove beacon (ifindex=3)
netlink: Operstate: ifindex=3 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
hostapd_interface_free(0x201cf8)
hostapd_interface_free: free hapd 0x202a48
hostapd_cleanup_iface(0x201cf8)
hostapd_cleanup_iface_partial(0x201cf8)
hostapd_cleanup_iface: free iface=0x201cf8

-> It still fails with many lines nl80211: Register frame command failed (type=208): ret=-22 (Invalid argument)

Step 3 - reboot

It works! :)

hostapd -dd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
nl80211: Using driver-based roaming
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: Using driver-based off-channel TX
nl80211: Supported vendor command: vendor_id=0x1018 subcmd=1
nl80211: Use separate P2P group interface (driver advertised support)
nl80211: Enable multi-channel concurrent (driver advertised support)
nl80211: use P2P_DEVICE support
nl80211: interface wlan0 in phy phy0
nl80211: Set mode ifindex 3 iftype 3 (AP)
nl80211: Setup AP(wlan0) - device_ap_sme=1 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x15d8100 (device SME)
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x15d8100 match=04
nl80211: Register frame command failed (type=208): ret=-22 (Invalid argument)
nl80211: Register frame match - hexdump(len=1): 04
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x15d8100 match=0501
nl80211: Register frame command failed (type=208): ret=-22 (Invalid argument)
nl80211: Register frame match - hexdump(len=2): 05 01
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x15d8100 match=0504
nl80211: Register frame command failed (type=208): ret=-22 (Invalid argument)
nl80211: Register frame match - hexdump(len=2): 05 04
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x15d8100 match=06
nl80211: Register frame command failed (type=208): ret=-22 (Invalid argument)
nl80211: Register frame match - hexdump(len=1): 06
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x15d8100 match=08
nl80211: Register frame command failed (type=208): ret=-22 (Invalid argument)
nl80211: Register frame match - hexdump(len=1): 08
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x15d8100 match=09
nl80211: Register frame command failed (type=208): ret=-22 (Invalid argument)
nl80211: Register frame match - hexdump(len=1): 09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x15d8100 match=0a
nl80211: Register frame command failed (type=208): ret=-22 (Invalid argument)
nl80211: Register frame match - hexdump(len=1): 0a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x15d8100 match=11
nl80211: Register frame command failed (type=208): ret=-22 (Invalid argument)
nl80211: Register frame match - hexdump(len=1): 11
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x15d8100 match=7f
nl80211: Register frame command failed (type=208): ret=-22 (Invalid argument)
nl80211: Register frame match - hexdump(len=1): 7f
nl80211: Failed to subscribe for mgmt frames from SME driver - trying to run without it
nl80211: Enable Probe Request reporting nl_preq=0x15d8100
nl80211: Register frame type=0x40 (WLAN_FC_STYPE_PROBE_REQ) nl_handle=0x15d8100 match=
nl80211: Register frame command failed (type=64): ret=-22 (Invalid argument)
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Failed to enable Probe Request frame reporting in AP mode
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
nl80211: Add own interface ifindex 3 (ifidx_reason -1)
nl80211: if_indices[16]: 3(-1)
phy: phy0
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 20 MHz 20 mBm (no IR)
nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
nl80211: 5170-5250 @ 80 MHz 20 mBm (no IR)
nl80211: 5250-5330 @ 80 MHz 20 mBm (DFS) (no IR)
nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: 5735-5835 @ 80 MHz 20 mBm (no IR)
nl80211: 57240-63720 @ 2160 MHz 0 mBm
nl80211: Added 802.11b mode based on 802.11g information
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm
hw vht capab: 0x0, conf vht capab: 0x0
Completing interface initialization
Mode: IEEE 802.11g  Channel: 1  Frequency: 2412 MHz
DFS 0 channels required radar detection
nl80211: Set freq 2412 (ht_enabled=1, vht_enabled=0, bandwidth=20 MHz, cf1=2412 MHz, cf2=0 MHz)
  * freq=2412
  * vht_enabled=0
  * ht_enabled=1
  * sec_channel_offset=0
  * channel_type=1
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
hostapd_setup_bss(hapd=0x15d7a48 (wlan0), first=1)
wlan0: Flushing old station entries
nl80211: flush -> DEL_STATION wlan0 (all)
nl80211: Station flush failed: ret=-14 (Bad address)
wlan0: Could not connect to kernel driver
wlan0: Deauthenticate all stations
nl80211: sta_remove -> DEL_STATION wlan0 ff:ff:ff:ff:ff:ff --> 0 (Success)
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
nl80211: set_key failed; err=-22 Invalid argument)
Failed to clear default encryption keys (ifname=wlan0 keyidx=0)
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
nl80211: set_key failed; err=-22 Invalid argument)
Failed to clear default encryption keys (ifname=wlan0 keyidx=1)
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
nl80211: set_key failed; err=-22 Invalid argument)
Failed to clear default encryption keys (ifname=wlan0 keyidx=2)
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
nl80211: set_key failed; err=-22 Invalid argument)
Failed to clear default encryption keys (ifname=wlan0 keyidx=3)
Using interface wlan0 with hwaddr XX:XX:XX:XX:XX:XX and ssid "PI-WIFI"
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=9):
     XX XX XX XX XX XX XX XX XX                        PI-WIFI
PSK (ASCII passphrase) - hexdump_ascii(len=9): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
random: Got 13/20 bytes from /dev/random
random: Only 13/20 bytes of strong random data available from /dev/random
random: Not enough entropy pool available for secure operations
WPA: Not enough entropy in random pool for secure operations - update keys later when the first station connects
Get randomness: len=32 entropy=0
GMK - hexdump(len=32): [REMOVED]
Get randomness: len=32 entropy=0
Key Counter - hexdump(len=32): [REMOVED]
WPA: Delay group state machine start until Beacon frames have been configured
nl80211: Set beacon (beacon_set=0)
nl80211: Beacon head - hexdump(len=60): 80 00 00 00 ff ff ff ff ff ff 00 38 df 36 ce 45 00 38 df 36 ce 45 00 00 00 00 00 00 00 00 00 00 00 02 11 04 00 09 53 53 47 20 53 74 75 6
nl80211: Beacon tail - hexdump(len=115): 2a 01 04 32 04 30 48 60 6c 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00 2d 1a 2c 10 1f ff 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 00 00 7f 04 00 00 00 02 dd 18 00 50 f2 02 01 01 00 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00
nl80211: ifindex=3
nl80211: beacon_int=512
nl80211: dtim_period=2
nl80211: ssid - hexdump_ascii(len=9):
     XX XX XX XX XX XX XX XX XX                        PI-WIFI
  * beacon_int=512
  * dtim_period=2
nl80211: hidden SSID not in use
nl80211: privacy=1
nl80211: auth_algs=0x1
nl80211: wpa_version=0x2
nl80211: key_mgmt_suites=0x2
nl80211: pairwise_ciphers=0x10
nl80211: group_cipher=0x10
nl80211: SMPS mode - off
nl80211: beacon_ies - hexdump(len=6): 7f 04 00 00 00 02
nl80211: proberesp_ies - hexdump(len=6): 7f 04 00 00 00 02
nl80211: assocresp_ies - hexdump(len=6): 7f 04 00 00 00 02
WPA: Start group state machine to set initial keys
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
Get randomness: len=16 entropy=0
GTK - hexdump(len=16): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=3 addr=0xd4108 key_idx=1 set_tx=1 seq_len=0 key_len=16
nl80211: KEY_DATA - hexdump(len=16): [REMOVED]
   broadcast key
nl80211: Set wlan0 operstate 0->1 (UP)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=6 (IF_OPER_UP)
Failed to set TX queue parameters for queue 0.
Failed to set TX queue parameters for queue 1.
Failed to set TX queue parameters for queue 2.
Failed to set TX queue parameters for queue 3.
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED
wlan0: Setup of interface done.
ctrl_iface not configured!
RTM_NEWLINK: ifi_index=3 ifname=wlan0 operstate=6 linkmode=0 ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
VLAN: RTM_NEWLINK: ifi_index=3 ifname=wlan0 ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
VLAN: vlan_newlink(wlan0)
random: Got 6/7 bytes from /dev/random
nl80211: Event message available
nl80211: Drv Event 19 (NL80211_CMD_NEW_STATION) received for wlan0
nl80211: New station XX:XX:XX:XX:XX:XX
nl80211: Assoc Req IEs - hexdump(len=89): 00 09 53 53 47 20 53 74 75 66 66 01 08 02 04 0b 16 0c 12 18 24 32 04 30 48 60 6c 2d 1a 30 01 03 ff 00 00 00 00 00 00 00 00 00 00 00 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00 7f 01 00 dd 07 00 50 f2 02 00 01 00
wlan0: Event ASSOC (0) received
wlan0: STA XX:XX:XX:XX:XX:XX IEEE 802.11: associated
STA included RSN IE in (Re)AssocReq
  New STA
ap_sta_add: register ap_handle_timer timeout for XX:XX:XX:XX:XX:XX (300 seconds - ap_max_inactivity)
nl80211: Set STA flags - ifname=wlan0 addr=XX:XX:XX:XX:XX:XX total_flags=0x60 flags_or=0x0 flags_and=0xfffffff1 authorized=0
wlan0: STA XX:XX:XX:XX:XX:XX WPA: event 1 notification
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0x15dd620 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=XX:XX:XX:XX:XX:XX
nl80211: set_key failed; err=-22 Invalid argument)
IEEE 802.1X: Ignore STA - 802.1X not enabled or forced for WPS
wlan0: STA XX:XX:XX:XX:XX:XX WPA: start authentication
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0x15dd620 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=XX:XX:XX:XX:XX:XX
nl80211: set_key failed; err=-22 Invalid argument)
nl80211: Set STA flags - ifname=wlan0 addr=XX:XX:XX:XX:XX:XX total_flags=0x60 flags_or=0x0 flags_and=0xfffffffe authorized=0
wlan0: STA XX:XX:XX:XX:XX:XX IEEE 802.1X: unauthorizing port
WPA: XX:XX:XX:XX:XX:XX WPA_PTK_GROUP entering state IDLE
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state AUTHENTICATION
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state AUTHENTICATION2
WPA: Re-initialize GMK/Counter on first station
random: Cannot read from /dev/random: Resource temporarily unavailable
random: Got 0/1 bytes from /dev/random
random: Only 19/20 bytes of strong random data available from /dev/random
random: Not enough entropy pool available for secure operations
WPA: Not enough entropy in random pool to proceed - reject first 4-way handshake
Get randomness: len=32 entropy=1
GMK - hexdump(len=32): [REMOVED]
Get randomness: len=32 entropy=0
Key Counter - hexdump(len=32): [REMOVED]
Get randomness: len=16 entropy=0
GTK - hexdump(len=16): [REMOVED]
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=3 addr=0xd4108 key_idx=1 set_tx=1 seq_len=0 key_len=16
nl80211: KEY_DATA - hexdump(len=16): [REMOVED]
   broadcast key
Get randomness: len=32 entropy=0
WPA: Assign ANonce - hexdump(len=32): 4c 21 33 88 de 24 18 b7 fb df c0 c7 0b 6b 75 2e 53 ca 1b be 6b e6 65 85 a7 51 1f bc 67 5b 7d aa
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state INITPSK
Searching a PSK for XX:XX:XX:XX:XX:XX prev_psk=(nil)
Searching a PSK for XX:XX:XX:XX:XX:XX prev_psk=(nil)
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state PTKSTART
wlan0: STA XX:XX:XX:XX:XX:XX WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=0 mic=0 ack=1 install=0 pairwise=1 kde_len=0 keyidx=0 encr=0)
WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 01
WPA: Use EAPOL-Key timeout of 1000 ms (retry counter 1)
wlan0: hostapd_new_assoc_sta: reschedule ap_handle_timer timeout for XX:XX:XX:XX:XX:XX (300 seconds - ap_max_inactivity)
wlan0: Event EAPOL_RX (24) received
IEEE 802.1X: 121 bytes from XX:XX:XX:XX:XX:XX
   IEEE 802.1X: version=1 type=3 length=117
WPA: Received EAPOL-Key from XX:XX:XX:XX:XX:XX key_info=0x10a type=2 key_data_length=22
WPA: Received Key Nonce - hexdump(len=32): 63 11 a8 51 f0 27 cd df 3a 99 0d 19 dc 47 84 8a be f3 22 be 12 31 75 f6 56 ea c9 a8 5e b6 5d 3e
WPA: Received Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 01
WPA: Reject 4-way handshake to collect more entropy for random number generation
random: Mark internal entropy pool to be ready (count=1/2)
wpa_sta_disconnect STA XX:XX:XX:XX:XX:XX
hostapd_wpa_auth_disconnect: WPA authenticator requests disconnect: STA XX:XX:XX:XX:XX:XX reason 2
wlan0: ap_sta_disconnect addr XX:XX:XX:XX:XX:XX reason=2
nl80211: sta_remove -> DEL_STATION wlan0 XX:XX:XX:XX:XX:XX --> 0 (Success)
wlan0: STA XX:XX:XX:XX:XX:XX WPA: event 3 notification
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0x15dd620 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=XX:XX:XX:XX:XX:XX
nl80211: set_key failed; err=-22 Invalid argument)
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state DISCONNECTED
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0x15dd620 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=XX:XX:XX:XX:XX:XX
nl80211: set_key failed; err=-22 Invalid argument)
nl80211: Set STA flags - ifname=wlan0 addr=XX:XX:XX:XX:XX:XX total_flags=0x60 flags_or=0x0 flags_and=0xfffffffe authorized=0
wlan0: STA XX:XX:XX:XX:XX:XX IEEE 802.1X: unauthorizing port
wlan0: ap_sta_disconnect: reschedule ap_handle_timer timeout for XX:XX:XX:XX:XX:XX (5 seconds - AP_MAX_INACTIVITY_AFTER_DEAUTH)
wlan0: Deauthentication callback for STA XX:XX:XX:XX:XX:XX
wlan0: Removing STA XX:XX:XX:XX:XX:XX from kernel driver
nl80211: sta_remove -> DEL_STATION wlan0 XX:XX:XX:XX:XX:XX --> 0 (Success)
wlan0: STA XX:XX:XX:XX:XX:XX MLME: MLME-DEAUTHENTICATE.indication(XX:XX:XX:XX:XX:XX, 2)
wlan0: STA XX:XX:XX:XX:XX:XX MLME: MLME-DELETEKEYS.request(XX:XX:XX:XX:XX:XX)
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0x15dd620 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=XX:XX:XX:XX:XX:XX
nl80211: set_key failed; err=-22 Invalid argument)
nl80211: Event message available
nl80211: Drv Event 20 (NL80211_CMD_DEL_STATION) received for wlan0
nl80211: Delete station XX:XX:XX:XX:XX:XX
wlan0: Event DISASSOC (1) received
wlan0: STA XX:XX:XX:XX:XX:XX IEEE 802.11: disassociated
wlan0: STA XX:XX:XX:XX:XX:XX WPA: event 2 notification
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0x15dd620 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=XX:XX:XX:XX:XX:XX
nl80211: set_key failed; err=-22 Invalid argument)
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state DISCONNECTED
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0x15dd620 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=XX:XX:XX:XX:XX:XX
nl80211: set_key failed; err=-22 Invalid argument)
nl80211: Set STA flags - ifname=wlan0 addr=XX:XX:XX:XX:XX:XX total_flags=0x0 flags_or=0x0 flags_and=0xfffffffe authorized=0
wlan0: STA XX:XX:XX:XX:XX:XX IEEE 802.1X: unauthorizing port
nl80211: sta_remove -> DEL_STATION wlan0 XX:XX:XX:XX:XX:XX --> 0 (Success)
hostapd_ht_operation_update current operation mode=0x0
hostapd_ht_operation_update new operation mode=0x0 changes=0
ap_free_sta: cancel ap_handle_timer for XX:XX:XX:XX:XX:XX
nl80211: Event message available
nl80211: Drv Event 19 (NL80211_CMD_NEW_STATION) received for wlan0
nl80211: New station XX:XX:XX:XX:XX:XX
nl80211: Assoc Req IEs - hexdump(len=89): 00 09 53 53 47 20 53 74 75 66 66 01 08 02 04 0b 16 0c 12 18 24 32 04 30 48 60 6c 2d 1a 30 01 03 ff 00 00 00 00 00 00 00 00 00 00 00 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00 7f 01 00 dd 07 00 50 f2 02 00 01 00
wlan0: Event ASSOC (0) received
wlan0: STA XX:XX:XX:XX:XX:XX IEEE 802.11: associated
STA included RSN IE in (Re)AssocReq
  New STA
ap_sta_add: register ap_handle_timer timeout for XX:XX:XX:XX:XX:XX (300 seconds - ap_max_inactivity)
nl80211: Set STA flags - ifname=wlan0 addr=XX:XX:XX:XX:XX:XX total_flags=0x60 flags_or=0x0 flags_and=0xfffffff1 authorized=0
wlan0: STA XX:XX:XX:XX:XX:XX WPA: event 1 notification
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0x15dd620 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=XX:XX:XX:XX:XX:XX
nl80211: set_key failed; err=-22 Invalid argument)
IEEE 802.1X: Ignore STA - 802.1X not enabled or forced for WPS
wlan0: STA XX:XX:XX:XX:XX:XX WPA: start authentication
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0x15dd620 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=XX:XX:XX:XX:XX:XX
nl80211: set_key failed; err=-22 Invalid argument)
nl80211: Set STA flags - ifname=wlan0 addr=XX:XX:XX:XX:XX:XX total_flags=0x60 flags_or=0x0 flags_and=0xfffffffe authorized=0
wlan0: STA XX:XX:XX:XX:XX:XX IEEE 802.1X: unauthorizing port
WPA: XX:XX:XX:XX:XX:XX WPA_PTK_GROUP entering state IDLE
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state AUTHENTICATION
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state AUTHENTICATION2
WPA: Re-initialize GMK/Counter on first station
random: Cannot read from /dev/random: Resource temporarily unavailable
random: Got 0/1 bytes from /dev/random
random: Only 19/20 bytes of strong random data available from /dev/random
random: Not enough entropy pool available for secure operations
WPA: Not enough entropy in random pool to proceed - reject first 4-way handshake
Get randomness: len=32 entropy=2
GMK - hexdump(len=32): [REMOVED]
Get randomness: len=32 entropy=0
Key Counter - hexdump(len=32): [REMOVED]
Get randomness: len=16 entropy=0
GTK - hexdump(len=16): [REMOVED]
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=3 addr=0xd4108 key_idx=1 set_tx=1 seq_len=0 key_len=16
nl80211: KEY_DATA - hexdump(len=16): [REMOVED]
   broadcast key
Get randomness: len=32 entropy=0
WPA: Assign ANonce - hexdump(len=32): 0b cd 70 3e 34 3d 20 42 b6 d5 09 cf 5c 01 9c 05 af 65 6f a7 c5 7c 02 7e 58 3a 06 f2 88 97 01 7f
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state INITPSK
Searching a PSK for XX:XX:XX:XX:XX:XX prev_psk=(nil)
Searching a PSK for XX:XX:XX:XX:XX:XX prev_psk=(nil)
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state PTKSTART
wlan0: STA XX:XX:XX:XX:XX:XX WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=0 mic=0 ack=1 install=0 pairwise=1 kde_len=0 keyidx=0 encr=0)
WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 01
WPA: Use EAPOL-Key timeout of 1000 ms (retry counter 1)
wlan0: hostapd_new_assoc_sta: reschedule ap_handle_timer timeout for XX:XX:XX:XX:XX:XX (300 seconds - ap_max_inactivity)
wlan0: Event EAPOL_RX (24) received
IEEE 802.1X: 121 bytes from XX:XX:XX:XX:XX:XX
   IEEE 802.1X: version=1 type=3 length=117
WPA: Received EAPOL-Key from XX:XX:XX:XX:XX:XX key_info=0x10a type=2 key_data_length=22
WPA: Received Key Nonce - hexdump(len=32): dd 6e 24 b4 62 2f de 68 5b 6a ee c7 37 0c 73 c5 ee ce 42 a4 87 53 95 d4 94 da 9e b3 b6 1e 1e d8
WPA: Received Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 01
WPA: Reject 4-way handshake to collect more entropy for random number generation
random: Mark internal entropy pool to be ready (count=2/2)
wpa_sta_disconnect STA XX:XX:XX:XX:XX:XX
hostapd_wpa_auth_disconnect: WPA authenticator requests disconnect: STA XX:XX:XX:XX:XX:XX reason 2
wlan0: ap_sta_disconnect addr XX:XX:XX:XX:XX:XX reason=2
nl80211: sta_remove -> DEL_STATION wlan0 XX:XX:XX:XX:XX:XX --> 0 (Success)
wlan0: STA XX:XX:XX:XX:XX:XX WPA: event 3 notification
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0x15dd620 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=XX:XX:XX:XX:XX:XX
nl80211: set_key failed; err=-22 Invalid argument)
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state DISCONNECTED
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0x15dd620 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=XX:XX:XX:XX:XX:XX
nl80211: set_key failed; err=-22 Invalid argument)
nl80211: Set STA flags - ifname=wlan0 addr=XX:XX:XX:XX:XX:XX total_flags=0x60 flags_or=0x0 flags_and=0xfffffffe authorized=0
wlan0: STA XX:XX:XX:XX:XX:XX IEEE 802.1X: unauthorizing port
wlan0: ap_sta_disconnect: reschedule ap_handle_timer timeout for XX:XX:XX:XX:XX:XX (5 seconds - AP_MAX_INACTIVITY_AFTER_DEAUTH)
wlan0: Deauthentication callback for STA XX:XX:XX:XX:XX:XX
wlan0: Removing STA XX:XX:XX:XX:XX:XX from kernel driver
nl80211: sta_remove -> DEL_STATION wlan0 XX:XX:XX:XX:XX:XX --> 0 (Success)
wlan0: STA XX:XX:XX:XX:XX:XX MLME: MLME-DEAUTHENTICATE.indication(XX:XX:XX:XX:XX:XX, 2)
wlan0: STA XX:XX:XX:XX:XX:XX MLME: MLME-DELETEKEYS.request(XX:XX:XX:XX:XX:XX)
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0x15dd620 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=XX:XX:XX:XX:XX:XX
nl80211: set_key failed; err=-22 Invalid argument)
nl80211: Event message available
nl80211: Drv Event 20 (NL80211_CMD_DEL_STATION) received for wlan0
nl80211: Delete station XX:XX:XX:XX:XX:XX
wlan0: Event DISASSOC (1) received
wlan0: STA XX:XX:XX:XX:XX:XX IEEE 802.11: disassociated
wlan0: STA XX:XX:XX:XX:XX:XX WPA: event 2 notification
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0x15dd620 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=XX:XX:XX:XX:XX:XX
nl80211: set_key failed; err=-22 Invalid argument)
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state DISCONNECTED
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0x15dd620 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=XX:XX:XX:XX:XX:XX
nl80211: set_key failed; err=-22 Invalid argument)
nl80211: Set STA flags - ifname=wlan0 addr=XX:XX:XX:XX:XX:XX total_flags=0x0 flags_or=0x0 flags_and=0xfffffffe authorized=0
wlan0: STA XX:XX:XX:XX:XX:XX IEEE 802.1X: unauthorizing port
nl80211: sta_remove -> DEL_STATION wlan0 XX:XX:XX:XX:XX:XX --> 0 (Success)
hostapd_ht_operation_update current operation mode=0x0
hostapd_ht_operation_update new operation mode=0x0 changes=0
ap_free_sta: cancel ap_handle_timer for XX:XX:XX:XX:XX:XX
random: Got 1/1 bytes from /dev/random
nl80211: Event message available
nl80211: Drv Event 19 (NL80211_CMD_NEW_STATION) received for wlan0
nl80211: New station XX:XX:XX:XX:XX:XX
nl80211: Assoc Req IEs - hexdump(len=89): 00 09 53 53 47 20 53 74 75 66 66 01 08 02 04 0b 16 0c 12 18 24 32 04 30 48 60 6c 2d 1a 30 01 03 ff 00 00 00 00 00 00 00 00 00 00 00 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00 7f 01 00 dd 07 00 50 f2 02 00 01 00
wlan0: Event ASSOC (0) received
wlan0: STA XX:XX:XX:XX:XX:XX IEEE 802.11: associated
STA included RSN IE in (Re)AssocReq
  New STA
ap_sta_add: register ap_handle_timer timeout for XX:XX:XX:XX:XX:XX (300 seconds - ap_max_inactivity)
nl80211: Set STA flags - ifname=wlan0 addr=XX:XX:XX:XX:XX:XX total_flags=0x60 flags_or=0x0 flags_and=0xfffffff1 authorized=0
wlan0: STA XX:XX:XX:XX:XX:XX WPA: event 1 notification
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0x15dd620 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=XX:XX:XX:XX:XX:XX
nl80211: set_key failed; err=-22 Invalid argument)
IEEE 802.1X: Ignore STA - 802.1X not enabled or forced for WPS
wlan0: STA XX:XX:XX:XX:XX:XX WPA: start authentication
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=0x15dd620 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=XX:XX:XX:XX:XX:XX
nl80211: set_key failed; err=-22 Invalid argument)
nl80211: Set STA flags - ifname=wlan0 addr=XX:XX:XX:XX:XX:XX total_flags=0x60 flags_or=0x0 flags_and=0xfffffffe authorized=0
wlan0: STA XX:XX:XX:XX:XX:XX IEEE 802.1X: unauthorizing port
WPA: XX:XX:XX:XX:XX:XX WPA_PTK_GROUP entering state IDLE
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state AUTHENTICATION
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state AUTHENTICATION2
WPA: Re-initialize GMK/Counter on first station
Get randomness: len=32 entropy=2
GMK - hexdump(len=32): [REMOVED]
Get randomness: len=32 entropy=0
Key Counter - hexdump(len=32): [REMOVED]
Get randomness: len=16 entropy=0
GTK - hexdump(len=16): [REMOVED]
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=3 addr=0xd4108 key_idx=1 set_tx=1 seq_len=0 key_len=16
nl80211: KEY_DATA - hexdump(len=16): [REMOVED]
   broadcast key
Get randomness: len=32 entropy=0
WPA: Assign ANonce - hexdump(len=32): 24 dc 8c ee eb ef 10 9b 95 f6 e0 61 e2 15 20 e0 4f 87 89 40 97 cd 62 c1 d6 af 5f ab f2 c1 38 75
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state INITPSK
Searching a PSK for XX:XX:XX:XX:XX:XX prev_psk=(nil)
Searching a PSK for XX:XX:XX:XX:XX:XX prev_psk=(nil)
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state PTKSTART
wlan0: STA XX:XX:XX:XX:XX:XX WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=0 mic=0 ack=1 install=0 pairwise=1 kde_len=0 keyidx=0 encr=0)
WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 01
WPA: Use EAPOL-Key timeout of 1000 ms (retry counter 1)
wlan0: hostapd_new_assoc_sta: reschedule ap_handle_timer timeout for XX:XX:XX:XX:XX:XX (300 seconds - ap_max_inactivity)
wlan0: Event EAPOL_RX (24) received
IEEE 802.1X: 121 bytes from XX:XX:XX:XX:XX:XX
   IEEE 802.1X: version=1 type=3 length=117
WPA: Received EAPOL-Key from XX:XX:XX:XX:XX:XX key_info=0x10a type=2 key_data_length=22
WPA: Received Key Nonce - hexdump(len=32): 67 fa b7 17 36 e3 b1 21 74 ff b9 95 b4 34 20 2c ae e2 8c ca e9 35 3f 5c 9e d1 7a 97 1c 0e a1 6a
WPA: Received Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 01
wlan0: STA XX:XX:XX:XX:XX:XX WPA: received EAPOL-Key frame (2/4 Pairwise)
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state PTKCALCNEGOTIATING
Searching a PSK for XX:XX:XX:XX:XX:XX prev_psk=(nil)
WPA: PTK derivation - A1=YY:YY:YY:YY:YY:YY A2=XX:XX:XX:XX:XX:XX
WPA: Nonce1 - hexdump(len=32): 24 dc 8c ee eb ef 10 9b 95 f6 e0 61 e2 15 20 e0 4f 87 89 40 97 cd 62 c1 d6 af 5f ab f2 c1 38 75
WPA: Nonce2 - hexdump(len=32): 67 fa b7 17 36 e3 b1 21 74 ff b9 95 b4 34 20 2c ae e2 8c ca e9 35 3f 5c 9e d1 7a 97 1c 0e a1 6a
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=48): [REMOVED]
WPA: KCK - hexdump(len=16): [REMOVED]
WPA: KEK - hexdump(len=16): [REMOVED]
WPA: TK - hexdump(len=16): [REMOVED]
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state PTKCALCNEGOTIATING2
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state PTKINITNEGOTIATING
wlan0: STA XX:XX:XX:XX:XX:XX WPA: sending 3/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=1 mic=1 ack=1 install=1 pairwise=1 kde_len=46 keyidx=1 encr=1)
WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 02
Plaintext EAPOL-Key Key Data - hexdump(len=56): [REMOVED]
WPA: Use EAPOL-Key timeout of 1000 ms (retry counter 1)
wlan0: Event EAPOL_RX (24) received
IEEE 802.1X: 99 bytes from XX:XX:XX:XX:XX:XX
   IEEE 802.1X: version=1 type=3 length=95
WPA: Received EAPOL-Key from XX:XX:XX:XX:XX:XX key_info=0x30a type=2 key_data_length=0
WPA: Received Key Nonce - hexdump(len=32): 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 00 00 00 00 00 00 00
WPA: Received Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 02
wlan0: STA XX:XX:XX:XX:XX:XX WPA: received EAPOL-Key frame (4/4 Pairwise)
WPA: XX:XX:XX:XX:XX:XX WPA_PTK entering state PTKINITDONE
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=3 addr=0x15dd620 key_idx=0 set_tx=1 seq_len=0 key_len=16
nl80211: KEY_DATA - hexdump(len=16): [REMOVED]
   addr=XX:XX:XX:XX:XX:XX
wlan0: AP-STA-CONNECTED XX:XX:XX:XX:XX:XX
nl80211: Set STA flags - ifname=wlan0 addr=XX:XX:XX:XX:XX:XX total_flags=0x61 flags_or=0x1 flags_and=0xffffffff authorized=1
wlan0: STA XX:XX:XX:XX:XX:XX IEEE 802.1X: authorizing port
wlan0: STA XX:XX:XX:XX:XX:XX RADIUS: starting accounting session 56B92554110ED9AA
wlan0: STA XX:XX:XX:XX:XX:XX WPA: pairwise key handshake completed (RSN)
ccleaud commented 5 years ago

Some more details about my Pi, even if the problem is solved using a newer version of hostapd:

lshw
XXXXXXXX
    description: ARMv7 Processor rev 4 (v7l)
    product: Raspberry Pi 3 Model B Rev 1.2
    width: 32 bits
    capabilities: smp
[...]
  *-network:0
       description: Wireless interface
       physical id: 2
       logical name: wlan0
       serial: XX:XX:XX:XX:XX:XX
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=brcmfmac driverversion=7.45.98.38 firmware=01-e58d219f ip=172.16.0.1 multicast=yes wireless=IEEE 802.11
XECDesign commented 5 years ago

The packages have been uploaded to the stretch repo.

locinus commented 4 years ago

Hi. Snoopy noob question here (not familiar with the apt-get world): in @ccleaud solution, I block on:

dpkg -i hostapd_2.6-21~bpo9~rpt1_armhf.deb

=> cannot access archive: No such file or directory (or Unable to locate package if I try apt-get install). I suppose it's a repository that I haven't set on my Raspberry? (though I see it in /etc/apt/sources.list.d/raspi.list)

Could you tell in details how to actually install that very package?

thepigeonoftime commented 4 years ago

@locinus You can download the file from here https://archive.raspberrypi.org/debian/pool/main/w/wpa/

AntonElsesser commented 2 years ago

Is there any update to this topic, because I have the same problem with the latest image and updates. Also a downgrade not helped for me.

WIFI Adapter

Bus 001 Device 004: ID 0bda:8179 Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter

hostapd -v hostapd v2.8-devel User space daemon for IEEE 802.11 AP management, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator Copyright (c) 2002-2019, Jouni Malinen j@w1.fi and contributors

root@raspberrypi:~# hostapd -dd /etc/hostapd/hostapd.conf random: getrandom() support available Configuration file: /etc/hostapd/hostapd.conf nl80211: Driver does not support authentication/association or connect commands nl80211: deinit ifname=wlan0 disabled_11b_rates=0 nl80211: Remove monitor interface: refcount=0 netlink: Operstate: ifindex=3 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP) nl80211: Set mode ifindex 3 iftype 2 (STATION) nl80211: Failed to set interface 3 to mode 2: -19 (No such device) nl80211 driver initialization failed. hostapd_interface_deinit_free(0x1e8f020) hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1 hostapd_interface_deinit(0x1e8f020) wlan0: interface state UNINITIALIZED->DISABLED hostapd_bss_deinit: deinit bss wlan0 wlan0: AP-DISABLED hostapd_cleanup(hapd=0x1e8fda0 (wlan0)) wlan0: CTRL-EVENT-TERMINATING hostapd_free_hapd_data: Interface wlan0 wasn't started hostapd_interface_deinit_free: driver=(nil) drv_priv=(nil) -> hapd_deinit hostapd_interface_free(0x1e8f020) hostapd_interface_free: free hapd 0x1e8fda0 hostapd_cleanup_iface(0x1e8f020) hostapd_cleanup_iface_partial(0x1e8f020) hostapd_cleanup_iface: free iface=0x1e8f020