Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

obtaining received signal strength of neighboring devices

Tags:

c

linux

wireless

I use AR9271 chipset usb WiFi device on Debian 7 on kernel 3.12.rc5. I use ath9k_htc and nl80211 drivers.

I create an ad-hoc WLAN via wpa_supplicant 2.0 and I would like to obtain received signal strength of the neighboring device in a C program.

What function or API can I use to obtain that information?

like image 755
Angs Avatar asked Jan 27 '26 03:01

Angs


1 Answers

This is eminently doable with libpcap, monitoring the wireless lan for the raw packets, including the 802.11 header, which contains the RSSI, as well as the origin MAC address. See this question for a couple of hints and tips as to the decoding the underlying packet structure.

The easiest thing to do is listen for packets from the neighboring devices so that you can read their RSSI. Raw traffic from the wlan device tends to be insanely noisy - you'll have to filter it for only the devices that you're interested in.

The information is only available by reading it yourself, though, there's nothing gathering the data for you; and if there is a quiet device on your network you'll have to figure out some way to get it to talk so you can read the RSSI from it.

like image 68
Petesh Avatar answered Jan 29 '26 17:01

Petesh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!