3

I am attempting to connect a Rpi4 to an AP running on my laptop, but it won't connect. I don't see any obvious problems (to me) in wpa_supplicant or other config files. I have run wpa_supplicant in debug mode, but don't understand most of the output.

My setup is as follows

Laptop (running hostapd/dnsmasq):

(Ubuntu 18.04.4 LTS, Linux 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux), running hostapd/dnsmasq on Penguin Wireless N USB Adapter for GNU / Linux (TPE-N150USB)

Rpi4:

Raspbian GNU/Linux 10 (buster), Linux raspberrypi 4.19.97-v7l+ #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l GNU/Linux

Also running hostapd/dnsmasq on Penguin Wireless N USB Adapter for GNU / Linux (TPE-N150USB) via wlan1, but attempting to connect to Laptop AP on wlan0 with wpa_supplicant.

Note: Using the same configurations, I am able to connect to the laptop using a Rpi3 and Rpi0w. This leads me to believe it may be a problem with buster, but I can't seem to figure out what's happening.

Laptop /etc/hostapd/hostapd.conf:

##### hostapd configuration file ##############################################

# AP netdevice name (without 'ap' postfix
interface=wlx2824ff1a0a09

# Driver interface type (hostap/wired/none/nl80211/bsd);
driver=nl80211

# hostapd event logger configuration
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2

# Interface for separate control program
ctrl_interface=/var/run/hostapd

# Access control for the control interface can be configured
ctrl_interface_group=0


##### IEEE 802.11 related configuration #######################################

# SSID to be used in IEEE 802.11 management frames
ssid=<mySSID>

# Operation mode (a = IEEE 802.11a (5 GHz), b = IEEE 802.11b (2.4 GHz),
# g = IEEE 802.11g (2.4 GHz)
hw_mode=g

# Channel number (IEEE 802.11)
channel=1

# Beacon interval in kus (1.024 ms) (default: 100; range 15..65535)
beacon_int=100

# DTIM (delivery traffic information message) period
dtim_period=2

# Maximum number of stations
max_num_sta=255

# RTS/CTS threshold; -1 = disabled (default)
rts_threshold=-1

# Fragmentation threshold; -1 = disabled (default)
fragm_threshold=-1

# Station MAC address -based authentication
# 0 = accept unless in deny list
macaddr_acl=0

# IEEE 802.11 specifies two authentication algorithms. hostapd can be
# configured to allow both of these or only one. Open system authentication
# should be used with IEEE 802.1X.
# Bit fields of allowed authentication algorithms:
# bit 0 = Open System Authentication
# bit 1 = Shared Key Authentication (requires WEP)
auth_algs=3

# Send empty SSID in beacons and ignore probe request frames
ignore_broadcast_ssid=0

# Default WMM parameters (IEEE 802.11 draft; 11-03-0504-03-000e):
# for 802.11a or 802.11g networks
wmm_enabled=1
#
# WMM-PS Unscheduled Automatic Power Save Delivery [U-APSD]
# Enable this flag if U-APSD supported outside hostapd (eg., Firmware/driver)
#uapsd_advertisement_enabled=1
#
# Low priority / AC_BK = background
wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0
# Note: for IEEE 802.11b mode: cWmin=5 cWmax=10
#
# Normal priority / AC_BE = best effort
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=4
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0
# Note: for IEEE 802.11b mode: cWmin=5 cWmax=7
#
# High priority / AC_VI = video
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmax=4
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0
# Note: for IEEE 802.11b mode: cWmin=4 cWmax=5 txop_limit=188
#
# Highest priority / AC_VO = voice
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47
wmm_ac_vo_acm=0
# Note: for IEEE 802.11b mode: cWmin=3 cWmax=4 burst=102

##### Integrated EAP server ###################################################
eap_server=0

##### RADIUS client configuration #############################################
# The own IP address of the access point (used as NAS-IP-Address)
own_ip_addr=127.0.0.1

##### WPA/IEEE 802.11i configuration ##########################################

# Enable WPA. Setting this variable configures the AP to require WPA (either
# WPA-PSK or WPA-RADIUS/EAP based on other configuration)
wpa=2

# WPA pre-shared keys for WPA-PSK. This can be either
wpa_passphrase=<my-passphrase>

# Set of accepted key management algorithms (WPA-PSK, WPA-EAP, or both)
wpa_key_mgmt=WPA-PSK WPA-EAP WPA-PSK-SHA256 WPA-EAP-SHA256

# Time interval for rekeying GTK (broadcast/multicast encryption keys) in
# seconds. (dot11RSNAConfigGroupRekeyTime)
wpa_group_rekey=6000

Running 'ip addr' on the Laptop:

3: wlp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:24:d6:15:af:ce brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.199/24 brd 192.168.1.255 scope global dynamic noprefixroute wlp4s0
       valid_lft 85037sec preferred_lft 85037sec
    inet6 2600:1700:8a71:d50::56a/128 scope global dynamic noprefixroute 
       valid_lft 2590644sec preferred_lft 603444sec
    inet6 2600:1700:8a71:d50:94c4:6bd1:5a00:508c/64 scope global temporary dynamic 
       valid_lft 3535sec preferred_lft 3535sec
    inet6 2600:1700:8a71:d50:484b:b4ca:cd48:8c26/64 scope global dynamic mngtmpaddr noprefixroute 
       valid_lft 3535sec preferred_lft 3535sec
    inet6 fe80::4556:2b1:39ac:6415/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
4: wlx2824ff1a0a09: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 28:24:ff:1a:0a:09 brd ff:ff:ff:ff:ff:ff
    inet 192.168.7.1/24 brd 192.168.7.255 scope global wlx2824ff1a0a09
       valid_lft forever preferred_lft forever
    inet6 fe80::2a24:ffff:fe1a:a09/64 scope link 
       valid_lft forever preferred_lft forever

Running sudo tail -f /var/log/syslog | grep hostapd returns the following:

=Edit: Updated log from verbose debug=

Mar 30 16:09:04  hostapd: STA dc:a6:32:65:20:cc IEEE 802.11: authentication OK (open system)
Mar 30 16:09:04  hostapd: STA dc:a6:32:65:20:cc MLME: MLME-AUTHENTICATE.indication(dc:a6:32:65:20:cc, OPEN_SYSTEM)
Mar 30 16:09:04  hostapd: STA dc:a6:32:65:20:cc MLME: MLME-DELETEKEYS.request(dc:a6:32:65:20:cc)
Mar 30 16:09:04  hostapd: STA dc:a6:32:65:20:cc IEEE 802.11: authenticated
Mar 30 16:09:04  hostapd: STA dc:a6:32:65:20:cc IEEE 802.11: association OK (aid 1)
Mar 30 16:09:04  hostapd: STA dc:a6:32:65:20:cc IEEE 802.11: associated (aid 1)
Mar 30 16:09:04  hostapd: STA dc:a6:32:65:20:cc MLME: MLME-ASSOCIATE.indication(dc:a6:32:65:20:cc)
Mar 30 16:09:04  hostapd: STA dc:a6:32:65:20:cc MLME: MLME-DELETEKEYS.request(dc:a6:32:65:20:cc)
Mar 30 16:09:04  hostapd: STA dc:a6:32:65:20:cc IEEE 802.11: binding station to interface 'wlx2824ff1a0a09'
Mar 30 16:09:04  hostapd: STA dc:a6:32:65:20:cc WPA: event 1 notification
Mar 30 16:09:04  hostapd: STA dc:a6:32:65:20:cc WPA: start authentication
Mar 30 16:09:04  hostapd: STA dc:a6:32:65:20:cc IEEE 802.1X: unauthorizing port
Mar 30 16:09:04  hostapd: STA dc:a6:32:65:20:cc WPA: sending 1/4 msg of 4-Way Handshake
Mar 30 16:09:04  hostapd: STA dc:a6:32:65:20:cc WPA: received EAPOL-Key frame (2/4 Pairwise)
Mar 30 16:09:04  hostapd: STA dc:a6:32:65:20:cc WPA: invalid MIC in msg 2/4 of 4-Way Handshake
Mar 30 16:09:05  hostapd: STA dc:a6:32:65:20:cc WPA: EAPOL-Key timeout
Mar 30 16:09:05  hostapd: STA dc:a6:32:65:20:cc WPA: sending 1/4 msg of 4-Way Handshake
Mar 30 16:09:05  hostapd: STA dc:a6:32:65:20:cc WPA: received EAPOL-Key frame (2/4 Pairwise)
Mar 30 16:09:05  hostapd: STA dc:a6:32:65:20:cc WPA: invalid MIC in msg 2/4 of 4-Way Handshake

Running ip addr on the Rpi4:

3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether dc:a6:32:65:20:cc brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.108/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0
       valid_lft 86076sec preferred_lft 75276sec
    inet6 2600:1700:8a71:d50::4ff/128 scope global dynamic noprefixroute 
       valid_lft 2591676sec preferred_lft 604476sec
    inet6 2600:1700:8a71:d50:501b:12c3:f3ca:35f9/64 scope global dynamic mngtmpaddr noprefixroute 
       valid_lft 3600sec preferred_lft 3600sec
    inet6 fe80::aaa5:ed20:f9bd:8fa7/64 scope link 
       valid_lft forever preferred_lft forever
4: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 28:24:ff:1a:1c:c5 brd ff:ff:ff:ff:ff:ff
    inet 192.168.8.1/24 brd 192.168.8.255 scope global noprefixroute wlan1
       valid_lft forever preferred_lft forever
    inet6 fe80::a77:fecc:9b35:1cb0/64 scope link 
       valid_lft forever preferred_lft forever

wlan0 falls back on <my-home-wifi>, while wlan1 is running hostapd.

Rpi4 /etc/dhcpcd.conf:

# Inform the DHCP server of our hostname for DDNS.
hostname

# Use the hardware address of the interface for the Client ID.
clientid

# Persist interface configuration when dhcpcd exits.
persistent

# Rapid commit support.
option rapid_commit

# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu

# A ServerID is required by RFC2131.
require dhcp_server_identifier

# Generate SLAAC address using the Hardware Address of the interface
#slaac hwaddr
# OR generate Stable Private IPv6 Addresses based from the DUID
slaac private

#static IP configuration:
interface wlan1
static ip_address=192.168.8.1/24
nohook wpa_supplicant

Rpi4 /etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US

network={
    ssid="<mySSID>"
    psk="<my-passphrase>"
    key_mgmt=WPA-PSK
    priority=2
}

network={
    ssid="<my-home-wifi>"
    psk="<home-wifi-passphrase>"
    key_mgmt=WPA-PSK
    priority=1
}

Finally, I tried running wpa_supplicant in debug mode:

sudo killall wpa_supplicant

sudo /sbin/wpa_supplicant -d -c/etc/wpa_supplicant/wpa_supplicant.conf -Dnl80211 -iwlan0 > wpa_supplicant_debug

I can see that it is attempting to connect to my laptop's AP, but I am not seeing exactly what's causing it to fail. I also see after a couple attempts that it blacklists the AP and falls back on <my-home-wifi>.

wlan0: 2: 28:24:ff:1a:0a:09 ssid='mySSID' wpa_ie_len=0 rsn_ie_len=32 caps=0x411 level=-50 freq=2412 
wlan0:    selected based on RSN IE
wlan0:    selected BSS 28:24:ff:1a:0a:09 ssid='mySSID'
wlan0: Considering connect request: reassociate: 0  selected: 28:24:ff:1a:0a:09  bssid: 00:00:00:00:00:00  pending: 00:00:00:00:00:00  wpa_state: SCANNING  ssid=0x1bd8170  current_ssid=(nil)
wlan0: Request association with 28:24:ff:1a:0a:09
TDLS: TDLS is allowed in the target BSS
TDLS: TDLS channel switch allowed in the target BSS
wlan0: No ongoing scan/p2p-scan found to abort
wlan0: Add radio work 'connect'@0x1bfeee0
wlan0: First radio work item in the queue - schedule start immediately
RSN: Ignored PMKID candidate without preauth flag
p2p-dev-wlan0: Updating scan results from sibling
nl80211: Received scan results (9 BSSes)
p2p-dev-wlan0: BSS: Start scan result update 1
p2p-dev-wlan0: BSS: Add new id 0 BSSID e0:22:02:5b:e7:e1 SSID 'my-home-wifi' freq 2462
p2p-dev-wlan0: BSS: Add new id 1 BSSID 28:24:ff:1a:1c:c5 SSID 'other-wifi' freq 2412
p2p-dev-wlan0: BSS: Add new id 2 BSSID 28:24:ff:1a:0a:09 SSID 'mySSID' freq 2412
p2p-dev-wlan0: BSS: Add new id 3 BSSID e0:22:02:5b:e7:ea SSID 'my-home-wifi' freq 5560
p2p-dev-wlan0: BSS: Add new id 4 BSSID 98:da:c4:16:02:8a SSID 'other-wifi' freq 2447
p2p-dev-wlan0: BSS: Add new id 5 BSSID 50:c7:bf:e9:85:1f SSID 'other-wifi' freq 2427
p2p-dev-wlan0: BSS: Add new id 6 BSSID 4c:ed:fb:4a:aa:10 SSID 'other-wifi' freq 2417
p2p-dev-wlan0: BSS: Add new id 7 BSSID 14:ed:bb:a6:26:22 SSID 'other-wifi' freq 5280
p2p-dev-wlan0: BSS: Add new id 8 BSSID fa:8f:ca:81:2b:4a SSID '' freq 2432
BSS: last_scan_res_used=9/32
wlan0: Starting radio work 'connect'@0x1bfeee0 after 0.001017 second wait
wlan0: Trying to associate with SSID 'mySSID'
wlan0: Cancelling scan request
wlan0: WPA: clearing own WPA/RSN IE
RSN: PMKSA cache search - network_ctx=0x1bd8170 try_opportunistic=0 akmp=0x0
RSN: Search for BSSID 28:24:ff:1a:0a:09
RSN: No PMKSA cache entry found
wlan0: RSN: using IEEE 802.11i/D9.0
wlan0: WPA: Selected cipher suites: group 8 pairwise 8 key_mgmt 387 proto 2
wlan0: WPA: Selected mgmt group cipher 32
wlan0: WPA: clearing AP WPA IE
WPA: set AP RSN IE - hexdump(len=34): 30 20 01 00 00 0f ac 02 01 00 00 0f ac 02 04 00 00 0f ac 01 00 0f ac 02 00 0f ac 05 00 0f ac 06 0c 00
wlan0: WPA: using GTK TKIP
wlan0: WPA: using PTK TKIP
wlan0: WPA: using KEY_MGMT WPA-PSK
wlan0: WPA: not using MGMT group cipher
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 02 01 00 00 0f ac 02 01 00 00 0f ac 02 00 00
WPA: Set PMK based on external data - hexdump(len=32): [REMOVED]
wlan0: Automatic auth_alg selection: 0x1
Added supported operating classes IE - hexdump(len=22): 3b 14 51 51 53 54 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f 80 81 82
wlan0: State: SCANNING -> ASSOCIATING
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
wlan0: Determining shared radio frequencies (max len 2)
wlan0: Shared frequencies (len=0): completed iteration
P2P: Update channel list
P2P: channels: 81:1,2,3,4,5,6,7,8,9,10,11 115:36,40,44,48 116:36,44 117:40,48 124:149,153,157,161 125:149,153,157,161,165 126:149,157 127:153,161 128:36,40,44,48 130:36,40,44,48
P2P: cli_channels:
wlan0: set_disable_max_amsdu: -1
wlan0: set_ampdu_factor: -1
wlan0: set_ampdu_density: -1
wlan0: set_disable_ht40: 0
wlan0: set_disable_sgi: 0
wlan0: set_disable_ldpc: 0
wlan0: set_rx_stbc: -1
wlan0: set_tx_stbc: -1
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Unsubscribe mgmt frames handle 0x8935f359 (mode change)
nl80211: Subscribe to mgmt frames with non-AP handle 0x1bd7bd0
nl80211: Key management set PSK
nl80211: Connect (ifindex=3)
  * bssid_hint=28:24:ff:1a:0a:09
  * freq_hint=2412
  * SSID - hexdump_ascii(len=5):
     70 66 6e 65 74                                    mySSID           
  * IEs - hexdump(len=44): 30 14 01 00 00 0f ac 02 01 00 00 0f ac 02 01 00 00 0f ac 02 00 00 3b 14 51 51 53 54 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f 80 81 82
  * WPA Versions 0x2
  * pairwise=0xfac02
  * group=0xfac02
  * akm=0xfac02
  * WANT_1X_4WAY_HS
  * PSK - hexdump(len=32): [REMOVED]
  * htcaps - 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
  * 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
  * vhtcaps - hexdump(len=12): 00 00 00 00 00 00 00 00 00 00 00 00
  * vhtcaps_mask - hexdump(len=12): 00 00 00 00 00 00 00 00 00 00 00 00
  * Auth Type 0
