ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

Wifi signal strength monitoring in ROS fuerte?

asked 2012-06-13 07:37:12 -0500

ulzi.otgonbaatar gravatar image

updated 2012-06-14 11:12:18 -0500

mjcarroll gravatar image

Hi all,

Does anyone know if Fuerte actually integrated wireless signal strength support? I personally would like to monitor strengths of various wireless signals and based on that do planning like when to connect to the server.

This page suggests that "signal strength" support was added in Fuerte. Also, this suggests that wpa_supplicant_node can be used for signal strength support.

However, wpa_supplicant_node is undocumented and seems to be only dealing with WPA (i.e. security)side of the wireless signals based on the source code. It does not give the ability to query wireless signals and their strengths as I wish.

Is there any other node in Fuerte that can help me monitor the wireless signal strengths? Any pointers appreciated.

Thanks in advance.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
2

answered 2012-06-14 13:09:11 -0500

mjcarroll gravatar image

So, I went from a fresh Fuerte install, and installed the linux_networking stack. Using the new rosws, this is pretty straightforward:

roslocate info linux_networking | rosws merge -
rosws update

I then installed the dependencies and compiled the wpa_supplicant_node:

rosdep install wpa_supplicant_node
rosmake wpa_supplicant_node

Once this is all set up, you can get the node running. I believe that this has to be done with super user privileges, as that's what wpa_supplicant requires. Someone may know how to do this with regular user privileges.

The node takes the arguments that wpa_supplicant would normally take, so in my case, I did the following:

sudo -s
source ~/devel/wireless/setup.bash
rosrun wpa_supplicant_node wpa_supplicant_node -iwlan0 -ctest.conf -Dnl80211 -dd

Once running, a rostopic list returns the following:

/wifi/wlan0/associate/cancel
/wifi/wlan0/associate/feedback
/wifi/wlan0/associate/goal
/wifi/wlan0/associate/result
/wifi/wlan0/associate/status
/wifi/wlan0/association_state
/wifi/wlan0/frequency_list
/wifi/wlan0/network_list
/wifi/wlan0/scan/cancel
/wifi/wlan0/scan/feedback
/wifi/wlan0/scan/goal
/wifi/wlan0/scan/result
/wifi/wlan0/scan/status
/wifi/wlan0/scan_results
/wpa_supplicant/parameter_descriptions
/wpa_supplicant/parameter_updates

If you simply want network signal strength, I would suggest using the /*/scan_results topic, which returns the following:

∫ rostopic echo /wifi/wlan0/scan_results
success: True
bss: 
  - 
    stamp: 
      secs: 1339715209
      nsecs: 925256105
    ssid: Avocado
    bssid: [0, 127, 40, 49, 227, 125]
    frequency: 2437
    beacon_interval: 100
    capabilities: 1073
    quality: 0
    noise: 0
    level: -46
    wpa: 
      key_mgmt: ['wpa-psk']
      group: ['tkip']
      pairwise: ['tkip', 'ccmp']
    rsn: 
      key_mgmt: ['wpa-psk']
      group: ['tkip']
      pairwise: ['tkip', 'ccmp']
  - 
    stamp: 
      secs: 1339715208
      nsecs: 921288442
    ssid: ZEO32
    bssid: [0, 24, 1, 236, 26, 48]
    frequency: 2412
    beacon_interval: 100
    capabilities: 1329
    quality: 0
    noise: 0
    level: -86
    wpa: 
      key_mgmt: []
      group: []
      pairwise: []
    rsn: 
      key_mgmt: []
      group: []
      pairwise: []
---

This shows the (rather sparse) wifi networks in my apartment. You can also make calls through the Actionlib interface to the node as well.

Hope this helps you out.

edit flag offensive delete link more

Comments

Thanks a lot. I really helps.

ulzi.otgonbaatar gravatar image ulzi.otgonbaatar  ( 2012-06-15 03:23:04 -0500 )edit
0

answered 2018-10-18 19:27:59 -0500

lucasw gravatar image

https://github.com/iancoleman/python-... isn't a ros node but makes it easy to to parse the output of iwlist which can be easily integrated into a node.

Then it's convenient to give permission to your user to use iwlist as root (it runs as a regular user, but doesn't return a list of every observed access point, just the one it is connected to, or ones it has logins for?)

sudo visudo -f /etc/sudoers.d/iwlist
myusername ALL=(root) NOPASSWD: /sbin/iwlist wlo1 scan

(not sure if leaving off the interface name and 'scan' still works, or if that is just good security practice to restrict usage)

I had to do this also (maybe the above rule isn't needed at all, just this?)

sudo chmod u+s /sbin/iwlist
edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-06-13 07:37:12 -0500

Seen: 1,320 times

Last updated: Oct 18 '18