Score:0

networkmanager wifi not connecting, wpa_supplicant is ok

cy flag

I am trying to setup access point on one computer and connect from another. Here is access point config (/etc/NetworkManager/system-connections/Hotspot.nmconnection):

[connection]
id=Hotspot
uuid=590dd05e-61eb-41e0-aa4f-b838c5675d77
type=wifi
autoconnect=false
interface-name=wlan0
timestamp=1675612177

[wifi]
band=a
channel=149
mode=ap
ssid=MyAccessPoint_5G

[wifi-security]
auth-alg=open
group=ccmp;
key-mgmt=wpa-psk
pairwise=ccmp;
proto=rsn;
psk=SuperSecret

[ipv4]
method=shared

[ipv6]
addr-gen-mode=stable-privacy
method=ignore

[proxy]

This config was created by

nmcli wifi hotspot ifname wlan0 ssid MyAccessPoint_5G password SuperSecret

On another computer (notebook) I am trying to connect to this hotspot using nm-applet. It tries for several seconds and fails, asking for password again.

Here is entry that it creates at (/etc/NetworkManager/system-connections/MyAccessPoint_5G.nmconnection)

[connection]
id=MyAccessPoint_5G
uuid=0a595f1c-925c-4904-861e-a96e21fbad24
type=wifi
interface-name=wlp5s0

[wifi]
mode=infrastructure
ssid=MyAccessPoint_5G

[wifi-security]
auth-alg=open
key-mgmt=wpa-psk
psk=SuperSecret

[ipv4]
method=auto

[ipv6]
addr-gen-mode=stable-privacy
method=auto

[proxy]

Here are logs from journal:

Feb 05 19:01:51 basilioe480 wpa_supplicant[1211]: wlp5s0: CTRL-EVENT-SSID-REENABLED id=0 ssid="MyAcessPoing_5G"
Feb 05 19:01:51 basilioe480 wpa_supplicant[1211]: wlp5s0: SME: Trying to authenticate with a8:39:2f:50:86:b7 (SSID='MyAcessPoing_5G' freq=5745 MHz)
Feb 05 19:01:51 basilioe480 kernel: wlp5s0: authenticate with a8:39:2f:50:86:b7
Feb 05 19:01:51 basilioe480 kernel: wlp5s0: send auth to a8:39:2f:50:86:b7 (try 1/3)
Feb 05 19:01:51 basilioe480 NetworkManager[1173]: <info>  [1675612911.8143] device (wlp5s0): supplicant interface state: scanning -> authenticating
Feb 05 19:01:51 basilioe480 NetworkManager[1173]: <info>  [1675612911.8144] device (p2p-dev-wlp5s0): supplicant management interface state: scanning -> authenticating
Feb 05 19:01:51 basilioe480 wpa_supplicant[1211]: wlp5s0: Trying to associate with a8:39:2f:50:86:b7 (SSID='MyAcessPoing_5G' freq=5745 MHz)
Feb 05 19:01:51 basilioe480 kernel: wlp5s0: authenticated
Feb 05 19:01:51 basilioe480 kernel: wlp5s0: associate with a8:39:2f:50:86:b7 (try 1/3)
Feb 05 19:01:51 basilioe480 NetworkManager[1173]: <info>  [1675612911.8227] device (wlp5s0): supplicant interface state: authenticating -> associating
Feb 05 19:01:51 basilioe480 NetworkManager[1173]: <info>  [1675612911.8228] device (p2p-dev-wlp5s0): supplicant management interface state: authenticating -> associating
Feb 05 19:01:51 basilioe480 kernel: wlp5s0: RX AssocResp from a8:39:2f:50:86:b7 (capab=0x8111 status=43 aid=0)
Feb 05 19:01:51 basilioe480 kernel: wlp5s0: a8:39:2f:50:86:b7 denied association (code=43)
Feb 05 19:01:51 basilioe480 wpa_supplicant[1211]: wlp5s0: CTRL-EVENT-ASSOC-REJECT bssid=a8:39:2f:50:86:b7 status_code=43
Feb 05 19:01:51 basilioe480 wpa_supplicant[1211]: wlp5s0: SME: Deauth request to the driver failed
Feb 05 19:01:51 basilioe480 wpa_supplicant[1211]: BSSID a8:39:2f:50:86:b7 ignore list count incremented to 2, ignoring for 10 seconds
Feb 05 19:01:51 basilioe480 wpa_supplicant[1211]: wlp5s0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="MyAcessPoing_5G" auth_failures=2 duration=20 reason=CONN_FAILED
Feb 05 19:01:51 basilioe480 NetworkManager[1173]: <info>  [1675612911.8710] device (wlp5s0): supplicant interface state: associating -> disconnected
Feb 05 19:01:51 basilioe480 NetworkManager[1173]: <info>  [1675612911.8711] device (p2p-dev-wlp5s0): supplicant management interface state: associating -> disconnected
Feb 05 19:01:53 basilioe480 dhclient[6958]: DHCPDISCOVER on enp3s0 to 255.255.255.255 port 67 interval 3 (xid=0xe42bf937)
Feb 05 19:01:56 basilioe480 dhclient[6958]: DHCPDISCOVER on enp3s0 to 255.255.255.255 port 67 interval 8 (xid=0xe42bf937)
Feb 05 19:02:01 basilioe480 NetworkManager[1173]: <info>  [1675612921.8739] device (wlp5s0): supplicant interface state: disconnected -> scanning
Feb 05 19:02:01 basilioe480 NetworkManager[1173]: <info>  [1675612921.8740] device (p2p-dev-wlp5s0): supplicant management interface state: disconnected -> scanning