nl80211: Connect request send successfully
wlan0: Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
RTM_NEWLINK: ifi_index=3 ifname=wlan0 wext ifi_family=0 ifi_flags=0x1003 ([UP])
nl80211: Ignored event (cmd=46) for foreign interface (ifindex 3 wdev 0x0)
nl80211: Drv Event 46 (NL80211_CMD_CONNECT) received for wlan0
nl80211: Connect event (status=16 ignore_next_local_disconnect=0)
wlan0: Event ASSOC_REJECT (12) received
wlan0: CTRL-EVENT-ASSOC-REJECT bssid=28:24:ff:1a:0a:09 status_code=16
wlan0: Radio work 'connect'@0x1bfeee0 done in 6.764054 seconds
wlan0: radio_work_free('connect'@0x1bfeee0): num_active_works --> 0
Added BSSID 28:24:ff:1a:0a:09 into blacklist
wlan0: Blacklist count 1 --> request scan in 100 ms
wlan0: Setting scan request: 0.100000 sec
nl80211: Data frame filter flags=0x0
wlan0: State: ASSOCIATING -> DISCONNECTED
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
wlan0: Determining shared radio frequencies (max len 2)
wlan0: Shared frequencies (len=0): completed iteration
P2P: Update channel list
P2P: channels: 81:1,2,3,4,5,6,7,8,9,10,11 115:36,40,44,48 116:36,44 117:40,48 124:149,153,157,161 125:149,153,157,161,165 126:149,157 127:153,161 128:36,40,44,48 130:36,40,44,48
P2P: cli_channels:
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
wlan0: State: DISCONNECTED -> SCANNING
wlan0: Determining shared radio frequencies (max len 2)
wlan0: Shared frequencies (len=0): completed iteration
P2P: channels: 81:1,2,3,4,5,6,7,8,9,10,11 115:36,40,44,48 116:36,44 117:40,48 124:149,153,157,161 125:149,153,157,161,165 126:149,157 127:153,161 128:36,40,44,48 130:36,40,44,48
P2P: cli_channels:
wlan0: Starting AP scan for wildcard SSID
WPS: Building WPS IE for Probe Request
WPS:  * Version (hardcoded 0x10)
WPS:  * Request Type
WPS:  * Config Methods (3148)
WPS:  * UUID-E
WPS:  * Primary Device Type
WPS:  * RF Bands (3)
WPS:  * Association State
WPS:  * Configuration Error (0)
WPS:  * Device Password ID (0)
WPS:  * Manufacturer
WPS:  * Model Name
WPS:  * Model Number
WPS:  * Device Name
WPS:  * Version2 (0x20)
P2P: * P2P IE header
P2P: * Capability dev=25 group=00
P2P: * Listen Channel: Regulatory Class 81 Channel 11
wlan0: Add radio work 'scan'@0x1bfa1a8
wlan0: First radio work item in the queue - schedule start immediately
wlan0: Starting radio work 'scan'@0x1bfa1a8 after 0.000057 second wait
wlan0: nl80211: scan request
Scan requested (ret=0) - scan timeout 30 seconds
nl80211: Ignored event (cmd=33) for foreign interface (ifindex 3 wdev 0x0)
nl80211: Drv Event 33 (NL80211_CMD_TRIGGER_SCAN) received for wlan0
wlan0: nl80211: Scan trigger
wlan0: Event SCAN_STARTED (46) received
wlan0: Own scan request started a scan in 0.000179 seconds
nl80211: Ignored event (cmd=34) for foreign interface (ifindex 3 wdev 0x0)
nl80211: Drv Event 34 (NL80211_CMD_NEW_SCAN_RESULTS) received for wlan0
wlan0: nl80211: New scan results available
nl80211: Scan probed for SSID ''
nl80211: Scan included frequencies: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 5180 5200 5220 5240 5260 5280 5300 5320 5500 5520 5540 5560 5580 5600 5620 5640 5660 5680 5700 5720 5745 5765 5785 5805 5825
wlan0: Event SCAN_RESULTS (3) received
wlan0: Scan completed in 3.918794 seconds
nl80211: Received scan results (11 BSSes)
wlan0: BSS: Start scan result update 2
wlan0: BSS: Add new id 9 BSSID 9e:da:c4:16:02:8a SSID '' freq 2447
wlan0: BSS: Add new id 10 BSSID 88:41:fc:69:51:29 SSID 'FTRSecure_4920_49D7' freq 5660
BSS: last_scan_res_used=11/32
wlan0: New scan results available (own=1 ext=0)
WPS: Unsupported attribute type 0x1058 len=24
WPS: Unsupported attribute type 0x1058 len=24
WPS: Unsupported attribute type 0x1058 len=24
WPS: Unsupported attribute type 0x1058 len=24
WPS: Unsupported attribute type 0x1058 len=24
WPS: Unsupported attribute type 0x1058 len=24
WPS: Unsupported attribute type 0x1058 len=24
WPS: Unsupported attribute type 0x1058 len=24
WPS: Unsupported attribute type 0x1058 len=24
WPS: AP 88:41:fc:69:51:29 type 1 added
WPS: Unsupported attribute type 0x1058 len=24
WPS: Unsupported attribute type 0x1058 len=24
WPS: Unsupported attribute type 0x1058 len=24
wlan0: Radio work 'scan'@0x1bfa1a8 done in 3.923617 seconds
wlan0: radio_work_free('scan'@0x1bfa1a8): num_active_works --> 0
wlan0: Selecting BSS from priority group 2
wlan0: 0: e0:22:02:5b:e7:e1 ssid='my-home-wifi' wpa_ie_len=0 rsn_ie_len=20 caps=0x411 level=-61 freq=2462  wps
wlan0:    skip - SSID mismatch
wlan0: 1: 28:24:ff:1a:1c:c5 ssid='other-wifi' wpa_ie_len=0 rsn_ie_len=32 caps=0x411 level=-19 freq=2412 
wlan0:    skip - SSID mismatch
wlan0: 2: 28:24:ff:1a:0a:09 ssid='mySSID' wpa_ie_len=0 rsn_ie_len=32 caps=0x411 level=-48 freq=2412 
wlan0:    selected based on RSN IE
wlan0:    selected BSS 28:24:ff:1a:0a:09 ssid='mySSID'
wlan0: Considering connect request: reassociate: 0  selected: 28:24:ff:1a:0a:09  bssid: 00:00:00:00:00:00  pending: 00:00:00:00:00:00  wpa_state: SCANNING  ssid=0x1bd8170  current_ssid=(nil)
wlan0: Request association with 28:24:ff:1a:0a:09
wlan0: Re-association to the same ESS
TDLS: TDLS is allowed in the target BSS
TDLS: TDLS channel switch allowed in the target BSS
wlan0: No ongoing scan/p2p-scan found to abort
wlan0: Add radio work 'connect'@0x1bfa1a8
wlan0: First radio work item in the queue - schedule start immediately
RSN: Ignored PMKID candidate without preauth flag
p2p-dev-wlan0: Updating scan results from sibling
nl80211: Received scan results (11 BSSes)
p2p-dev-wlan0: BSS: Start scan result update 2
p2p-dev-wlan0: BSS: Add new id 9 BSSID 9e:da:c4:16:02:8a SSID '' freq 2447
p2p-dev-wlan0: BSS: Add new id 10 BSSID 88:41:fc:69:51:29 SSID 'FTRSecure_4920_49D7' freq 5660
BSS: last_scan_res_used=11/32
wlan0: Starting radio work 'connect'@0x1bfa1a8 after 0.000793 second wait
wlan0: Trying to associate with SSID 'mySSID'
wlan0: Cancelling scan request
wlan0: WPA: clearing own WPA/RSN IE
RSN: PMKSA cache search - network_ctx=0x1bd8170 try_opportunistic=0 akmp=0x0
RSN: Search for BSSID 28:24:ff:1a:0a:09
RSN: No PMKSA cache entry found
wlan0: RSN: using IEEE 802.11i/D9.0
wlan0: WPA: Selected cipher suites: group 8 pairwise 8 key_mgmt 387 proto 2
wlan0: WPA: Selected mgmt group cipher 32
wlan0: WPA: clearing AP WPA IE
WPA: set AP RSN IE - hexdump(len=34): 30 20 01 00 00 0f ac 02 01 00 00 0f ac 02 04 00 00 0f ac 01 00 0f ac 02 00 0f ac 05 00 0f ac 06 0c 00
wlan0: WPA: using GTK TKIP
wlan0: WPA: using PTK TKIP
wlan0: WPA: using KEY_MGMT WPA-PSK
wlan0: WPA: not using MGMT group cipher
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 02 01 00 00 0f ac 02 01 00 00 0f ac 02 00 00
WPA: Set PMK based on external data - hexdump(len=32): [REMOVED]
wlan0: Automatic auth_alg selection: 0x1
Added supported operating classes IE - hexdump(len=22): 3b 14 51 51 53 54 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f 80 81 82
wlan0: State: SCANNING -> ASSOCIATING
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
wlan0: Determining shared radio frequencies (max len 2)
wlan0: Shared frequencies (len=0): completed iteration
P2P: Add operating class 81
P2P: Channels - hexdump(len=11): 01 02 03 04 05 06 07 08 09 0a 0b
P2P: Add operating class 115
P2P: Channels - hexdump(len=4): 24 28 2c 30
P2P: Add operating class 116
P2P: Channels - hexdump(len=2): 24 2c
P2P: Add operating class 117
P2P: Channels - hexdump(len=2): 28 30
P2P: Add operating class 124
P2P: Channels - hexdump(len=4): 95 99 9d a1
P2P: Add operating class 125
P2P: Channels - hexdump(len=5): 95 99 9d a1 a5
P2P: Add operating class 126
P2P: Channels - hexdump(len=2): 95 9d
P2P: Add operating class 127
P2P: Channels - hexdump(len=2): 99 a1
P2P: Add operating class 128
P2P: Channels - hexdump(len=4): 24 28 2c 30
P2P: Add operating class 130
P2P: Channels - hexdump(len=4): 24 28 2c 30
P2P: Update channel list
P2P: channels: 81:1,2,3,4,5,6,7,8,9,10,11 115:36,40,44,48 116:36,44 117:40,48 124:149,153,157,161 125:149,153,157,161,165 126:149,157 127:153,161 128:36,40,44,48 130:36,40,44,48
P2P: cli_channels:
wlan0: set_disable_max_amsdu: -1
wlan0: set_ampdu_factor: -1
wlan0: set_ampdu_density: -1
wlan0: set_disable_ht40: 0
wlan0: set_disable_sgi: 0
wlan0: set_disable_ldpc: 0
wlan0: set_rx_stbc: -1
wlan0: set_tx_stbc: -1
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Unsubscribe mgmt frames handle 0x8935f359 (mode change)
nl80211: Subscribe to mgmt frames with non-AP handle 0x1bd7bd0
nl80211: Key management set PSK
nl80211: Connect (ifindex=3)
  * bssid_hint=28:24:ff:1a:0a:09
  * freq_hint=2412
  * SSID - hexdump_ascii(len=5):
     70 66 6e 65 74                                    mySSID           
  * IEs - hexdump(len=44): 30 14 01 00 00 0f ac 02 01 00 00 0f ac 02 01 00 00 0f ac 02 00 00 3b 14 51 51 53 54 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f 80 81 82
  * WPA Versions 0x2
  * pairwise=0xfac02
  * group=0xfac02
  * akm=0xfac02
  * WANT_1X_4WAY_HS
  * PSK - hexdump(len=32): [REMOVED]
  * htcaps - 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
  * 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
  * vhtcaps - hexdump(len=12): 00 00 00 00 00 00 00 00 00 00 00 00
  * vhtcaps_mask - hexdump(len=12): 00 00 00 00 00 00 00 00 00 00 00 00
  * Auth Type 0
