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.

hartmut
  • 139
  • 1
  • 5

2 Answers2

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.

Ingo
  • 42,961
  • 20
  • 87
  • 207
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.

iva2k
  • 121
  • 1