Open ruiemcardoso opened 7 years ago
I forgot to mention that I'm running ubuntu natively
iw dev wlp3s0 scan
in python try:
import os
wifi_readings = os.popen("iwlist wlp4s0 scanning | egrep 'Address|Signal'").read()
then process wifi readings to get only the info that you need
for example to remove spaces between lines:
import re
re.sub(' +',' ','The quick brown fox')
also check : https://github.com/RMiyagusuku/ros-wifi-localization/blob/master/rss/src/rss/RSSImeasurement.py
lines 59-60
We used the python code
import os wifi_readings = os.popen("iwlist wlp4s0 scanning | egrep 'Address|Signal'").read()
and there's a problem: the wifi_readings string only has information about one of the access points.
try disconnecting from the wifi, you will then get many
indeed, we get more access points but in order to remotely control the robot we need to be connected to wi fi
yes, you need a usb to wifi pendrive
My group has been getting wi fi info this way, but we just noticed that the method used gives us the same information several times, needing too much time to change (10/20 sec)
try out the method used in https://github.com/RMiyagusuku/ros-wifi-localization/blob/master/rss/src/rss/RSSImeasurement.py
but just the code that gets the readings ; )
i made a shell script which consists in a loop that returns wi fi readings, and it works well for about a minute, but after that i get the following message: "command failed: Device or resource busy (-16)".
i think this may be related to the fact that as we are using the computer's wi fi sensor, when it gets another task, it may not be able to continue providing us the information
The .sh file has this code: