I connect with the following command:
sudo wpa_supplicant -B -D nl80211 -i wlan_card -c /etc/wpa_supplicant/connection.conf It connects fine, and keeps persistent connection. If AP goes down, the connection tears, if AP gets back up, the connection comes back. If I power down the wifi interface:
sudo ip link set wlan_card down It goes down. When I bring it up with:
sudo ip link set wlan_card up The connection, that was launched in the very beginning with wpa_supplicant, reconnects again.
Such stable, persistent connection is very good, but then it causes a problem, if I want to connect to a different AP.
When I try to use wpa_cli with any command, it just gives me the following error:
Failed to connect to non-global ctrl_ifname: (nil) error: No such file or directory When I try to disconnect with:
sudo iw dev wlan_card disconnect It disconnects, but reconnects right away, so, currently, I have to reserve to:
ps -AlF|grep -i wpa sudo kill -KILL wpa_pid I wish to know the correct method to stop the connection, or killing is the only way?
ps -AlF|grep -i wpa?