5

NetworkManager is often extremely slow to scan and detect new networks with my wireless card (rtl8xxxu driver).

Using the Network Manager GUI I can "force" a connection to a specific wireless network using "Connect to a Hidden Network". Even if NetworkManager hasn't yet detected a particular SSID, it will try (and succeed) at connecting to the indicated network:

networking menu

However, I haven't found a way to emulate this from the command line:

$ nmcli c up id ConnectionNameOrID
Error: Connection activation failed: No suitable device found for this connection.

$ nmcli d wifi connect NetworkName password 'PSKPassword'
Error: No network with SSID 'NetworkName' found.

This is frustrating! Obviously, NetworkManager has some API that allows it to try connecting to an as-yet-unscanned network. Is there any way for me to access this from nmcli or another command-line tool?

Dan
  • 619
  • 9
  • 17

1 Answers1

3

How about nmcli connection up $NAME ifname $IFACE?

nmcli device wifi connect creates a new connection, also it expects as argument an SSID, not a connection (name).

guntbert
  • 12,914
  • 37
  • 45
  • 86
thaller
  • 851
  • 5
  • 7
  • Hey, that does the trick! I had no idea that adding the `ifname` argument would force it to try that interface. Maybe this should be suggested for the `nmcli` docs. – Dan Oct 31 '16 at 22:40