I created a simple config using wpa_passphrase:

network={
    ssid="MyAccessPoint_5G"
    #psk="SuperSecret"
    psk=8c2193dd5c26d1ce18553fdd17e3b1a93af3650f5d1fecaabf7efe2f4c162122
}

And when I start wpa_supplicant by hand it connects without problem.

$ sudo wpa_supplicant -cmyap.conf -iwlp5s0

Successfully initialized wpa_supplicant
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: Could not set interface 'p2p-dev-wlp5s0' UP
nl80211: deinit ifname=p2p-dev-wlp5s0 disabled_11b_rates=0
p2p-dev-wlp5s0: Failed to initialize driver interface
p2p-dev-wlp5s0: CTRL-EVENT-DSCP-POLICY clear_all
P2P: Failed to enable P2P Device interface
wlp5s0: SME: Trying to authenticate with a8:39:2f:50:86:b7 (SSID='MyAccessPoint_5G' freq=5745 MHz)
wlp5s0: Trying to associate with a8:39:2f:50:86:b7 (SSID='MyAccessPoint_5G' freq=5745 MHz)
wlp5s0: Associated with a8:39:2f:50:86:b7
wlp5s0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
wlp5s0: WPA: Key negotiation completed with a8:39:2f:50:86:b7 [PTK=CCMP GTK=CCMP]
wlp5s0: CTRL-EVENT-CONNECTED - Connection to a8:39:2f:50:86:b7 completed [id=0 id_str=]

Access point is Orange Pi Zero 2 (Allwinner H616 64-bit high-performance Quad-core Cortex-A53 processor, AW859A Chip Support IEEE 802.11 a/b/g/n/ac), running Ubuntu 22.04.1 LTS (aarch64)

Notebook is Thinkpad e480, wireless card is Intel Dual Band Wireless-AC 3165, running Ubuntu 22.04.1 LTS

Jeremy31 avatar
ke flag
Try with group and pairwise set to aes under wifi security on the hotspot
Vasily Olekhov avatar
cy flag
# nmcli connection modify Hotspot 802-11-wireless-security.group aes 802-11-wireless-security.pairwise ccmp Error: failed to modify 802-11-wireless-security.group: 'aes' not among [wep40, wep104, tkip, ccmp] Changed to group to tkimp and pairwise to aes, with no effect
Vasily Olekhov avatar
cy flag
Error: failed to modify 802-11-wireless-security.pairwise: 'aes' not among [tkip, ccmp]
Score:0
cy flag

The problem solved, once I change proto to wpa. By default, Hotspot was created with proto set to rsn.

There was no setting for proto in NetworkManager configuration, I've figured it from hotspot logs:

Feb 07 15:10:52 bedroomap NetworkManager[641]: <info>  [1675782652.3346] Config: added 'ssid' value 'MyAccessPoint_5G'
Feb 07 15:10:52 bedroomap NetworkManager[641]: <info>  [1675782652.3348] Config: added 'mode' value '2'
Feb 07 15:10:52 bedroomap NetworkManager[641]: <info>  [1675782652.3349] Config: added 'frequency' value '5745'
Feb 07 15:10:52 bedroomap NetworkManager[641]: <info>  [1675782652.3349] Config: added 'freq_list' value '5745'
Feb 07 15:10:52 bedroomap NetworkManager[641]: <info>  [1675782652.3350] Config: added 'key_mgmt' value 'WPA-PSK WPA-PSK-SHA256'
Feb 07 15:10:52 bedroomap NetworkManager[641]: <info>  [1675782652.3351] Config: added 'auth_alg' value 'OPEN'
Feb 07 15:10:52 bedroomap NetworkManager[641]: <info>  [1675782652.3351] Config: added 'psk' value '<hidden>'
Feb 07 15:10:52 bedroomap NetworkManager[641]: <info>  [1675782652.3352] Config: added 'proto' value 'RSN'
Feb 07 15:10:52 bedroomap NetworkManager[641]: <info>  [1675782652.3353] Config: added 'pairwise' value 'CCMP'
Feb 07 15:10:52 bedroomap NetworkManager[641]: <info>  [1675782652.3354] Config: added 'group' value 'CCMP'

I've added proto wpa and all worked:

# nmcli connection modify Hotspot 802-11-wireless-security.proto wpa
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.