MATLAB: Analyze netsh wlan show all for RSSI distance and location

signal rssi for distance and location from ap

I need help from the attached file ("myNetwork_bssid.txt") for the analysis of Signal (RSSI) to calculate the distance and location of Node.
Requirement : Calculate the distance and location of Node from AP using Signal .
SSID 3 : Taps
Network type : Infrastructure
Authentication : WPA2-Personal
Encryption : CCMP
BSSID 1 : 98:da:c4:1a:8d:75
Signal : 43%
Radio type : 802.11n
Channel : 3
Basic rates (Mbps) : 1 2 5.5 11
Other rates (Mbps) : 6 9 12 18 24 36 48 54
I would like to analyze above section of log data.
From the Signal (RSSI ) section i would like to derive the distance and location from AP.

Best Answer

Here is a way to parse your netsh output. Note that it assumes that each SSID has only one BSSID, If there is more than one, you'll only get the first one.
[~, bssid_cmdout] = system('netsh wlan show network mode=bssid');
%build a regex:
tokens = compose("[^:]+: (?<%s>[^\\n]*)", ["NetworkType", "Authentication", "Encryption", "BSSID", "Signal", "RadioType", "Channel", "BasicRates", "OtherRates"]);
re = strjoin(["(?<=SSID \d+ : )(?<SSID>[^\n]*)", tokens], "");
%extract relevant data into structure:
ssids = regexp(bssid_cmdout, re, 'names');
%tidy up by converting a few fields to numeric
signals = num2cell(str2double(extractBefore({ssids.Signal}, '%')));
[ssids.Signal] = signals{:};
channels = num2cell(str2double({ssids.Channel}));
[ssids.Channel] = channels{:};
As for the rest, you'll have to figure it out on your own. I'm not going to read your paper for you.