Difference between revisions of "Setting up Wifi Scanner"

From Lofaro Lab Wiki
Jump to: navigation, search
(Created page with " == Building Wifi Scanner == After you have went through the http://wiki.lofarolabs.com/index.php/Installing_Packages_Required_for_SLAM Installing Packages Required for SLA...")
 
(Running the Wifi Scanner)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
  
== Building Wifi Scanner ==
+
== Running the Wifi Scanner ==
  
After you have went through the [[http://wiki.lofarolabs.com/index.php/Installing_Packages_Required_for_SLAM Installing Packages Required for SLAM]] page, you can now build the wifi tools that will allow us to get data from the surrounding Wireless Access Points. Lets go through the steps:
+
The wifi scanner is created to allow for multiple wifi dongles to be run. This allows to get data much faster than with a single dongle.
  
1.) Open a terminal and change directory to where you saved MILES then navigate to wifi_scanner. For example:
+
The wifi scanner has two parts, the trigger and the wlan nodes that will get MAC address and signal strength and write this information to a ROS topic.
  
  cd ~/catkin_ws/src/MILES/wifi_scanner
+
1.) To start the trigger that controls when the wifi dongles will run, type:
  
2.) Now that you are in the directory you need to clean any old CMAKE builds:
+
  rosrun wifi_scanner trigger wlan0 wlan1
  
  script clean.sh
+
The wlanN refers to the wifi dongle's network identity in Linux.
  
3.) Lastly, we can now build the package:
 
  
  script build.sh
+
2.) Next lets start a scanner. Open a new terminal and type:
 
+
wifi_scanner should now build without any errors. If there are errors make sure you have done every step on the [[http://wiki.lofarolabs.com/index.php/Installing_Packages_Required_for_SLAM Installing Packages Required for SLAM]] page. IF there still are errors, you can email rtindel2@gmu.edu.
+
 
+
 
+
== Running the Wifi Scanner ==
+
  
Now that we have built the wifi scanner we can now test to see how well it works. If you are running on a Virtual Machine or do not have a Wireless card on your computer, you will need to get a USB Wireless Receiver. Here are the steps:
+
  sudo -s
 +
  rosrun wifi_scanner scan_wifi -i wlan0
  
1.) Open a new terminal.
 
  
2.) Navigate to the directory that you built wifi_scanner. For Example:
+
3.) You should have as many wlan nodes as you have wifi dongles. Open another terminal and type:
  
  cd ~/catkin_ws/src/MILES/wifi_scanner/bin
+
  sudo -s
 +
  rosrun wifi_scanner scan_wifi -i wlan1
  
3.) Now we can run the wifi_scanner, though make sure it is run as root.
 
  
  sudo ./test_wifi_scanner
+
You now have two nodes that will write to the same topic. The trigger will time the two nodes in such a way as to double the speed at which we can get data.

Latest revision as of 21:16, 17 March 2015

Running the Wifi Scanner

The wifi scanner is created to allow for multiple wifi dongles to be run. This allows to get data much faster than with a single dongle.

The wifi scanner has two parts, the trigger and the wlan nodes that will get MAC address and signal strength and write this information to a ROS topic.

1.) To start the trigger that controls when the wifi dongles will run, type:

 rosrun wifi_scanner trigger wlan0 wlan1

The wlanN refers to the wifi dongle's network identity in Linux.


2.) Next lets start a scanner. Open a new terminal and type:

 sudo -s
 rosrun wifi_scanner scan_wifi -i wlan0


3.) You should have as many wlan nodes as you have wifi dongles. Open another terminal and type:

 sudo -s
 rosrun wifi_scanner scan_wifi -i wlan1


You now have two nodes that will write to the same topic. The trigger will time the two nodes in such a way as to double the speed at which we can get data.