Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 889 Bytes

README.md

File metadata and controls

43 lines (27 loc) · 889 Bytes

wpa-client-socket

WPA Client socket binding for Node.js

wpa-client-socket is clearly inspired by the Noble.

Prerequisites

NOTE: This only works on linux.

  • wpa_supplicant

Reference

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

Examples

var WpaClientSocket = require('wpa-client-socket');
var socket = new WpaClientSocket();

var ctrl_path = '/var/run/wpa_supplicant/wlan0';

socket.on('data', function(buf) {
  console.log(buf.toString());
});

socket.bind(ctrl_path);
socket.start();

var result = socket.write('SCAN');

if (result.toString() == 'OK\n')
  console.log('write success');

OSS Notice

wpa_supplicant

https://w1.fi/wpa_supplicant/ Copyright (c) 2002-2016, Jouni Malinen [email protected] BSD License