Tessel wifi
This is a wrapper lib around the wifi-cc3000
lib that Tessel provides.
This lib aggressively tries to connect and will power cycle the wifi chip if it still doesn't connect.
Usage
var tesselWifi = ; var options = ssid: 'network' password: 'abc123' // security: wpa2, // optional, defaults to wpa2 // timeout: 20, // optional timeout to connect to a network. defaults to 20 // reconnect: 3, // optional number of times to try to auto reconnect on a disconnect event. defaults to 3 var wifi = options; wifi ;
Details
Here's what this lib attempts to do:
- Tries to connect to wifi as soon as its initialized
- Sets a timeout of 30 seconds to try to reconnect if wifi doesn't connect
- At every disconnect/timeout event, auto attempts to reconnect. If there's 3 disconnect/timeout events in a row, will power cycle the chip & attempt a reconnect.
- After 3 error events will power cycle and attempt a reconnect.