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

It fails to differentiate SSIDs with Unicode and ones without. #194

Open
2 tasks
issuefiler opened this issue Feb 1, 2024 · 0 comments
Open
2 tasks

It fails to differentiate SSIDs with Unicode and ones without. #194

issuefiler opened this issue Feb 1, 2024 · 0 comments

Comments

@issuefiler
Copy link

issuefiler commented Feb 1, 2024

Expected behavior

WiFi.scan() should be able to differentiate the two SSIDs β€œπŸ§Šβ€ (4 octets in UTF-8) and β€œF09FA78A” (8 octets).

Wi-Fi access points with two different SSIDs

Current behavior

> netsh wlan show networks
Interface name : Wi-Fi
There are 5 networks currently visible.

……

SSID 3 : F09FA78A
    Network type            : Infrastructure
    Authentication          : WPA2-Personal
    Encryption              : CCMP

SSID 4 : F09FA78A
    Network type            : Infrastructure
    Authentication          : WPA2-Personal
    Encryption              : CCMP

……
import WiFi from "node-wifi";

WiFi.init({iface: null});
console.log(await WiFi.scan());
……
{
    mac: '28:cd:c1:0e:50:82',
    bssid: '28:cd:c1:0e:50:82',
    ssid: 'F09FA78A',
    channel: 3,
    frequency: 2422,
    signal_level: -67.5,
    quality: 65,
    security: 'WPA2-Personal',
    security_flags: 'CCMP ',
    mode: 'Unknown'
},
{
    mac: '28:cd:c1:0e:50:80',
    bssid: '28:cd:c1:0e:50:80',
    ssid: 'F09FA78A',
    channel: 3,
    frequency: 2422,
    signal_level: -60,
    quality: 80,
    security: 'WPA2-Personal',
    security_flags: 'CCMP ',
    mode: 'Unknown'
}
……

Which are the affected features

  • node API
  • CLI

Which is your operating system?

Windows

Environment

Windows

Version of node-wifi

2.0.16

Steps to Reproduce

Have two Wi-Fi access points with the different SSIDs β€œπŸ§Šβ€ (4 octets in UTF-8) and β€œF09FA78A” (8 octets), and try scanning them with this Node.js package in Windows.

Solutions

By not relying on netsh and calling the native Wi-Fi Windows API instead.

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

1 participant