Connman simplified
Node.js package that simplifies Connman (Opensource connection manager) usage.
Enables you to easilly control connections over wifi and ethernet. Get realtime status changes.
Uses Connman-api package internally.
Connman: http://www.connman.net/
- Abstracts Connman API making your code shorter and simpler.
- Includes network cache system (for when scanning is impossible in hotspot mode).
- Uses regular Node.js naming conventions.
Examples
Try to connect to favorite wifi network, if fails become hotspot. Log the wifi state changes.
var connman = ;connman;
Join specific network, disconnect after 5 seconds.
var connman = ;connman;
Open a hotspot, get cached available networks, close after 5 seconds, get fresh available networks. Retrieving networks from cache is usefull because usually hardware can't scan while being hotspot.
var connman = ;connman;
Get a more readable networks list.
Uses common Connman services format, see: https://01.org/connman/documentation
var connman = ;connman;
Bigger interactive example is included.
Debugging
Uses Debug package, to see all logs run:
$export DEBUG=*
License
Licensed under the MIT License
Author
Peter Uithoven @ Doodle3D