If you haven’t done so already, go buy yourself an ESP8266-based board. It is a powerful little microcontroller. Something like Arduino but with WiFi.
What hardware to get
- ESP8266 board. Various versions are available:
- tiny 8-pin ones: esp8266-wi-fi-wireless-serial-port-data-transceiver-module-blue-black-369015
- bigger ones with more pins available: xghf-flash-4m-esp8266-serial-port-wi-fi-module-blue-376538
- USB-UART module to communicate with the ESP
- anything will do: cp2102-usb-to-ttl-stc-promini-download-module-for-arduino-265730
- Powerful 3.3V power source (providing about 1 or 2 A).
- I used a USB power adapter (5V) with a step-down voltage regulator.
What software to get
- ESP open SDK
- Contains all the tools needed for compiling your own ESP firmware.
- NodeMCU firmware
- This converts the ESP to a LUA-powered computer.
- Very helpful serial terminal with direct ESP8266 and NodeMCU support
What to do with it all
- Find the pinout of your board. Get the connections ready (USB-UART + 3.3V power source + ESP8266)
- 3.3V to VCC, GND to GND
- RX to TX and TX to RX (ESP–UART).
- CH_PD to VCC
- Leave Reset floating, connect to GND to reset the chip when needed.
- Pull the GPIO0 low for flashing.
- If you just want to get the ESP fired up, use the esptool.py and upload the precompiled NodeMCU bin images.
- If you want to play around some more, get the SDK and NodeMCU source code. Compile the former and then the latter. Flash our own bin images.
- Remove GPIO0 connection to leave the flashing mode.
- Open the ESPlorer and issue some commands to the chip!
- Dejvino’s NodeMCU firmware
- Forked from the original NodeMCU firmware repository. Contains a new Sniffer module — packet sniffing functions exposed to the LUA interpreter. This allows WiFi packet sniffing using the ESP8266.
- NodeMCU API
- List of provided LUA functions in the NodeMCU firmware.
- LUA language reference
- Beware that not everything is supported in the ESP version of LUA.