How to configure wpa_supplicant.conf for NetworkManager WiFi proper management?
I have NetworkManager installed on Wrap7 board(which runs embedded Linux distro), but NetworkManager does not detect WiFi interface with a default content of wpa_supplicant.conf. Here is wpa_supplicant.conf default content:
root@imx7s-warp-mbl:~# cat /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1
network={
key_mgmt=NONE
}
If I update wpa_supplicant.conf file manually with the properties (ssid, wep_key0 ...) of the particular WiFi network, Network manager starts to detect wifi networks... But this is an unacceptable solution of course. I need to allow NetworkManager to do this function.
So the question, how should I change the default content of the wpa_supplicant.conf file in order to allow NetworkManager to manage wifi connections?
I found the solution that worked for me. Few steps:
Change /etc/wpa_supplicant.conf to contain the following content:
ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=0 update_config=0
Block "network={...}" should be removed, and also,update_config
should be set to 0.NetworkManager does not manage any interface defined in /etc/network/interfaces default (unmanaged devices means NetworkManager doesn't handle those network devices). In order to allow to NetworkManager to manage Wi-Fi interface, comment out the
Wireless interfaces
block in/etc/network/interfaces
.Create the /etc/NetworkManager/NetworkManager.conf with the following content:
[main] plugins=ifupdown,keyfile [ifupdown] managed=**true**
Reboot the machine
-
After reboot, run NetworkManager service
NetworkManager
From this point, networkmanager can manage Wi-Fi connections.
You shouldn't configure it at all. The only instance of wpa_supplicant that should be running is:
/usr/bin/wpa_supplicant -u
This is usually launched automatically by NetworkManager (via dbus-daemon). It ignores the conf file, does not create the traditional control interface, and only accepts configuration via D-Bus.