friedrith / node-wifi

📶 NodeJS tool to manage wifi (connections, scans)
MIT License
397 stars 161 forks source link

Connect to hidden SSID #22

Open sliard opened 6 years ago

sliard commented 6 years ago

When I try to connect to a secret SSID, I have the error : Error: No network with SSID 'name' found

I think it's because nmcli need information about wifi before connection (like you can read here) :

nmcli c add type wifi con-name <connect name> ifname wlan0 ssid <ssid>
nmcli con modify <connect name> wifi-sec.key-mgmt wpa-psk
nmcli con modify <connect name> wifi-sec.psk <password>
nmcli con up <connect name>
friedrith commented 6 years ago

Hi, First of all, thank you for remarks.

I didn't know about secret SSID.What I understand with your explanation is that wifi network with secret ssid don't diffuse security protocols and so a computer cannot be easily connected using node-wifi. On windows, you must use specials commands to manually setup security protocoles in the profile.

My questions are no:

sliard commented 6 years ago

Hi @friedrith

Yes, your interpretations are correct. I think that any wifi router can create hidden SSID (like this netgear) In this case you have to disable "SSID Broadcast"

I worked on it yesterday and had a lot of problems because nmcli support "add" and "modify" command only since Ubuntu 16 but my device use Ubuntu 14. For the moment the only way I found need to declare the SSID with graphical interface before use it with a "nmcli up" command.

And yes I fork your project to start a PR but can't find the right way for the moment. So I can way for your 2.0 version :)

Samuel

maxhellwig commented 1 year ago

Hello, I'm working on an implementation to handle hidden wifis on Windows: https://github.com/friedrith/node-wifi/pull/183 An PR is open but it failes sometime during connection attempt to the hidden wifi. I suspect a timing issue during profile writing and netsh commands.

Kind regards, Max

maxhellwig commented 1 year ago

Hello, had someone the chance to have a look? From my perspective the MR #183 is ready to merge.