diff --git a/index.js b/index.js index 214efdb..8bd4d44 100644 --- a/index.js +++ b/index.js @@ -203,7 +203,7 @@ WpaCLI.prototype.addNetwork = function (params, cb) { if (done) { break; } else if (params.hasOwnProperty(key)) { - this.request('SET_NETWORK ' + network_id + ' ' + key + ' "' + params[key] + '"', function (status) { + this.request('SET_NETWORK ' + network_id + ' ' + key + ' ' + params[key] + '', function (status) { if (status != 'OK') { if (typeof cb === 'function') cb.call(this, 'Param error'); @@ -219,17 +219,21 @@ WpaCLI.prototype.addNetwork = function (params, cb) { }; WpaCLI.prototype.removeNetwork = function (netId, cb) { - this.request('REMOVE_NETOWRK ' + netId, cb); + this.request('REMOVE_NETWORK ' + netId, cb); }; WpaCLI.prototype.disableNetwork = function (netId, cb) { - this.request('DISABLE_NETOWRK ' + netId, cb); + this.request('DISABLE_NETWORK ' + netId, cb); }; WpaCLI.prototype.enableNetwork = function (netId, cb) { this.request('ENABLE_NETWORK ' + netId, cb); }; +WpaCLI.prototype.selectNetwork = function (netId, cb) { + this.request('SELECT_NETWORK ' + netId, cb); +}; + module.exports = WpaCLI; /* http://w1.fi/wpa_supplicant/devel/ctrl_iface_page.html