Wifi Data Collection
| Wifi Data Collection|
Release status: beta [box doku]
|Description||Status of the space via data collection and analysis|
Use wireless connected devices activity from the router and webcam associated to the wifi XinCheJian router to find and predict information about the activity of the space.
- Status page: 
- Status (open/closed) button: [ http://wifi.xinchejian.com/button.png]
- Webcam image: 
- enable telnet access on router
- copy agent source code to /opt/wifi
- symlink file to /etc/init/listae.conf
- service listae start
- Deploy to xinchejian.com
DD-WRT SNMP incomplete?
Originally, instead of telnet, we thought of using SNMP to gather list of currently connected devices on the router. But although DD-WRT advertises the following SNMP data:
OID [dottedt & text format] MEANING RANGE of VALUES CONTENT (example) .220.127.116.11.4.1.2021.255.3.54.18.104.22.168.1.1 index of wireless client (if there are many clients each will have index 1-x) integer 1 .22.214.171.124.4.1.2021.255.3.54.126.96.36.199.4.1 Associated MAC text 00:ff:as:dd:44:55 .188.8.131.52.4.1.2021.255.3.54.184.108.40.206.26.1 SNR of this wireless client
...it doesn't seem to provide information for more than two wireless client at a time.
PandaBoard Wifi monitoring mode not working
An alternative would be to directly monitor wireless connections from the PandaBoard by sniffing traffic. However, it seems that the Linux driver for the wifi component on the PandaBoard does not support monitoring mode.
- Ask to have your public key added to the PandaBoard installation
- Test using putty or openssh to connect using your private key
- Ask to be added to the AppEngine dashboard on https://appengine.google.com
- Install the AppEngine Python development kit
- Checkout the source code from github
Testing the Agent
Fake an http server on a localhost port
$ nc -l localhost 8080
Overwrite the configuration values at the command-line
$ ./listae.py --sqlite_filename /tmp/test.dat --host 192.168.1.1 --user root --password_filename /opt/wifi/router.passwd --server localhost --port 8080
/opt/motion/motion.py --server 192.168.1.92 --port 8182 --dir .
Sniffing MAC addresses using scapy
$ sudo apt-get install scapy $ sudo ifconfig wlan0 down $ sudo iwconfig wlan0 mode monitor $ sudo iwconfig wlan0 channel 6 $ scapy >>> def SniffMAC(p): ... print p ... >>> sniff(iface="wlan0", prn=SniffMAC)
- Either embed the agent in the router directly OR sniff wifi traffic from a separate computer
- Lock down access to /join and /left
- Add machine-readable feed handler
- Graph data