Code covered by the BSD License  

4.0

4.0 | 1 rating Rate this file 16 Downloads (last 30 days) File Size: 50 KB File ID: #20667

WiFi RSSI with NDIS protocole

by

 

11 Jul 2008 (Updated )

List Wifi devices and retrieve RSSI values of the signal

| Watch this File

File Information
Description

Retrieve RSSI signal from an 802.3 adapter (WiFi) for Windows system with NDIS protocol.
It requiered a fresh install of a NDISPROT miniport driver. Tested with Windows XP SP2 only.
Should be adapted for windows XP SP1 (NDISPROT => NDISUIO).

To install NDISPROT miniport driver

1) Open your network properties and choose install->protocol, choose "I have a disk..."
2) Select from "ndisprotminidriver" dir and select ndisprot.inf

Usage
------

y = wifiRSSI([device] , [N] , [tempo]);

Inputs
------

device : String contening WiFi device identifier (default : first adapter taken)

N : Number of RSSI point to retreive (default N = 1);

tempo : Waiting time (ms) between two RSSI values (default tempo = 0);

Output
------

y RSSI vector (1 x N). Return NAN if Device is not open or INF if RSSI below Threshold detection

IMPORTANT
---------

Don't forget to start NDISPROT service by the following command from Matlab :

!net start ndisprot

Don't forget also to shutdown NDISPROT service by the following command from Matlab after usage :

!net stop ndisprot

Compilation
-----------

mex -output wifiRSSI.dll wifiRSSI.c

Example 1
---------

device = wifidevice;

y = wifiRSSI(device{1});

Example 2
---------

y = wifiRSSI([] , 100 , 10);

MATLAB release MATLAB 7.5 (R2007b)
Other requirements - Win XP SP2 (SP3 should work) - A Visual C++ 6.0 (to recompile mex-file)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (12)
07 Feb 2014 Sebastien PARIS

Maha,

Sorry but it's an old programm using an old technology of Microsoft. I guess, there is a new API where such informations should be available....

04 Feb 2014 Maha

Hello,
I really appreciate your work. My laptop is windows 7. I also had
system error 1275
this driver has been blocked from loading. I restarted my laptop and disabled driver signature enforcement, yet still have the same error. plus when I tried to mex the file it gave me errors, is it because of my matlab R2012a student version?
Please Help,
Maha

29 Jun 2012 Sebastien PARIS

What kind of OS you have ?. I made this tool mainly for WinXP ... For win > Vista ... not sure this tool can work

16 Jun 2012 Pedro Sacr

Hello! great and useful ideia!

but i have this error :

>> !net start ndisprot
Ocorreu o erro de sistema 1275.

O carregamento deste controlador foi bloqueado

wich means : system error 1275.
the loading of this protocol/controler was blocked.

how can i fix this?

16 Oct 2010 Muddassir

I am using 32-bit version of Windows 7. I need to work on Wifi Positioning system in Matlab 7.0.0.19920. For that i need a version of NDIS protocol or a specified method in matlab so as to communication with the network's wireless adapter. please help me in this regard.

Thankss

29 Apr 2010 Sebastien PARIS

No it's not possible ... disconnected... Sorry.
(maybe in passive mode but not all wifi divices support this mode)

29 Apr 2010 Suwon chon

I know what I have a mistake. it can works when it was connectted with AP.
But, I'd like to see rssi of APs while it was not connecting with AP. Is this possible?
if it's possible, I need your help.

Thank you.

29 Apr 2010 Suwon chon

Hello,
I need your help, I tested your wifiRSSI. but I had a "y" that is just zero. is this good working? and I need RSSI(db) of my wlan adapter. How can I do for it? I think wifiRSSI show RSSI(db) value, but I don't know what I have mistakes.
I'd like to give you a question and your opinions.

code is this
///////////////////////////////////////////////////////
device = wifidevice
N = 10
tempo = 1
y = wifiRSSI([device{1}],[N],[tempo])

result is this
///////////////////////////////////////////////////////
Sample NDIS Protocol Driver 서비스가 잘 시작되었습니다.
device =
'\DEVICE\{97F7EC51-4C57-4A58-BFC7-531CAFC06874}'
N =
10
tempo =
1
y =
0 0 0 0 0 0 0 0 0 0

05 May 2009 Sebastien PARIS

Yes,

You can tweak this mex-file as you want ;)

05 May 2009 Mark Weber

Hello,

thank you for your help. I compiled it with a new Matlab and it is working fine now. But one problem again: How can I see which AP (Mac-Address) has which RSSI values? At the moment I only get RSSI values as I specified but I do not knwo from which AP? Is it possible to get something like this:
MAC1: RSSI1, RSSI2, RSSI3,...
MAC2: RSSI1, RSSI2, RSSI3,...

Thank you for you help in advance again.
BR Mark

05 May 2009 Sebastien PARIS

Well, the included compiled mex-file is not working with your system. You have to recompile it for your system sorry. I don't have the last VS2008 in hand, but I think the compiler is only recognize with the last R2009a. So either you install a prior version of VS, or the newer version of matlab ...

Regards

04 May 2009 Mark Weber

Hello Mr. Paris,

very nice idea your WifiRSSI. But i have a problem using it. Here my setup: Matlab R2007b and WindowsXP SP3. The driver can be started successfully:
>> !net start ndisprot
The EP_NSWD NDIS Protocol Driver service was started successfully.

But if I use your examples like
y = wifiRSSI([] , 100 , 10);

I get errors:
??? Invalid MEX-file 'C:\Documents and Settings\Mark Weber\My
Documents\MATLAB\WIPoS\wifiRSSI.dll': The
specified module could not be found.

Recompiling is very difficult because VS 2008 is installed on my system. Maybe you have an idea? The right workspace is selected with wifiRSSI.dll and wifidevice.dll in it.

Thanks for your help in advance.

BR Mark Weber

Contact us