nl80211: Connect request send successfully
wlan0: Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
RTM_NEWLINK: ifi_index=3 ifname=wlan0 wext ifi_family=0 ifi_flags=0x1003 ([UP])
nl80211: Ignored event (cmd=46) for foreign interface (ifindex 3 wdev 0x0)
nl80211: Drv Event 46 (NL80211_CMD_CONNECT) received for wlan0
nl80211: Connect event (status=16 ignore_next_local_disconnect=0)
wlan0: Event ASSOC_REJECT (12) received
wlan0: CTRL-EVENT-ASSOC-REJECT bssid=28:24:ff:1a:0a:09 status_code=16
wlan0: Radio work 'connect'@0x1bfa1a8 done in 7.945732 seconds
wlan0: radio_work_free('connect'@0x1bfa1a8): num_active_works --> 0
BSSID 28:24:ff:1a:0a:09 blacklist count incremented to 2
wlan0: Blacklist count 2 --> request scan in 500 ms
wlan0: Setting scan request: 0.500000 sec
nl80211: Data frame filter flags=0x0
wlan0: State: ASSOCIATING -> DISCONNECTED
nl80211: Set wlan0 operstate 0->0 (DORMANT)
  • 1
    It is unclear what you are trying to do and the Question lacks meaningful diagnostics, but I note you seem to be trying to use predictable network interface names AND wlan1 – Milliways Mar 28 at 23:01
  • I apologize, my question was edited which made it less obvious. I have summarized the question better at the top now. Also, predictable interface names are on the laptop, while wlan0, wlan1 are on the Rpi4. – Joey Dodson Mar 29 at 22:14
