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
5
  • Why use wifi and list? According to the man page it is you should use one of those commands (nmcli just takes the first of those two)
    – Anthon
    Sep 30, 2014 at 3:33
  • 1
    but if use nmcli connect is error root@radxa:~# nmcli device wifi connect olivia password makeit458 Error: No network with SSID 'olivia' found. Oct 8, 2014 at 1:47
  • I had same issue after I installed network-manager. I removed it and got wifi working again. Mar 21, 2016 at 20:21
  • Possible Solution: askubuntu.com/a/921392/427233 Nov 29, 2017 at 22:33
  • 1
    hey, just a gentle reminder that you left your password here
    – Nam Vu
    Aug 31, 2020 at 20:33

3 Answers 3

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>
5
  • 2
    to me not work. I see unavailable wlan0
    – gdm
    Oct 3, 2017 at 16:51
  • This didn't work for me, instead the following link worked: askubuntu.com/a/921392/427233 Nov 29, 2017 at 22:33
  • 1
    You should use sudo nmcli --ask dev wifi connect ssid-goes-here instead of the last command. Dec 28, 2017 at 20:17
  • @DenysVitali Why?
    – tsbertalan
    Nov 9, 2018 at 20:16
  • + need reboot after install package
    – dobs
    Sep 25, 2021 at 12:20
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
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
  • 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. Feb 7, 2020 at 21:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .