diff --git a/iwconfig.js b/iwconfig.js index fb2f5fd..bed0fbf 100644 --- a/iwconfig.js +++ b/iwconfig.js @@ -63,6 +63,10 @@ function parse_status_block(block) { parsed.frequency = parseFloat(match[1]); } + if ((match = block.match(/Bit Rate[:|=]\s*([0-9\.]+)/))) { + parsed.bitrate = parseFloat(match[1]); + } + if ((match = block.match(/IEEE\s*([^\s]+)/))) { parsed.ieee = match[1].toLowerCase(); } diff --git a/test/iwconfig.js b/test/iwconfig.js index c78f3ea..cbfaa0d 100644 --- a/test/iwconfig.js +++ b/test/iwconfig.js @@ -91,6 +91,7 @@ describe('iwconfig', function() { ieee: '802.11bg', mode: 'master', frequency: 2.437, + bitrate: 54, sensitivity: 0, quality: 18, signal: 11, @@ -142,6 +143,7 @@ describe('iwconfig', function() { ieee: '802.11bg', mode: 'master', frequency: 2.437, + bitrate: 54, sensitivity: 0, quality: 18, signal: 11, @@ -179,6 +181,7 @@ describe('iwconfig', function() { ieee: '802.11abgn', mode: 'managed', frequency: 2.412, + bitrate: 36, quality: 63, signal: -47 });