Introduction: MASLOW: an Open WiFi Detector With ESP8266

Picture of MASLOW: an Open WiFi Detector With ESP8266

English/Español

Hola amigos en esta ocasión le voy a enseñar como hacer un detector de redes abiertas con el modulo WiFi ESP8266, este detector nos notifica cuando una red WiFi cerca de nosotros esta abierta o no tiene cifrado WEP (que casi es lo mismo que abierta), cuando el ESP8266 detecte uno de estos tipos de redes inalambricas por medio de un parpadeo del led nos lo indicara y una vez nos haya notificado el ESP8266 entrara en modo sueño para ahorrar bateria.

Hello friends this time im gonna show you how to make a detector for open wifi with the module ESP8266, this detector notifies you when an open WiFi or non encrypted is near to you, when it detects one kind of this wireless net, through a LED it will indicate with blink and one time it notifies you the module will go to sleep mode in order to save battery.

Step 1: Material

Picture of Material

English/Español

El material que necesitamos para crear nuestro detector de redes WiFi abiertas es:

  • NodeMCU v1.0 ESP8266 o cualquier versión superior a la versión 01 del ESP8266
  • BackPack NodeMCU v1.0 ESP8266 disponible en Tindie
  • Bateria LiPo de Adafruit

Este Backpack fabricado por nosotros puede encontrarlo en Tindie

Teniendo todo es hora de comenzar.

The material we need to make our open WiFi detector is:

  • NodeMCU v1.0 ESP8266 or any superior version than 01 of the ESP8266
  • BackPack NodeMCU v1.0 ESP8266 available on Tindie
  • Battery LiPo from adafruit

This Backpack made by us can be bought on tindie.

Step 2: Diagrama De Conexión

Picture of Diagrama De Conexión

English/Español

Como queremos tener acceso al modo de sueño del ESP8266 nuestro diagrama de conexión es el siguiente, muy sencillo pero necesario es puentear el pin RST y el GPIO16

Cause we want to have acces to the sleep mode of the ESP8266 our conection diagram is the next, a very simple circuit but necesary, conect the RST pin to the GPIO16

Step 3: Codigo

Picture of Codigo

English/Español

Una vez conectado todo es hora de programar, el código necesario para hacer funcionar nuestro detector de redes WiFi abiertas es el siguiente, este desarrollado para el ESP8266 con el IDE de Arduino.

Once that conection is done, its time to program. the necesary code to make our WiFi open detector works is the next, it was developed for The IDE of the Arduino with the module ESP8266.

