From 66d6f3766c58c33a1e2113f5964c932b264dc2e7 Mon Sep 17 00:00:00 2001 From: Joe Haig Date: Mon, 15 Aug 2016 12:45:37 +0000 Subject: [PATCH] Find bitrate and signal level correctly Also, display signal level as just a number rather than a graph --- includes/dashboard.php | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/includes/dashboard.php b/includes/dashboard.php index 90b4fb14..69ed7912 100755 --- a/includes/dashboard.php +++ b/includes/dashboard.php @@ -33,13 +33,13 @@ function DisplayDashboard(){ $strSSID = str_replace( '"','',$result[1] ); preg_match( '/Access Point: ([0-9a-f:]+)/i',$strWlan0,$result ); $strBSSID = $result[1]; - preg_match( '/Bit Rate=([0-9]+ Mb\/s)/i',$strWlan0,$result ); + preg_match( '/Bit Rate=([0-9\.]+ Mb\/s)/i',$strWlan0,$result ); $strBitrate = $result[1]; preg_match( '/Tx-Power=([0-9]+ dBm)/i',$strWlan0,$result ); $strTxPower = $result[1]; preg_match( '/Link Quality=([0-9]+)/i',$strWlan0,$result ); $strLinkQuality = $result[1]; - preg_match( '/Signal Level=([0-9]+)/i',$strWlan0,$result ); + preg_match( '/Signal level=(-?[0-9]+ dBm)/i',$strWlan0,$result ); $strSignalLevel = $result[1]; preg_match('/Frequency:(\d+.\d+ GHz)/i',$strWlan0,$result); $strFrequency = $result[1]; @@ -99,6 +99,7 @@ function DisplayDashboard(){
Connected To

AP Mac Address

Bitrate

+
Signal Level

Transmit Power

Frequency


Link Quality
@@ -108,15 +109,7 @@ function DisplayDashboard(){ aria-valuenow="" aria-valuemin="0" aria-valuemax="100" style="width: %;">% - -
Signal Level
-
-
% -
-
+