Search code examples
mininetrssiradiotap

Mininet/Wifi: Radiotap captured RSSI not varying when station mobility is simulated


Using Mininet for Wifi's Python API I am simulating one AP and two stations. The AP is at '0,0,0' and sta1 is at '0,10,0'. I am moving sta2 back and forth on a line '0,50,0' through '0,150,0'. Also, I have an extra radio configured when creating Mininet. Then in another window I put the extra radio's wlan interface in monitor mode, and capture the wifi traffic using tcpdump/Wireshark.

I was expecting to see the RSSI in the Radiotap headers to vary as the sta2 moves between 50 and 150 meters. But I see that the RSSI for each station to be fixed at 30 and 36dBm. What am I missing, why does the SSI not change as I believe it should? Is it because of some limitation of mac80211_hwsim or Mininet itself, or is my expectation incorrect?

The test Python program is here, and the captured tcpdump/Wireshark for the pings is here. Note that in the capture I have filtered out the beacons to keep minimum the packets the examine. Given the larger file sizes I have provided pointers to where you may download the two relevant files.


Solution

  • Although you are able to get the rssi through py staX.params['rssi'], mac80211_hwsim takes into account only the power_level (or tx power) in its formula, as you can see at row 1211 in https://github.com/torvalds/linux/blob/master/drivers/net/wireless/mac80211_hwsim.c. That's why the RSSI doesn't change in the beacons.