Node-wifi-scanner

node-wifi-scanner

Scans the available WiFi networks.

node-wifi-scanner scans the available WiFi networks across operating systems and returns an array with objects, each object representing a network with the following properties:

  • channel: WiFi channel

  • ssid: SSID of the network (if available)

  • mac: MAC Address of the network access point

  • rssi: signal strength

Get it: npm install --save node-wifi-scanner

Sample usage:

1
2
3
4
5
6
7
8
9
const scanner = require('node-wifi-scanner');

scanner.scan((err, networks) => {
  if (err) {
    console.error(err);
    return;
  }
  console.log(networks);
});

Would log something like:

1
2
3
4
[ { ssid: 'Micromax A106',
    mac: '82:6a:b0:b7:fe:d2',
    channel: 6,
    rssi: -85 } ]

Basically uses the underlying OS tools to do the task:

  • airport on Mac OS-X: airport -s

  • netsh on Windows: netsh wlan show networks mode=Bssid

  • iwlist on Linux: iwlist scan

Features that would be nice to have:

  • Promises rather than callbacks.

  • allowing users to select the network and login in from CLI.

  • Look for a better name, rather that node-wifi-scanner ?

GIF FTW!

node-wifi-scanner

Suggest a module

Comments