Skip to content

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