2

Thanks to @Ingo suggesting a fresh installation of Buster, I was eventually able to track down the problem, which was due to an update in the package firmware-brcm80211. The current release of Buster (2020-02-13-raspbian-buster-lite) comes with firmware-brcm80211 1:20190114-1+rpt4 and upgrading to firmware-brcm80211 1:20190114-1+rpt5 causes a failure to connect to my hostapd AP.

I was able to isolate the problem by flashing a new image of Buster lite (2020-02-13-raspbian-buster-lite) and using ifconfig to confirm that it successfully connected. I then ran sudo apt-get update. Instead of then running sudo apt-get upgrade, I installed each package separately and tested as follows:

  1. sudo apt-get install --only-upgrade <package>, followed by a reboot
  2. sudo reboot now
  3. ifconfig to confirm whether or not the upgraded package caused a failure

I then found that firmware-brcm80211 was responsible and (as a workaround) was able to downgrade/rollback to the previous version as follows:

$ wget http://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/firmware-brcm80211_20190114-1+rpt4_all.deb
$ sudo dpkg -i ./firmware-brcm80211_20190114-1+rpt4_all.deb

I also decided to place a hold on the package to prevent it from upgrading later until I am able to test a future version against this problem.

sudo apt-mark hold firmware-brcm80211

