How can I get a list of surrounding wireless access points using node.js?

Environment

  • Linux Ubuntu
  • node.js v0.6.12

purpose

I would like to get a list of available AP / network names (SSID)

I can choose a specific SSID.

My ultimate goal is to test the strength and quality of the Wi-Fi signal in order to force re-association with another access point before it completely loses connection.

How to create a loop that retrieves and updates the list of surrounding access points using node.js?

Would it be a node.jsgood choice for this?

How to get information from the signal strength and quality of the AP ie?

+4
source share
1 answer

wireless-tools.

:

var iwlist = require('wireless-tools/iwlist');

iwlist.scan('wlan0', function(err, networks) {
  console.log(networks);
});

// => 
[
  {
    address: '00:0b:81:ab:14:22',
    ssid: 'BlueberryPi',
    mode: 'master',
    frequency: 2.437,
    channel: 6,
    security: 'wpa',
    quality: 48,
    signal: 87
  },
  // ...
+2

All Articles