Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect to hidden networks? #20

Open
kevinseitter opened this issue Sep 21, 2016 · 1 comment
Open

Connect to hidden networks? #20

kevinseitter opened this issue Sep 21, 2016 · 1 comment

Comments

@kevinseitter
Copy link

kevinseitter commented Sep 21, 2016

I'm having difficulty connecting to a hidden network if I haven't already introduced the network to the system via nmcli con add ... (on Raspberry Pi 3 with Raspbian Jessie Lite, Linux Kernel 4.4.15 for ARM). It says Executing: nmcli device wifi connect "[ssid]", followed immediately by Error: No network called [ssid] could be found. (Presumably because it's hidden.)

When I do add the network before launching my node application, it connects just fine, but with the additional step of Executing: nmcli connection delete "[ssid]" before trying to connect.

Is there a way to do the hidden-network-introduction step within this module?

Thanks!

Edit: Connection actually occasionally fails even after introducing the hidden network, saying that (53) The Wi-Fi network could not be found. Also, the fact that it succeeds most of the time, even after Executing: nmcli connection delete "[ssid]", is curious to me.

@rmarscher
Copy link

Working with nmcli on linux directly, I've had to use a different set of commands to connect to hidden networks.

The code in here uses nmcli device wifi connect [ssid] password [password]. See https://github.com/msolters/wifi-control-node/blob/v2.0.0/src/linux.coffee#L138-L200

To connect to a hidden network, I had to issue these four commands instead:

nmcli connection add type wifi con-name [ssid] ifname [interface-name] ssid [ssid]
nmcli connection modify [ssid] 802-11-wireless-security.key-mgmt wpa-psk
nmcli connection modify [ssid] 802-11-wireless-security.psk [password]
nmcli connection up [ssid]

I suppose those could be chained with && separating each so it is still a one-line exec-sync command. I haven't tried forking this repo yet to test if it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants