node-wifi icon indicating copy to clipboard operation
node-wifi copied to clipboard

[Bug]: Win 10 and 11 differences in `getCurrentConnections`

Open juanmartin opened this issue 3 years ago • 0 comments

Expected behavior

getCurrentConnections is inconsistent across different Windows versions.

Current behavior

Currently it returns the key/value mixed up:

See the output of .getCurrentConnections(): The odd one to me is the one coming from win11. win10 makes more sense.

Windows 11:

win11-get

Windows 10:

win10-get


This is the output of netsh wlan show interfaces for each version:

Windows 11:

win10

Windows 10:

win11

Which are the affected features

  • [X] node API
  • [X] CLI

Which is your operating system?

Windows

Environment

Windows 11 and 10.

Version of node-wifi

2.0.16

Steps to Reproduce

See the output of netsh wlan show interfaces See the output of .getCurrentConnections()

Solutions

Maybe parsing the results differently according to the OS. I see there's a difference in the number of results for the netsh command so maybe that's the issue as it offsets the parsing.

juanmartin avatar Jan 20 '22 19:01 juanmartin