Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP8266 as node #17

Open
hofi-jus opened this issue Aug 24, 2017 · 8 comments
Open

ESP8266 as node #17

hofi-jus opened this issue Aug 24, 2017 · 8 comments

Comments

@hofi-jus
Copy link

hofi-jus commented Aug 24, 2017

Hello, Is it possbilbe to use a ESP8266 as Wifi Sniffer and report the data to your Server?
I will automate my house via Home Assistant and found your interresting project.
But i have the problem that i can not install any apps on my buisness phone but half a day i am searching it.
So find if would be the perfect solution.
As i automate everything at home i use NODEMCU dev boards everywhere. In light switch door opener etc pp.
This boards are more powerfull than aruinos and really cheap.
I send and receive mqtt packages for the given tasks.

With your server and a sniffing code like this
https://github.com/rw950431/ESP8266mini-sniff

Also asked rw950431 if it could be done
rw950431/ESP8266mini-sniff#1

I would have allready everthing installt and can locate my buisness phone.
No expensiv RPi3 and Wifi Dongles are needed.

ESP8266 can be used as wifi repeater, not for video streaming, but txt pages are good.
So running in monitormode with connection via Wifi to your server should also be possible.

Any opinion how to send the data to server?
Do not know a lot about mqtt but maybe this can be used to send.

@schollz
Copy link
Owner

schollz commented Aug 27, 2017

Hi @hofi-jus, I think it would work fine. You could use MQTT to send data, or just JSON. However, you do need to have code that tells the ES8266 to switch from monitoring to transferring. Usually wifi chips do not allow both at the same time. You could do something like monitor for 30 seconds, then upload results, and then keep doing that forever.

Let me know if you have more questions.

(By the way, MQTT is not so bad - here's a sketch I made for using it with Particle Photons: https://gist.github.com/schollz/d388b0c0ed1bb3b604eba6b7154a49d1#file-find_photon_mqtt-ino )

@hofi-jus
Copy link
Author

hofi-jus commented Aug 28, 2017

thanks will have a look on it.
rw950431 mentioned that devices do not transmit all the time. Have you long-term experience with find if.

He also would take one esp for monitor and a second via serial transmitting to connect to wifi

@schollz
Copy link
Owner

schollz commented Aug 28, 2017

Having two should work fine, I didn't think about that.

Another issue to keep in mind is the antenna. The range of cellphones that they will detect depends on the antenna. You can usually buy one or build one (just make sure that you have the correct length for 2.4 Ghz.

@hofi-jus
Copy link
Author

Will try with onboard antenna and if its to weak will try the modules where I can attaché external antenna

@nonchip
Copy link

nonchip commented Sep 27, 2017

what would be really great:

  • have ESP based nodes with just the chip, antenna, battery/plugpack that measure, and periodically (every few seconds) talk to each other (in a broadcast-mesh-like system; using the monitor mode to receive so they don't have to sync the "meshing time", just periodically switch to "send stuff" mode; ideally even by avoiding to broadcast at the same time)
  • have one or more raspi nodes that monitor for both measurements and packets from the ESP nodes and uplink using ethernet.

so you can deploy only a few raspis but quickly deploy "node throwies" as required. both to save money at home/etc (ESPs are cheaper than raspis and wifi is cheaper than cables) and to quickly deploy a sensor network e.g. for conferences/etc.

I imagine if for example one of those ESP nodes spends 10secs in monitor mode, then one in "just broadcast all collected information to every monitoring node around me" mode, one could build a network of like 10 nodes, they'd get in the best case 1sec or in worst case 10secs "accuracy" for "fresh" latency measurements, which would be enough for e.g. matching people to rooms and/or even kinda accurately (to a few meters) locating them in a conference building/etc

also you might even be able to then use those nodes on e.g. a driving robot and use it to scan the network to locate itself, then improve that measurement with camera/lidar/sonar information and know exactly where it is, just by being in wifi range of a few "node throwies" stuck to walls.

@nonchip
Copy link

nonchip commented Sep 27, 2017

I have 5 "AI-THINKER ESP8266MOD" modules (the ones with FCC approval) lying around here, and no idea what to do with those (didn't even install a toolchain for them yet) so if you'd like to tell me what to do to help you developing/testing such a feature, I'd be glad to help.

specs according to laser etching (google datasheet for more): +25dBm; 802.11b/g/n @2.4GHz

programmable using SPI with a nice bunch of GPIOs at the side. and they even come in tape reels because they're so cute&small :P

@nonchip
Copy link

nonchip commented Sep 27, 2017

idea to avoid having to drop monitor mode: we don't even really have to connect to anything. why not forge a raw packet containing our data addressed to some invalid MAC the other nodes will recognize as "stuff forwarded to me" when monitoring.

@jacobalberty
Copy link

I've made good progress on this. https://github.com/jacobalberty/esp8266-find-passive . I'm taking the drop out of monitor mode approach. It doesn't yet push the json but if my memory is correct on the format for find-lf I do have the json generated correctly, everything but the timestamps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants