Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add wifi_monitor package #8

Open
wants to merge 1 commit into
base: kinetic
Choose a base branch
from

Conversation

furushchev
Copy link

this pull request adds wifi_monitor package, including nodes publishing wifi network status.

---
header: 
  seq: 2
  stamp: 
    secs: 1472354728
    nsecs: 479886054
  frame_id: ''
interface: wlan0
enabled: True
connected: True
ssid: <hidden>
frequency: 2.43700003624
access_point: <hidden>
bitrate: 144.399993896
tx_power: 22A4:12:42:47:E8:FD
link_quality: 0.714285731316
signal_level: -60

---

image

@naveedhd
Copy link

The output of iwconfig differs from driver to driver, so parsing the output requires considering different fields.

Running your program gives the following error at my system:

[ERROR] [WallTime: 1472630848.523563] Failed to publish status: 'Tx-Power'
[ERROR] [WallTime: 1472630848.524472] Traceback (most recent call last):
  File ".../wifi_monitor/scripts/network_status.py", line 114, in publish_status
    msg.tx_power = extract_number(self.iwconfig.status["Tx-Power"])
KeyError: 'Tx-Power'

Here is the output of iwconfig:

wlan2     IEEE 802.11AC  ESSID:"<hidden>"  Nickname:"<hidden>"
          Mode:Managed  Frequency:5.785 GHz  Access Point: <hidden>   
          Bit Rate:867 Mb/s   Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=100/100  Signal level=100/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

@furushchev
Copy link
Author

@naveedhd Thank you for reviewing! I just did not know that.

This is at my system:

wlan0     IEEE 802.11abgn  ESSID:"<hidden>"  
          Mode:Managed  Frequency:2.462 GHz  Access Point: <hidden>  
          Bit Rate=130 Mb/s   Tx-Power=13 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=48/70  Signal level=-62 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:113   Missed beacon:0

It seems that for example there is no Tx-Power at your system.
Well, what is the output of iwlist wlan2 txpower at your system?

@naveedhd
Copy link

naveedhd commented Sep 1, 2016

iwlist wlan2 txpower gives:

wlan2 unknown transmit-power information.

@naveedhd
Copy link

naveedhd commented Sep 1, 2016

Also you can notice the difference in output of Signal Level. One is in dBm and other is x/100.

@reinzor
Copy link
Member

reinzor commented Oct 26, 2018

What's the status on this? I also have my custom wireless monitor solution now: ros/diagnostics#87

Could we add this to this repo?

@k-okada k-okada changed the base branch from indigo to kinetic November 16, 2019 05:31
@k-okada
Copy link
Contributor

k-okada commented Nov 16, 2019

@reinzor can you add your work to this package? Thanks in advance.

@reinzor
Copy link
Member

reinzor commented Nov 18, 2019

@reinzor can you add your work to this package? Thanks in advance.

Just added a new PR with the mentioned work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants