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

Support hidden wifi on windows #183

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

maxhellwig
Copy link

@maxhellwig maxhellwig commented Sep 19, 2022

Description

This PR add support for hidden wifis, wifis which do not broadcast there SSID, without breaking existing API usages.

Motivation and Context

Windows does not simply connect to wifis which do not broadcast their SSID (hidden wifis).
The additional flag <nonBroadcast>true</nonBroadcast> in the profile xml file is required.

If the flag is set, this PR adds the nonBroadcast param to the profile xml config file and connects to the wifi.
It also skips the scan for the given wifi because it will not appear in the wifi list, obviously.

This PR is related and should close #22 on Windows.

The missing configuration has been posted on Stackoverflow in this thread:
https://stackoverflow.com/questions/69470100/connect-to-hidden-wifi-using-netsh-commands

Usage examples

Users can now provide an additional parameter to the connect() method:

nodeWifi.connect({ssid: 'foo', password: 'bar', isHidden?: true})

the default of isHidden is false so that existing code should not break.

How Has This Been Tested?

The code has been tested on Windows 10 with a Wifi without SSID.

Types of changes

  • New feature (non-breaking change which adds functionality)

  • Refactorization (non-functional change which improve code readibility)

@maxhellwig maxhellwig marked this pull request as draft September 19, 2022 20:05
@maxhellwig maxhellwig marked this pull request as ready for review September 20, 2022 07:09
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

Successfully merging this pull request may close these issues.

Connect to hidden SSID
2 participants