2.1.3 • Published 6 years ago

nwireless v2.1.3

Weekly downloads
9
License
MIT
Repository
github
Last release
6 years ago

AWT -Advanced Wireless Tools

NPM version Downloads

A advanced wireless tools to control wpa_supplicant

Installation

npm i nwireless

Dependencies

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('nwireless');
const wireless = new Wireless();

(async () => {
  const result = await wireless.connect('ssid', 'password');
  console.log(result);
})()

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