linux_peripheral_interfaces
linux_peripheral_interfaces copied to clipboard
add wifi_monitor package
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
---
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
@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?
iwlist wlan2 txpower
gives:
wlan2 unknown transmit-power information.
Also you can notice the difference in output of Signal Level
. One is in dBm and other is x/100.
What's the status on this? I also have my custom wireless monitor solution now: https://github.com/ros/diagnostics/pull/87
Could we add this to this repo?
@reinzor can you add your work to this package? Thanks in advance.
@reinzor can you add your work to this package? Thanks in advance.
Just added a new PR with the mentioned work.