2.2.0 • Published 6 years ago

wirelesser v2.2.0

Weekly downloads
10
License
ISC
Repository
github
Last release
6 years ago

Wirelesser

NPM version Downloads

A wifi utils to control wpa_supplicant

Installation

npm install wirelesser --save

Pre-requirements

sudo apt-get install -y hostapd dnsmasq haveged

Note

This only works on linux, tested on ubuntu 14.4 and debian jesse. you need to have wpa_supplicant installed , run using sudo and running with wpa_spplicant having config : ctrl_interface=/var/run/wpa_supplicant

Reference

http://w1.fi/wpa_supplicant/devel/ctrl_iface_page.html

Examples

Example: Wifi Connection

const {Wireless} = require('wirelesser');
const wireless = new Wireless();

wireless.open().then(() => {
  return wireless.connect('ssid', 'password').then(result => {
    console.log(result);
  });
}).then(() => wireless.close());

More Examples

More examples are here

Test

  • Setup a host access point.
  • Run npm test in sudo.
sudo SSID="ssid" PASS="password" npm test

License

MIT © Yuan Tao

2.2.0

6 years ago

2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.5

7 years ago

2.0.4

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.0

7 years ago