Giter VIP home page Giter VIP logo

wi-fi-sniffer-as-a-human-detector's Introduction

Wi-Fi Sniffer as a Human detector

This is the Material for video: https://www.youtube.com/watch?v=fmhjtzmLrg8

Things to do before you start:

  • In mqtt.h update mqttServer = "Your Broker IP address"
  • replace MQTT_USERNAME, MQTT_KEY if you do not use Peter Scargills script or you changed the "admin, admin".
  • In WiFi_Sniffer set mySSID and MyPassword
  • The mqtt topic is Sniffer/#

You find a sample Node-Red flow. Just copy-paste the raw file into your Node-Red

Dependencies

Install using the Library Manager in Arduino:

wi-fi-sniffer-as-a-human-detector's People

Contributors

guidokanschat avatar iens avatar sensorsiot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wi-fi-sniffer-as-a-human-detector's Issues

Typo in WifiSniffer.ino

line 225
Serial.println("!!!!! Not published. please add #define MQTT_MAX_PACKET_SIZE 2048 at the beginning of pubSubClient.h file");

should say

Serial.println("!!!!! Not published. please add #define MQTT_MAX_PACKET_SIZE 2048 at the beginning of PubSubClient.h file");

What version of arduino json ? Getting errors.

C:\Users\user\.platformio\lib\ArduinoJson\src/../include/ArduinoJson/Internals/../Internals/JsonPrintable.hpp:30:10: note: size_t ArduinoJson::Internals::JsonPrintable<T>::printTo(Print&) const [with T = ArduinoJson::JsonObject; size_t = unsigned int]
size_t printTo(Print &print) const {
^
C:\Users\user\.platformio\lib\ArduinoJson\src/../include/ArduinoJson/Internals/../Internals/JsonPrintable.hpp:30:10: note:   no known conversion for argument 1 from 'char [2415]' to 'Print&'
C:\Users\user\.platformio\lib\ArduinoJson\src/../include/ArduinoJson/Internals/../Internals/JsonPrintable.hpp:44:10: note: size_t ArduinoJson::Internals::JsonPrintable<T>::printTo(char*, size_t) const [with T = ArduinoJson::JsonObject; size_t = unsigned int]
size_t printTo(char *buffer, size_t bufferSize) const {
^
C:\Users\user\.platformio\lib\ArduinoJson\src/../include/ArduinoJson/Internals/../Internals/JsonPrintable.hpp:44:10: note:   candidate expects 2 arguments, 1 provided
C:\Users\alverson\.platformio\lib\ArduinoJson\src/../include/ArduinoJson/Internals/../Internals/JsonPrintable.hpp:49:10: note: size_t ArduinoJson::Internals::JsonPrintable<T>::printTo(String&) const [with T = ArduinoJson::JsonObject; size_t = unsigned int]
size_t printTo(String &str) const {
^
C:\Users\user\.platformio\lib\ArduinoJson\src/../include/ArduinoJson/Internals/../Internals/JsonPrintable.hpp:49:10: note:   no known conversion for argument 1 from 'char [2415]' to 'String&'
*** [.pioenvs\nodemcuv2\src\WiFi_Sniffer.ino.o] Error 1
 [ERROR] Took 3.03 seconds 

Instructions need updating

Hi Andreas and thanks for the videos!!

Just noticed part of the instructions need a little update:

"replace MQTT_USERNAME, MQTT_KEY if you do not use Peter Scargills script or you changed the "admin, admin"."

Actually there are no variables of those names, the credentials are in the "Wifi_Sniffer" tab in the "sendDevices()" function, as a text entry admin/admin.

Thanks :)

PS - is there anything that works for 5Ghz WiFi also?

Data transmitting issue

The device is connecting to the wifi but the data is not being being transmitted via mqtt. The wifi is having internet connection and the mqtt broker is also connected.

Changes to enhance readability

What a great sketch. I'm having a great time trying to figure out the results.

The following changes are minor and just enhance the serial output.
Fo example it occasionally displays a message like
Client 6 removed
which immediately scrolls off the screen while I try to count down to see which want it was.
So I added a number to the left side of the report to make it fast to see which was client 6 :)

LIne 150 replaced:
Serial.println(aps_known_count + clients_known_count);
with
Serial.printf("%4d Devices + Clients.\n",aps_known_count + clients_known_count); // show count

LIne 152 replaced:
// add Beacons
with
// show Beacons

Line 154 replaced:
Serial.print("B ");
with
Serial.printf( "%4d ",u); // Show beacon number
Serial.print("B ");

Line 162 Replaced:
// add Clients
to
// show Clients

Line 164 Replaced:
Serial.print("C ");
with
Serial.printf("%4d ",u); // Show client number
Serial.print("C ");

Line 186 replaced
Serial.print("failed with state ");
Serial.print(client.state());
with
Serial.print("failed with state " );
Serial.println(client.state());

and lastly changed pubSubClient.h to PubSubClient.h

Connectivity issues to push data to MQTT

I'm having an issue where the sniffer cannot connect to AP on the second time, It goes to an infinite loop.

I couldn't find any reason for this to happen. I have flashed this onto an NodeMCU v1.0 board.

ArduinoJson version 6 now, compile fails.

Compiling error, looks like ArduinoJson is on a new, not compatible version. Just reporting it now to you, if I find a fix, I'll follow up.

"StaticJsonBuffer is a class from ArduinoJson 5. Please see arduinojson.org/upgrade to learn how to upgrade your program to ArduinoJson version 6"

Errors in output when no MQTT Broker is available

Great sketch, running fine on Wemos D1 Mini. Thanks for sharing.

I do not have an MQTT broker in my network, so the sketch output contained error messages.

I disable contacting an MQTT broker by commenting out line 98:

//    sendDevices();

New Json library version 6

Unfortunately this script uses the obsolete version 5 of the Json library. The current version 6 doesn't work with the script and the script needs to be adapted to the new version. This requires more than my knowledge of C++ to change the script.

Watchdog crashes on NodeMCU 0.9 Core 2.4

This was an very quick and easy project to build, I have integrated mine with Hassio.
I noticed that my NodeMCU (8266) would crash after running a few hours with core 2.4.0.

I rolled it back to 2.3.0 and now its much more reliable.

Thanks for this really cool project and all the hard work you put in to it!

P

Unable to publish to MQTT

I tried out your code to see how well it works, fairly well, but whenever the time comes to publish to MQTT it tells me the message "!!!!! Not published. Please add #define MQTT_MAX_PACKET_SIZE 2048 at the beginning of PubSubClient.h file"

I have tried adding that to all of the files but still nothing.

Can I have a MAC list pre-defined in the code?

Hi Sir, thanks for your awesome job, the code is running very well!
However, the esp is constanly publishing many payloads and filled them all into my poor rpi mqtt server(around 100 msg per hour) and may have 3k+ msg per day!! I think this is huge and may crash the mqtt server(and the rpi sdcard maybe)
So, is that possible to have a few devices mac list pre-defined to codes and let the esp checking those mac if still can be seen, or if there is any other way to "reduce" the amount of those messages filled into the rpi?

Dependencies

Thanks for this!
Please include or list dependencies.

PURGETIME and MINRSSI

in the sendDevices() function, if the rssi is not bigger than the MINRSSI the device (beacon or client) will be excluded from the list immediatly, disregarding the PURGETIME value.

Speed Issue

I have tried this out with a Wemos D1, and it works alright, at first. But on the second attempt to connect to my WIFI to send to MQTT server, it never connects again. I do not think it is an issue with the program or Arduino, it's probably my network.

However, in my attempt to think of a "work around" to the problem, I had an idea that I have not yet tried. What if, to improve speed, rather than use multiple ESP12E chips, just use 2 chips? First chip scans wifi continuously, and never attempts to stop scanning to link to the WAP2 network, saving time, and sending data via serial or I2C to the second chip. The second chip is always connected to the local LAN, and never needs to disconnect/reconnect, and reads data from first chip and transmits to the MQTT server?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.