https://github.com/sabas1080/OpenWiFiDetectorESP8266/blob/master/OpenWiFiDetector.ino
#include "ESP8266WiFi.h"<br>// Time to sleep (in seconds):const int sleepTimeS = 30;
void setup() {  Serial.begin(115200);
  // Set WiFi to station mode and disconnect from an AP if it was previously connected  WiFi.mode(WIFI_STA);  WiFi.disconnect();  delay(100);  pinMode(4, OUTPUT);  Serial.println("Setup done");
}  void loop() {  uint8_t sec;    analogWrite(4, 10);
  Serial.print(F("Scanning..."));  int n = WiFi.scanNetworks(); // WiFi.scanNetworks will return the number of networks found  Serial.println(F("scan done"));  if (n == 0)    Serial.println(F("no networks found"));  else  {    Serial.print(n); Serial.print(F(" network"));      if(n > 1) Serial.print('s');      Serial.println(F(" found:"));    for (int i = 0; i < n; ++i)    {      int sec = WiFi.encryptionType(i);              // Print SSID and RSSI for each network found        Serial.print(i + 1);        Serial.print(": ");        Serial.print(WiFi.SSID(i));        Serial.print(" (");        Serial.print(WiFi.RSSI(i));        Serial.print(")");        Serial.println(sec);        delay(10);
        if((sec == ENC_TYPE_NONE || sec == ENC_TYPE_WEP) && (WiFi.RSSI(i) > -95)) { // If open network and good signal...            // Switch LED to conspicuous 'open networks' flash immediately            analogWrite(4, 1023); // 1 sec            delay(1000);            // "Open hotspot" is as good as the indicator gets and the scan            // can stop now, get into power-saving sleep mode ASAP.            // If you're using the Serial console and want to see all            // networks displayed, comment out this line:            //Serial.println("Not security");            //Mode Sleep for ESP8266 Version 12 or model with pin16 avaible            //Necesary jump RST and GPIO16                        sleep_now(); // Function Sleep 30 seconds        }    }  }
}
//Mode Sleep for ESP8266 Version 12 or model with pin16 avaible
void sleep_now(){   Serial.print(F("Sleeping..."));  // deepSleep time is defined in microseconds. Multiply  // seconds by 1e6   ESP.deepSleep(sleepTimeS * 1000000);}</p>

Puedes encontrar mas información en el repositorio del proyecto

https://github.com/sabas1080/OpenWiFiDetectorESP82...

Step 4: Run an Open WiFi Detector With ESP8266

Picture of Run an Open WiFi Detector With ESP8266

English/Español

Una vez cargado el sketch en el ESP8266 el led va parpadear cuando encuentre una red inalambrica abierta y entrara en modo sueño, ademas podemos ver en la depuracion via serial cada una de las WiFi encontradas.

Espero les haya gustado este instructable.

Gracias a mi amigo Wero por el apoyo llevado acabó para realizar este instructable

Versión en inglés gracias a Wero

Nos vemos en la proxima.

Once uploaded the sketch on the ESP8266, the LED will blink when it found's an open wireless net and it will go through sleep mode, also you can see by the serial monitor each one of the WiFi's found.

Thanks to my friend wero by his support to get done this instructable

English version by wero

Hope you liked this instructable
see you next time

Comments

cjspiteri (author)2017-07-17

Can this be used without connection to the terminal ?

Akin Yildiz (author)2016-04-14

hello sabas, thank you for sharing such a cool project..
.
maybe you can help me with what i'm trying to accomplish. i want to attach an esp12 and a cell phone battery (slim kind) to a cat collar. and set it as wifi network. in the mean time another esp12 searching for available networks, trying to find the cat collar one..
once the signal strength is down to a certain level, it could turn on an LED or email you alerting that the cat is too far away.
.
i'm not interested in gps locations or anything, just a simple signal creator and signal watcher setup. maybe the base esp can be a handheld device with a little screen, showing the numbers.
.
hope it makes sense, let me know what you think.

sabas1080 (author)Akin Yildiz2016-04-14

It can be done

In Arduino exist the function

WiFi.RSSI() for the signal strength

Akin Yildiz (author)sabas10802016-04-16

i think we should collaborate on this idea as i lack the coding skills :)
i have all the parts, i just need a simple code to test it out.. i have looked at the https://www.arduino.cc/en/Reference/WiFiRSSI for more info but still can't get around it..
here is what i have as hardware;

mary.wauck (author)2016-01-07

I used to live making useful gadgets. I have Essential-tremors which have made it impossible to make anything like this. You have no idea how lucky you are. Keep making them, & hopefully you'll find something to copyright & make $$. I used to make the walkers that you can sit on, 25 years ago&I should have had it copyrighted. Check this out if it's already copyrighted or not. FYI ;The wish site has a lot of electronic pieces, but it comes from China and its like play roulette, but a cpu, resistors, switches etcc. Should be ok to buy from them.

stannickel (author)2016-01-07

I like the dual language. I'm trying, very slowly, to learn Spanish myself. You should get a wider audience this way. I've got an ESP8266 with which I need to do something. This would be a fun one, it looks like.

BoxOfSnoo (author)2016-01-07

You can make this with the ESP8266-01, but you just won't get the deep sleep. I still was able to get mine (it shows SSID strengths on an OLED) into low power mode between scans which brings the draw down to .5mA for the ESP8266. I haven't tested the whole circuit yet for power draw though.

If you do use the -01 just put a power switch on it and it will still last a really long time.

ggallen103 (author)2016-01-06

Love the addition step to mslows needs!

davidex720 (author)2016-01-06

Nice project! The esp8266 module is also a programmable controller as I can see. where can you buy? (cheapest solution possibile) an arduino pro mini (or micro) with the esp8266 module alone would work the same?

Peder Ward (author)davidex7202016-01-06

eBay have them. You can also program just the ESP8266 as a standalone. Yes, you can use the Arduino Nano and ESP8266 and it would work the same.

davidex720 (author)Peder Ward2016-01-06

Thank you. I think I'll go with arduino nano+esp8266 solution ;)

davidex720 (author)davidex7202016-01-06

nano not micro, sorry

About This Instructable

20,825views

267favorites

License:

Bio: Fundador de The Inventor's House Hackerspace, Movimiento Maker y Hardware Libre, DIY, Workaholic
More by sabas1080:WiFi Jamming with ESP8266LoRaCatKitty Build IoT Applications With LoRaWAN in 3 StepsGetting Started With MagSpoof
Add instructable to: