"aborting authentication by local choice (Reason: 3=DEAUTH_LEAVING)" when trying to connect to wifi
Somehow, my firmware got trouble with long interface name. So I ran this command to prevent it:
ln -s /dev/null /etc/systemd/network/99-default.link
and it worked.
As others said the issue is caused by non-standard name the device gets (i.e. not wlan*). Linking /dev/null did not work for me, so I had to create a udev rule to rename the interface:
In
/etc/udev/rules.d/70-persistent-net.rules
add:
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?\*", ATTRS{product}=="802.11 n WLAN", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan1"
Adjust ATTRS{product}
to your specific device. Check how to find it here
As others said, the issue is caused by non-standard name the device gets (i.e. not wlan*). Below is the proper ways to set the name of the network interface when using systemd.networkd or NetworkManager.
systemd.networkd
While linking to /dev/null
may solve the problem, the proper way is to create a .link file
setting the device name.
Create /etc/systemd/network/50-wlan.link
with the following content:
[Match]
Type=wlan
[Link]
Name=wlan0
Reboot or restart the network then check the result: udevadm info /sys/class/net/wlan0 | grep ID_NET_NAME=
More details and debug information can be found here: https://www.freedesktop.org/software/systemd/man/systemd.link.html
NetworkManager
When using NetworkManager the interface rename can be achieved by creating a rule at the /etc/udev/rules.d directory.
Create /etc/udev/rules.d/70-rename-wlan.rules
with the following content:
SUBSYSTEM=="net", ACTION=="add", KERNEL=="wlan*", NAME="wlan0"
If everything went right you should see wlan0
among your devices after a reboot
.
root@bananapi:~# ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group
And you be able to connect to the wifi using nmcli d wifi connect MEU_WIFI_SSID password MEU_PASSWORD
. The nmcli
will persist the connection and reconnect after a reboot.