Analyze netsh wlan show all for RSSI distance and location

조회 수: 5 (최근 30일)
Life is Wonderful
Life is Wonderful 2019년 12월 7일
편집: Life is Wonderful 2019년 12월 16일
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.
  댓글 수: 3
Adam Danz
Adam Danz 2019년 12월 9일
편집: Adam Danz 2019년 12월 9일
Hi Matlab :D
I saw your message with a link to this post from your previous question but to be honest, it's not immediately obvious to me where I'd start to solve this one.
Life is Wonderful
Life is Wonderful 2019년 12월 10일
편집: Life is Wonderful 2019년 12월 10일
Thanks a lot Guillaume and Adam.
With Reference to the article
With reference to the formula ,
d is regarded as the undetermined distance
?=10(?−RSSI)/10?.
RSSI = Signal ( Signal : 43%)
?=?(?0), the radio frequency parameter A indicating the received absolute value of mean energy, which is received from the projection node when distance is 1 m; it is in dBm
I need help on
  • Parsing the files. Get the below parameter in a structure
Signal : 80%
Radio type : 802.11n
Channel : 10
Basic rates (Mbps) : 1 2 5.5 11
Other rates (Mbps) : 6 9 12 18 24 36 48 54
  • Insert the Signal & A value to above formula.
I have used a small code snippet to get the the above files to get the Wlan Wifi data. May be you can help if you know more command to get the requirement better. I need your help in moving forward with your guidence.
clearvars;
clear all;
clc;
x = 1;
while (x < 5)
[bssid_status,bssid_cmdout] = system('netsh wlan show network mode=bssid > C:\Users\shastry\Mathwork_va\Wlan\tmp\myNetwork_bssid.txt &','-echo');
[all_sstatus,all_scmdout] = system('netsh wlan show all > C:\Users\shastry\Mathwork_va\Wlan\tmp\myNetwork.txt &','-echo');
[Interf_status,Interf_cmdout] = system('netsh wlan show interfaces > C:\Users\shastry\Mathwork_va\Wlan\tmp\myinterfaces.txt &','-echo');
% eval([bssid_cmdout,all_scmdout,Interf_cmdout]);
pause(0.50);
x = x + 1;
disp(x);
end
Thank you!!

댓글을 달려면 로그인하십시오.

채택된 답변

Guillaume
Guillaume 2019년 12월 10일
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.
  댓글 수: 2
Life is Wonderful
Life is Wonderful 2019년 12월 11일
Works perfect!! Thanks a lot for your help..
Life is Wonderful
Life is Wonderful 2019년 12월 16일
편집: Life is Wonderful 2019년 12월 16일
Hi Guillaume and Adam
Can you please help for the issue in the below link:
Thank you!!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 WLAN Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by