Skip to content

Commit

Permalink
Some example/skeleton code, might be syntax errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tlhunter committed Apr 26, 2012
1 parent e452fc2 commit 39ac295
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
28 changes: 28 additions & 0 deletions app.js
@@ -1 +1,29 @@
var wireless = require('wireless');

wireless.configure({
scan: 'cat examples/iwlist-wlan0-scan.txt',
status: 'cat examples/iwconfig-wlan0.txt',
});

wireless.on('appear', function(error, network) {
if (error) {
console.log("There was an error when a network appeared");
throw error;
}
console.log("New Network: " + network.ssid);
}

wireless.on('disappear', function(error, network) {
if (error) {
console.log("There was an error when a network disappeared");
throw error;
}
console.log("Bye Network: " + network.ssid);
}

wireless.start(function() {
var ssid = wireless.list()[5];
wireless.join(ssid, null, function() {
console.log("I've connected to the fifth network!");
});
});
54 changes: 54 additions & 0 deletions node_modules/wireless/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 39ac295

Please sign in to comment.