Electronics

Electronics

Τετάρτη, 26 Απριλίου 2017

Wi-Fi Jammer with ESP8266-01

The ESP8266 is a low-cost WiFi chip which can be used with other Electronic Platforms . You can relate to it as the WiFi which is present in your Laptops , Smartphones , Tablets , etc . In this project which mostly programming than electronics we will make a WiFi Jammer. What is a WiFi Jammer? Imagine that you are in a bar with your friends and nobody talks to each other since they are looking at their phone, now here is where the wifi jammer comes into game, you activate it with 2 easy steps and this little chip sends some conflict signals to the local WiFi provider which confuses it. This project is based on Alexan24's project from instructables, but some more projects had to be added for the final version.
WARNING : WORKS ONLY WITH 3.3V AND NOT 5V . ESP8266 WILL PROBABLY FRY AT 5V .
ENSURE TX ,RX , Vcc ARE AT 3.3V BEFORE CONNECTION .





TX of  Arduino connects at Tx of ESP
Rx of Arduino Connects at Rx of ESP with a voltage divider which makes RX to receive 3.3V
Vcc and CH_Pd connects at 3.3V!!!!! 5V Will fry it!
Gnd connects at Gnd of Arduino and Source
GPIO0 connects at Gnd when we upload the code
RST connects momently at 3.3V when we upload the code 
(warning: espcomm_sync failed
error: espcomm_open failed)
These errors occured because I didn't ground the reset pin even if I was powering ESP from a different source than Arduino. My proposal it to power ESP with an external supply with the use of an AMS1117 at 3.3v .






Setting up the Environment .
Software Arduino Environment v 1.6.4 or greater
Installing with Boards Manager Starting with 1.6.4, Arduino allows installation of third-party platform packages using Boards Manager.
It have packages available for Windows, Mac OS, and Linux (32 and 64 bit).
Install Arduino 1.6.4 (or greater) from the Arduino website ( I have 1.6.11) . Start Arduino and open Preferences window.
Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas.

Go to Tools > Board > Boards Manager
Type in esp8266
Select version 2.0.0 and click on Install (must be version 2.0.0!)
Go to File > Preferences
Open the folder path under More preferences can be edited directly in the file
Go to packages > esp8266 > hardware > esp8266 > 2.0.0 > tools > sdk > include
Open user_interface.h with a text editor
Scroll down and before #endif add following lines:
typedef void (*freedom_outside_cb_t)(uint8 status);
int wifi_register_send_pkt_freedom_cb(freedom_outside_cb_t cb);
void wifi_unregister_send_pkt_freedom_cb(void);
int wifi_send_pkt_freedom(uint8 *buf, int len, bool sys_seq);
don't forget to save!
Go to the SDK_fix folder of this project
Copy ESP8266Wi-Fi.cpp and ESP8266Wi-Fi.h
Paste these files here packages > esp8266 > hardware > esp8266 > 2.0.0 > libraries > ESP8266WiFi > src
Open esp8266_deauther > esp8266_deauther.ino in Arduino
Select your ESP8266 board at Tools > Board and the right port at Tools > Port
If no port shows up you may have to reinstall the drivers.
Depending on your board you may have to adjust the Tools > Board > Flash Frequency and the Tools > Board > Flash Size. In my case i had to use a 80MHz Flash Frequency, and a 4M (1M SPIFFS) Flash Size
Upload!
Note: If you use a 512kb version of the ESP8266, you need to comment out a part of the mac vendor list in data.h.
Your ESP8266 Deauther is now ready!

How to use it

First start your ESP8266 by giving it power.
You can use your smartphone if you have a USB OTG cable.
Scan for Wi-Fi networks and connect to pwned. The password is deauther.
Once connected, you can open up your browser and go to 192.168.4.1.
You can now scan for networks.





 more infos you can find from the author of this project at : https://github.com/spacehuhn/esp8266_deauther#how-to-use-it