Removed security field, detection is not error proof for all tools.

This commit is contained in:
Christian Kuster
2016-04-06 21:06:13 +02:00
parent 5e2ddc49ee
commit cb7743fe1c
10 changed files with 104 additions and 43 deletions

View File

@ -61,12 +61,12 @@ function parseOutput(str, callback) {
// Network signal strength, identified by '%'
var level = parseInt(lines[t].split(':')[1].split('%')[0].trim(), 10);
network.signal_level = (level / 2) - 100;
network.rssi = (level / 2) - 100;
}
else if (!network.channel) {
// A tricky one: the channel is the first one having just ONE number. Set only
// if the channel is not already set ("Basic Rates" can be a single number also)
if (regexChannel.exec(lines[t])) {
if (regexChannel.exec(lines[t].trim())) {
network.channel = parseInt(lines[t].split(':')[1].trim());
}
}