21

When I use NetworkManager command tool to scan for wireless networks the output is empty.

root@radxa:~# nmcli dev wifi list
SSID    BSSID   MODE    FREQ    RATE    SIGNAL  SECURITY    ACTIVE
root@radxa:~#

but if use iwlist, the scan is ok:

root@radxa:~# iwlist wlan0 scan
          Cell 01 - Address: 78:A1:06:7F:CF:C9
                    ESSID:"olivia"
                    Protocol:IEEE 802.11bgn
                    Mode:Master
                    Frequency:2.462 GHz (Channel 11)
                    Encryption key:on
                    Bit Rates:300 Mb/s
                    IE: WPA Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK 
                    Extra:rsn_ie=30140100000fac040100000fac040100000fac020000
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    Quality=0/100  Signal level=7/100

device status:

root@radxa:~# nmcli device status
DEVICE     TYPE              STATE
wlan0      802-11-wireless   unavailable
eth0       802-3-ethernet    connected

but if use nmcli connect is error:

root@radxa:~# nmcli device wifi connect "olivia" password "makeit458"
Error: No network with SSID 'olivia' found.

Linux version:

Linux version 3.0.36+ (build@radxa-x1) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) 
#6 SMP PREEMPT Tue Aug 19 15:17:11 CST 2014
guanghai lu
  • 311
  • 1
  • 2
  • 4

3 Answers3

9

I finally found the problem, wpa_supplicant was not running.

Try this:

sudo systemctl start wpa_supplicant.service

Now check the wifi list again:

nmcli dev wifi list 

Connect to the network like this:

nmcli --ask connection up <ssid>
techraf
  • 5,831
  • 10
  • 33
  • 51
2

I had similar problem, none of above answers were working form me. I figured out that in my case Network Manager was configuring random MAC address of wlan0 interface and this action was failing. Running this command:

sudo journalctl -u NetworkManager -f

I saw looped messages like this:

jubilinux NetworkManager[277]: <info>  [1478194251.3439] device (wlan0): supplicant interface state: disabled -> inactive
jubilinux NetworkManager[277]: <warn>  [1478194251.3589] device (wlan0): set-hw-addr: new MAC address 3E:78:9C:B5:29:39 not successfully set (scanning)
jubilinux NetworkManager[277]: <info>  [1478194252.3378] device (wlan0): supplicant interface state: inactive -> disabled

Solution was to disable random MAC address functionality of Network Manager by adding to the configuration file:

/etc/NetworkManager/NetworkManager.conf

entry:

[device]
wifi.scan-rand-mac-address=no
mstrug
  • 21
  • 1
1

What worked for me was removing the reference to the wifi device from any of the /etc/network/interfaces configurations.

e.g. I had a file in /etc/network/interfaces.d/something.conf that contained

auto wlx0012456789
iface wlx... inet dhcp

(this is probably wlan0 for many users, instead of the wlx... interface I have).

Removing (or commenting out with a #) and restarting the network manager service (sudo systemctl restart network-manager.service) worked a treat.

  • 1
    This helped with an issue I was having with an Orange Pi i96 board, except that I edited /etc/network/interfaces (a file) b/c interfaces.d was empty. After rebooting, NetworkManager was able to properly scan for wifi. – Austin Burk Feb 07 '20 at 21:40