schollz / find-lf

Track the location of every Wi-Fi device (:iphone:) in your house using Raspberry Pis and FIND
https://www.internalpositioning.com/plugins/#using-find-without-an-app
GNU Affero General Public License v3.0
994 stars 123 forks source link

Allow listening for wireless capture on serial interfaces #18

Open mzealey opened 6 years ago

mzealey commented 6 years ago

Protocol is to pass lines in the format of "mac_address rssi packet_count" at 115200bps.

I've not been able to test the significant refactoring of the Wifi capture but it should be functionally equivalent.

In my test device (C.H.I.P, which only has a single wifi connection), I've plugged in an ESP8266 which is just dumping captures in this protocol over the serial connection and it is working well. I will document this shortly on my blog.

schollz commented 6 years ago

@mzealey This looks fantastic! I'll have to wait to merge until I can test it myself. My Pi network is not setup at the moment so it might be a few days.

Please share with me the link to your blog, or send a pull request to add it to the README!

mzealey commented 6 years ago

https://github.com/mzealey/ESP8266-WIFI-Scanner here is the code for the ESP8266

saket424 commented 5 years ago

I tried out @mzealey pyserial solution and it works well. @schollz i request you to consider merging his PR

In my case I had to change the following line in scan.py for the flavor of linux (tinkerOS) on an ASUS tinkerboard where my esp8266 was /dev/ttyUSB0

< if args.interface.startswith("ttyS"):

if args.interface.startswith("ttyUSB"):

so just startswith("tty") should suffice and generalize to deal with both /dev/ttySx and /dev/ttyUSBx devices