| improve this answer | |
  • Very well done (^.^)d But I cannot confirm this with my RPi 4B. I have updated my answer with this. – Ingo Apr 4 at 10:08
1

From the debug output of wpa_supplicant I see there is the old background driver wext used and that there are many "unsupported" messages. wext isn't used normally, you should use default background driver nl80211. That's what is best supported by Buster. Debug again but only with option -Dnl80211, not with fallback option -Dnl80211,wext, and show if it makes a difference. At least the debug output should change.

Update 1:
With the updated debug output using background driver nl80211, there is only shown with

wlan0: Event ASSOC_REJECT (12) received

that the remote access point doesn't accept the WPA authentication handshake. It doesn't help much. I suggest, only for testing, to flash Raspbian Buster Light and configure WLAN connection, but only with one network block in /etc/wpa_supplicant/wpa_supplicant.conf. If this works, you can compare the debug outputs.

Update 2: in respect to your own answer
You have found that your problem is the Raspbian package firmware-brcm80211 1:20190114-1+rpt5 and downgrade helped you. But I cannot confirm this. It seems you are the only one having this problem. Otherwise it would be a big problem for all of us, of course. For comparison here what I find on my Raspberry Pi 4B with Raspbian Buster Lite belonging to the WiFi firmware:

rpi ~$  apt -a list firmware-brcm80211
Listing... Done
firmware-brcm80211/testing,now 1:20190114-1+rpt5 all [installed]
firmware-brcm80211/stable 20190114-2 all

rpi ~$ journalctl | grep brcmfmac
Apr 04 09:57:57 raspberrypi kernel: brcmfmac: F1 signature read @0x18000000=0x15264345
Apr 04 09:57:57 raspberrypi kernel: brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
Apr 04 09:57:57 raspberrypi kernel: usbcore: registered new interface driver brcmfmac
Apr 04 09:57:57 raspberrypi kernel: brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
Apr 04 09:57:58 raspberrypi kernel: brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Mar  2 2020 23:30:41 version 7.45.202 (r724630 CY) FWID 01-72f6ece2
Apr 04 09:58:01 raspberrypi kernel: brcmfmac: power management disabled

With this driver I have a stable and performant wireless connection to my FRITZ!Box (a very popular internet router in Germany). Maybe there is a hardware fault on your RasPi, or the Ubuntu laptop is making the problem?

| improve this answer | |
  • I changed the driver and edited the debug output above. I had used n180211 instead of nl80211 (note the number 1), which is due to my typing it by hand. So that's why it was using wext before. However, manually running wpa_supplicant is only to figure out why it's not working automatically. The debug output still doesn't point to any solutions that I am aware of though. – Joey Dodson Mar 29 at 23:15
  • @JoeyDodson I have updated the answer. – Ingo Mar 30 at 9:06
  • Thanks for the update! Since the AP is refusing the handshake, I started by running hostapd with verbose debug logging and updated the question above. More specifically I can now see this: WPA: invalid MIC in msg 2/4 of 4-Way Handshake – Joey Dodson Mar 30 at 23:43
  • @JoeyDodson I'm a bit confused now. Can't clearly find what AP/hostapd you are talking about. You have two access points, one running on the RasPi and one running on the Ubuntu laptop. The RasPi should connect as client (STA = station) to the AP on the laptop. The AP on the RasPi has nothing to do with all of this. Can you please confirm this? If so, then shutdown the AP on the RasPi for further testing. – Ingo Mar 31 at 8:36
  • @JoeyDodson Can you please add the output of ip addr from the RasPi and the laptop to the question? This will show interface names, ip and mac addresses. – Ingo Mar 31 at 8:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.