You are not logged in.

#1 2015-10-20 04:10:16

sonarforte
Member
Registered: 2015-04-25
Posts: 4

NetworkManager won't connect to already configured wifi network

Hi all, I'm running Arch on a 2012 MBP with bspwm, and after days of battling with three different network managers I was finally able to get networkmanager working, with some caveats.

I have a non-broadcasting (hidden) ssid wifi network in my house, let's call it "foobar", and I tried to connect by running

$ sudo nmcli dev wifi connect foobar password <password>

although this returned only the helpful error message

No network with ssid "foobar" found

However, I was able to get it to connect only after running this command that I found here:

$ sudo iwlist wlan0 scanning essid foobar

This command forces a scan of all the available networks, and lists my network with the ssid visible, and then I can connect by running the nmcli command from above.

And although the network configuration for "foobar" is saved and set to "automatically connect when available" (as seen in both nmtui and mncli_dmenu), upon rebooting it does not connect unless I run the iwlist command, at which point it automatically connects again.

This is obviously annoying and seems incorrect; is there some reason why this is happening and how can I fix it?

Thank you.

Last edited by sonarforte (2015-10-20 23:40:18)

Offline

#2 2015-10-24 12:28:36

fdservices
Member
From: France
Registered: 2012-02-06
Posts: 413

Re: NetworkManager won't connect to already configured wifi network

It seems to be a common problem with network manager. I don't use it.

Have a look at Systemd-networkd


Andrew

Offline

#3 2018-04-24 17:59:46

seegy
Member
Registered: 2018-04-24
Posts: 1

Re: NetworkManager won't connect to already configured wifi network

My first post in this forum.  I have many years of experience with various flavors of *NIX.

I also know this topic is old, but for the benefit of others, I found similar behavior with NetworkManager, specifically networkmanager 1.10.6-3.

For non-broadcasting SSID I even tried presenting: hidden yes as described by NetworkManager Examples in the command as follows:

$ sudo nmcli dev wifi connect <SSID> password <password> hidden true
Error: Failed to scan hidden SSID: Scanning not allowed immediately following previous scan.

without success.  Attempting the same command repeatedly gave the same result.

I found that by reordering the parameters, the connection is made and profile is created:

$ sudo nmcli dev wifi connect <SSID> hidden true password <password>
Device 'wlan0' successfully activated with 'f26a68a9-5c1f-4523-9956-1ef12ad16b98'

I also found that sometimes despite reordering as above, the command may fail for various reasons.  A little persistence will pay off as illustrated:

$sudo nmcli d wifi connect <SSID> hidden true password <password>
Error: Failed to scan hidden SSID: Scanning not allowed immediately following previous scan.
$sudo nmcli dev wifi connect <SSID> hidden true password <password>
Error: No network with SSID 'ASUS' found.
$sudo nmcli dev wifi connect <SSID> hidden true password <password>
Error: Failed to scan hidden SSID: Scanning not allowed immediately following previous scan.
$sudo nmcli dev wifi connect <SSID> hidden true password <password>
Error: Failed to scan hidden SSID: Scanning not allowed immediately following previous scan.
$sudo nmcli dev wifi connect <SSID> hidden true password <password>
Device 'wlan0' successfully activated with 'f26a68a9-5c1f-4523-9956-1ef12ad16b98'.

Perhaps some sort of timing issue? Internal nmcli application parameter ordering issue?

Offline

#4 2018-04-25 12:41:22

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,859
Website

Re: NetworkManager won't connect to already configured wifi network

Welcome to the forums, seegy. Please take a moment to read through our community Code of Conduct, particularly the section relating to necrobumping.

If you need help with this issue, please create a new topic and be sure to include details about your hardware (e.g. wireless chipset, kernel module used, etc) and the full journal output for an affected session.

Closing.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB