Skip to content

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

Open

Description

@issuefiler

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions