Tested on:
-
Raspberry-PI 2 Model B
-
OS Raspberrian "uname -a": Linux raspberrypi 3.18.7-v7+ #755 SMP PREEMPT Thu Feb 12 17:20:48 GMT 2015 armv7l GNU/Linux
-
Monitoring WLAN card chipset: Realtek RT5370
-
Note: the edimax dongle does not work on monitoring mode
-
$ sudo apt-get update $ sudo apt-get -y upgrade $ sudo apt-get -y install libssl-dev libnl-dev $ wget http://download.aircrack-ng.org/aircrack-ng-1.2-rc2.tar.gz $ cd aircrack-ng-1.2-rc2/ $ make $ sudo make install $ sudo apt-get -y install iw ethtool tshark
$ cd /home/pi/WifiAnalyticsIoT/client $ nohup ./network_reconnect.sh &
NOTE: Testing a different solution… it seems adding "wireless-power off" on the device listing at /etc/network/interfaces does the trick. Need to test longer term. Example config for wlan0:
auto wlan0 allow-hotplug wlan0 iface wlan0 inet manual wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf iface default inet dhcp wireless-power off
$ ./startMonitor.sh
$ sudo tshark -i wlan1mon -I -l -f broadcast -R wlan.fc.subtype==4 -T fields -e wlan.sa -e radiotap.dbm_antsignal -e radiotap.channel.freq tshark: Lua: Error during loading: [string "/usr/share/wireshark/init.lua"]:45: dofile has been disabled Running as user "root" and group "root". This could be dangerous. Capturing on wlan1mon 6c:94:f8:8e:7e:1e -45 2437 6c:94:f8:8e:7e:1e -45 2437 10:41:7f:1a:97:d9 -71 2437 74:da:38:56:01:5e -19 2437 74:da:38:56:01:5e -15 2437 74:da:38:56:01:5e -9 2437 74:da:38:56:01:5e -17 2437 74:da:38:56:01:5e -17 2437 74:da:38:56:01:5e -19 2437 74:da:38:56:01:5e -15 2437 74:da:38:56:01:5e -19 2437 ^C
(leave it for a few minutes, enable and disable your cell wifi within a few meters range until you see some data being captured, but if you see "Capturing on wlan1mon" it should be good)
$ vi IoT-Analytics-Http/src/main/resources/application.properties
-
Change the serverUrl property with the Spring XD HTTP deployed stream location
-
Select the right tshark_process variable, depending on your environment
-
Save file
TODO: change to generate Jar and run jar in background
$ cd IoT-Analytics-Http $ ./gradlew run