2

SETUP: I plugged my laptop (Ubuntu 14) to my RPi 3 (Raspbian Stretch) via ssh over an Ethernet cable.

PROBLEM:

Doing nmcli dev wifi on the laptop gives me a whole bunch of networks. Typing the same command on the R Pi gives me no network at all. I have tried ifconfig, all the interfaces (eth0, lo, wlan1) appear as expected.

ATTEMPTS:

I tried :

  • Edimax dongle (named wlan0): no network detected by that interface either.
  • systemctl restart network-manager
  • restart the interfaces (ifconfig wlan1 down)

to no avail.

Curiously, iwlist wlan0 scan does return all the networks I am after.

GOAL:

My goal is to nmcli dev wifi connect to my network (I don't want to use wpa_supplicant)

How to solve this please?

I think it might be related to this (unsanswered) question.

3
  • Please have a look here: raspberrypi.stackexchange.com/a/73816/77005 It seems that getting network manager to run properly on Raspbian needs some additional work.
    – oh.dae.su
    Commented Dec 3, 2018 at 18:46
  • Thanks a lot @oh.dae.su. I followed the steps from this answer... but nmcli on the Rpi still doesn't detect anything. Any other suggestion?
    – hartmut
    Commented Dec 6, 2018 at 16:01
  • Too bad. I didn't try the suggestions myself as I am happy with using wpa_supplicant. Unfortunately I don't have any other suggestions.
    – oh.dae.su
    Commented Dec 6, 2018 at 22:50

2 Answers 2

3

Neither Network Manager (used by nmcli) nor old style networking with ifupdown is supported out of the box by Raspbian. For network connections it uses dhcpcd by default. You should look at /etc/dhcpcd.conf for default settings and have a look at man dhcpcd for using it.

I do not understand why you can use the command nmcli on the RasPi. On a default installation just from an image this command is not available. Do you not using a default installation?

To use it you have to install Network Manager and deinstall dhcpcd. Follow the link @oh.dae.su has suggested in his comment. But I'm not sure if this really completely fit into the hole environment of Raspbian.

For a general overview which three network management systems are available on Raspbian you can look at How to correctly restart wpa_supplicant debug with networkd-systemd?. Network Manager isn't part of it. If you install it, it is the forth networking system. It doesn't make it simpler.

3
  • Thanks for this answer. When saying that " For network connections it uses dhcpcd by default." , "it" refers to Raspbian? I think I might have apt-getted nmcli.
    – hartmut
    Commented Dec 6, 2018 at 15:42
  • Also, I followed the steps referred to by @oh.dae.su, but this hasn't solved the problem.
    – hartmut
    Commented Dec 6, 2018 at 16:03
  • @hartmut I have updated the answer with the last paragraph. I prefer systemd-networkd because it is the background of all services. So I cannot help you much with Network Manager. If possible I would suggest to use default dhcpcd. It is best integrated and there are great experience about it on this site. Or you use systemd-networkd because I believe it's the coming system in the future.
    – Ingo
    Commented Dec 6, 2018 at 18:19
0

As of today (2023), Raspberry Pi OS (former Raspbian) comes with NetworkManager support, but it is disabled by default. To enable, run those commands:

sudo apt update
sudo apt install network-manager network-manager-gnome

# This command will enable NetworkManager, without needing to jump through GUI:
sudo raspi-config nonint do_netconf 2
sudo reboot

After reboot (for GUI), NetworkManager will be used.

And nmcli will work as expected, e.g. nmcli dev wifi will scan and list all visible WiFi APs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.