intrig-unicamp / mininet-wifi

Emulator for Software-Defined Wireless Networks
https://mn-wifi.readthedocs.io/
Other
431 stars 239 forks source link

Best way to get the rssi values. #476

Closed Sai-Vivek-Pidaparthi closed 1 year ago

Sai-Vivek-Pidaparthi commented 1 year ago

I need to get the rssi values of every ap in range every 5 seconds.

  1. I tried the iw dev scan command but its taking too long to get the rssi values,
  2. also tried the py sta1.wintfs[0].rssi but it is showing only one instance
  3. tried the telemetry thing too, but when i am using net.telemtetry, I cant use net.plotgraph. is there any way to use both?

actually I want to get the RSSI values every 3 seconds and send those to the controller so that the controller can make decisions.

ramonfontes commented 1 year ago

Why don't you capture beacons through the monitor interface??

Sai-Vivek-Pidaparthi commented 1 year ago

I created two interfaces while setting up the topology, sta1-wlan0 and sta1-wlan1, wlan0 is associated to an AP, while wlan1 is in monitor mode, when I enter "iw sta1-wlan1 scan" command it says operation not permitted.

ramonfontes commented 1 year ago

Sorry?? Have you been using iw?? Why don't you simply create the monitor interface from sta1-wlan0?

Sai-Vivek-Pidaparthi commented 1 year ago

while sta1-wlan0 is associated to an ap, if I set it in monitor mode, It will be in passive mode and disconnects from the ap. so I added two interfaces one for association with ap and another one to be in monitor mode. in both the cases if enter "iw interface scan", I am getting the same error as operation not supported.

Note: I dont want to capture the beacon frames in wireshark.

ramonfontes commented 1 year ago

Dear,

I'm not talking about setting interface to monitor mode. I'm talking about creating a virtual interface in monitor mode. I suggest you reading the iw doc.

I'm not talking about using wireshark neither. I'd suggest you to use scapy.

Well, this is a well-known topic in the community. If I were you I'd take some time for reading.

Sai-Vivek-Pidaparthi commented 1 year ago

Hey thanks for pointing towards the right direction.

I created an interface 'sta1-wlan0', and put it to monitor mode and wrote a program using scapy to sniff the packets and filtered the rssi values. this part is a success.

but if I create two interfaces and put one of them in monitor mode then I cant see any broadcast frames in wireshark. becuase I need one interface to monitor so that I can capture beacon frames and another one as a managed interface so that it can get associated to an access point.

ramonfontes commented 1 year ago

Note: I dont want to capture the beacon frames in wireshark. but if I create two interfaces and put one of them in monitor mode then I cant see any broadcast frames in wireshark.

I'm getting confused..

becuase I need one interface to monitor so that I can capture beacon frames and another one as a managed interface so that it can get associated to an access point.

I get more confused...

Sai-Vivek-Pidaparthi commented 1 year ago

no problem, I figured it out. thanks for helping by the way. you can close this issue.