mustafaxfe
Posts: 10
Joined: Thu Mar 09, 2017 3:24 pm

Network Manager can't handle wifi connection

Mon Apr 03, 2017 6:03 pm

Hi,
I have installed Raspbian Jessie.And also I have installed network manager package by

Code: Select all

sudo apt-get install network-manager
I have edited /etc/NetworkManager/NetworkManager.conf file as
[main]
plugins=ifupdown,keyfile
dhcp=internal


[ifupdown]
managed=true
But when I check wlan0 by

Code: Select all

nmcli dev show wlan0
It says it is unavailable.
GENERAL.DEVICE: wlan0
GENERAL.TYPE: wifi
GENERAL.HWADDR: B8:27:EB:C8:DD:12
GENERAL.MTU: 1500
GENERAL.STATE: 20 (unavailable)
GENERAL.CONNECTION: --
GENERAL.CON-PATH: --
I just want to connect wifi manually by command line.
Also when I try run

Code: Select all

nmcli device wifi 
rescan
It says
Error: Scanning not allowed while unavailable or activating.
I want to use this

Code: Select all

nmcli device wifi con "erciyes" password "123erciyes123"
How can I make available my wifi to use with network-manager (nmcli).

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Network Manager can't handle wifi connection

Mon Apr 03, 2017 11:02 pm

Have you tried disabling dhcpcd?

Code: Select all

sudo systemctl disable dhcpcd
sudo systemctl stop dhcpcd
You could try disabling dhcpcd just for wlan0, by adding the following to /etc/dhcpcd.conf:

Code: Select all

denyinterfaces wlan0

davesteele
Posts: 60
Joined: Wed Nov 30, 2016 4:16 pm

Re: Network Manager can't handle wifi connection

Tue Apr 04, 2017 3:18 am

The wifi interface must not be referenced in /etc/network/interfaces, or else NetworkManager will not manage it.

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Network Manager can't handle wifi connection

Tue Apr 04, 2017 5:56 am

davesteele wrote:The wifi interface must not be referenced in /etc/network/interfaces, or else NetworkManager will not manage it.
Except when managed=true is set in /etc/NetworkManager/NetworkManager.conf as the OP shows has already been done.

mustafaxfe
Posts: 10
Joined: Thu Mar 09, 2017 3:24 pm

Re: Network Manager can't handle wifi connection

Tue Apr 04, 2017 10:57 am

ktb wrote:Have you tried disabling dhcpcd?

Code: Select all

sudo systemctl disable dhcpcd
sudo systemctl stop dhcpcd
You could try disabling dhcpcd just for wlan0, by adding the following to /etc/dhcpcd.conf:

Code: Select all

denyinterfaces wlan0
Thanks, It is working now.

Code: Select all

nmcli dev show wlan0
GENERAL.DEVICE: wlan0
GENERAL.TYPE: wifi
GENERAL.HWADDR: B8:27:EB:C8:DD:12
GENERAL.MTU: 1500
GENERAL.STATE: 30 (disconnected)
GENERAL.CONNECTION: --
GENERAL.CON-PATH: --

Code: Select all

nmcli device wifi list
* SSID MODE CHAN RATE SIGNAL BARS SECURITY
aslan Infra 6 54 Mbit/s 55 ▂▄__ WPA1
AIRTIES_RT-204 Infra 6 54 Mbit/s 42 ▂▄__ WPA1 WPA2
NetMASTER Uydunet-81FA Infra 6 54 Mbit/s 42 ▂▄__ WPA1
TTNET_ZyXEL_9MCR Infra 7 54 Mbit/s 42 ▂▄__ WPA1 WPA2
MAVI Infra 11 54 Mbit/s 39 ▂▄__ WPA2
TTNET_ZyXEL_N3RU Infra 8 54 Mbit/s 27 ▂___ WPA1 WPA2
NetMASTER Uydunet-AB58 Infra 11 54 Mbit/s 65 ▂▄▆_ WPA2
But I can't connect any ssid, while trying to run with this command.

Code: Select all

nmcli device wifi con "NetMASTER Uydunet-AB58" password "pass"
It gives this error:
Error: Connection activation failed: (15) DHCP client failed to start.
My /etc/NetworkManager/NetworkManager.conf file
[main]
plugins=ifupdown,keyfile
dhcp=dhcpd


[ifupdown]
managed=true
Thanks in advance

davesteele
Posts: 60
Joined: Wed Nov 30, 2016 4:16 pm

Re: Network Manager can't handle wifi connection

Tue Apr 04, 2017 4:04 pm

ktb wrote:
davesteele wrote:The wifi interface must not be referenced in /etc/network/interfaces, or else NetworkManager will not manage it.
Except when managed=true is set in /etc/NetworkManager/NetworkManager.conf as the OP shows has already been done.
TIL...

In terms of OP's problem, the Comitup (Raspbian plus the 'comitup' pacakge) image uses Network Manager to automatically configure the wifi interface. It uses an unmodified NetworkManager.conf file, and bypasses nmcli by adding the configuration file to /etc/NetworkManager/system-connections. I've also used "sudo nmcli dev wifi connect SSID password PWD" successfully. The DHCP environment is unmodified.

https://davesteele.github.io/comitup/

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Network Manager can't handle wifi connection

Tue Apr 04, 2017 6:06 pm

mustafaxfe wrote:
ktb wrote:Have you tried disabling dhcpcd?

Code: Select all

sudo systemctl disable dhcpcd
sudo systemctl stop dhcpcd
You could try disabling dhcpcd just for wlan0, by adding the following to /etc/dhcpcd.conf:

Code: Select all

denyinterfaces wlan0
Thanks, It is working now.

Code: Select all

nmcli dev show wlan0
GENERAL.DEVICE: wlan0
GENERAL.TYPE: wifi
GENERAL.HWADDR: B8:27:EB:C8:DD:12
GENERAL.MTU: 1500
GENERAL.STATE: 30 (disconnected)
GENERAL.CONNECTION: --
GENERAL.CON-PATH: --

Code: Select all

nmcli device wifi list
* SSID MODE CHAN RATE SIGNAL BARS SECURITY
aslan Infra 6 54 Mbit/s 55 ▂▄__ WPA1
AIRTIES_RT-204 Infra 6 54 Mbit/s 42 ▂▄__ WPA1 WPA2
NetMASTER Uydunet-81FA Infra 6 54 Mbit/s 42 ▂▄__ WPA1
TTNET_ZyXEL_9MCR Infra 7 54 Mbit/s 42 ▂▄__ WPA1 WPA2
MAVI Infra 11 54 Mbit/s 39 ▂▄__ WPA2
TTNET_ZyXEL_N3RU Infra 8 54 Mbit/s 27 ▂___ WPA1 WPA2
NetMASTER Uydunet-AB58 Infra 11 54 Mbit/s 65 ▂▄▆_ WPA2
But I can't connect any ssid, while trying to run with this command.

Code: Select all

nmcli device wifi con "NetMASTER Uydunet-AB58" password "pass"
It gives this error:
Error: Connection activation failed: (15) DHCP client failed to start.
My /etc/NetworkManager/NetworkManager.conf file
[main]
plugins=ifupdown,keyfile
dhcp=dhcpd


[ifupdown]
managed=true
Thanks in advance
Now I'm wondering why you have set dhcp=dhcpd. The first configuration you posted should work. You can probably just remove the dhcp line from your config file completely.

Return to “Raspbian”