Author Archives: R-B

Animated IoT clock that can’t be trusted

An animated IoT clock shared by Tobozo Tagada does not use any RTC module orconnect to a NTP server to retrieve the time. It rather scans the open WiFi access points in its surrounding and extract the date/time from the “Date” HTTP header, if sent out by some. Trust this clock’s accuracy at your own risk. It uses WeMOS ESP8266 board and an OLED screen to display the time along with a pong animation in the background to “cut on the boringness of the clock”, as he said.

Expecting unknown networks to provide a HTTP header value and relying on it to estimate time is like counting on other people’s wealth to survive, hence the Hobo name.

The exclusive use of open access points removes the hassle of hardcoding SSID/password into the sketch but also compensates its lack of auth plus the fact that the optional NTP connexion attempt will always fail, unless the AP acts as.

The Pong animation with a bouncing rotating cube is there to cut on the boringness of the clock but also to demonstrate how this tiny OLED can animate fast (nearly 60fps).

Since it has trust issues, don’t trust this clock more than you would trust a stranger’s watch! The available space and power consumption won’t let it run more than a couple of hours on the LiPo anyway.

Animated IoT clock

Animated IoT clock

WiFi deauthentication attacker using ESP8266

The IEEE 802.11 (Wi-Fi) protocol contains a so-called deauthentication frame that are used as management frames to disconnect the links between stations and access points. Because management frames are often unencrypted, it is fairly easy to perform deauthentication attacks using a WiFi device by spoofing the MAC address of the access point. Alternatively, it can also be done by sending deauthentication frames to the access point with a clients’ MAC address as a destination. Spacehuhn has shared his ESP8266 based implementation of a deauthentication attacker on Github. It can disconnect any client from a network by repeatedly sending fake deauthentication frames. The attacker does not even need to be connected to the same network.

Deauthentication attacker using ESP8266

Deauthentication attacker using ESP8266

Basically it’s a device which performs a deauth attack. You select the clients you want to disconnect from their network and start the attack. As long as the attack is running, the selected devices are not able to connect to the network.

ESP8266 weather station with e-paper display

A very cool-looking weather station using the ESP8266 WiFi module chip and a high resolution 7.4″ a-Si TFT active matrix Electronic Paper Display (EPD) module from Pervasive Displays shared by . The weather data are gathered from OpenWeatherMap service.

ESP8266 weather station with e-Paper display

ESP8266 weather station with e-Paper display

Most of the time the device stays in deep sleep mode consuming only 18 µA. While updating the weather power consumption varies from 80 to 150 mA. Update operation takes a few seconds, depending on WiFi router, DHCP server and internet connection speed. With 30 minute update interval 3000 mAh battery should last for a few months on one charge.

PC stat monitor using ESP8266/Arduino

There are tons of PC applications you can install on your PC for monitoring essential stats for CPU, disk, memory, system temperature, etc. Here is a standalone hardware project that would receive the PC stat via USB port and display it on a dedicated 2.8″ TFT display. The project uses an ESP8266 hardware and a touchscreen-enabled ILI9341-based color LCD. On the PC side, a Python script gathers PC stats and send the data to the ESP8266 via USB-UART interface. With the built in WiFi capability of ESP8266, the PC stat can also be broadcasted over WiFi to a remote cloud server. The firmware is developed using Arduino IDE, so the standalone LCD version of this project would still be compatible with Arduino boards.

ESP8266 PC stat monitor

ESP8266 PC stat monitor

 

Tutorial 6: ESP8266 and BME280 make a local/remote weather station

In previous tutorials, we explored how to connect an SSD1306-based I2C OLED to ESP8266 for displaying texts and graphics, as well as to setup an ESP8266-based web server. This tutorial combines the knowledge gained before to make a standalone weather station that will display the local weather data on an OLED screen. In addition, the weather station will also run a web server that would allow a remote computer to access the weather data via web browser.

dsds

BME280 weather station

Hardware Setup

This project uses the EasyESP-1 board and the following hardware devices.

BME280 sensor module: BME280 is a fully integrated environmental unit from Bosch that combines sensors for pressure, humidity, and temperature in a tiny 8-pin metal-lid LGA package of size 2.5 x 2.5 x 0.93 mm³. Because of its compact size, ease of use (BME280 supports standard I2C and SPI interfaces), and availability of supporting open-source Arduino libraries, BME280 is very popular among weather enthusiasts. You can buy a BME280 sensor module in Grove form factor from Elecrow.

SSD1306 I2C OLED module: As described in Tutorial 3, the SSD1306 OLED controller supports both SPI and I2C interfaces. We will use an I2C version with a 0.96″ diagonal length and 128×64 monochrome pixels OLED Grove board. Despite its small size, the readability is pretty good due to its high contrast.

For this experiment, the 4-pin Grove connectors of BME280 and OLED modules are directly plugged into the two I2C ports on the EasyESP-1 board, as shown below. This connects the the SDA and SCK pins of BME280 and OLED modules to D2 and D1 pins of EasyESP-1, respectively.

Complete project setup

Complete project setup

BME280 and OLED connect to I2C Grove ports

BME280 and OLED connections to I2C Grove ports

Software

The ESP8266 firmware for this project is developed using Arduino IDE. You need to install the ESP8266 core to enable the Arduino IDE for ESP8266 programming. Instructions can be found here. You will also need the following Adafruit libraries for reading data from the BME280 sensor. The I2C address of BME280 sensor on Elecrow’s sensor board is 0x77, which is also the default address set in the Adafruit’s library.

Adafruit unified sensor library

Adafruit BME280 library

Besides, you also need Daniel Eichhorn‘s OLED library for ESP8266. Read Tutorial 3 for more details on this.

The complete code for this weather station project can be downloaded from the following link:

Download BME280 Weather Station Code

The code for a very basic HTML webpage with the BME280 sensor output and auto refresh meta tag is included in the code. Note that you need to edit the SSID name and password in the program to match with your WiFi network before uploading it to the EasyESP-1 board.

Output

After uploading the program to EasyESP-1, when the ESP8266 restarts it prints out on the serial monitor the local IP address that was allocated to it in the WiFi network. The BME280 sensor readings for temperature, pressure and humidity are displayed on the OLED screen. In order to access these data over the web server, you need to open a web browser on any computer, tablet, or smartphone connected to the same WiFi network and type in the ESP8266 IP address in the URL field and hit enter. On receiving a client request, the ESP8266 serves a webpage containing the BME sensor readings, as shown below.

BME280 local weather station

BME280 local weather station

Web

Weather data displayed on client’s browser

Buy EasyESP-1 board

Buy BME280 sensor module 

Buy SSD1306 I2C OLED module

More tutorials

EASYESP-1: A RAPID PROTOTYPING AND DEVELOPMENT BOARD FOR ESP8266
TUTORIAL 1: SETTING UP THE ARDUINO IDE FOR EASYESP-1
TUTORIAL 2: EASYESP-1 “HELLO WORLD” EXAMPLE
TUTORIAL 3: CONNECTING AN OLED DISPLAY TO ESP8266
TUTORIAL 4: WORKING WITH ESP8266 WIFI SCAN CLASS
TUTORIAL 5: SETTING UP AN ESP8266 WEB SERVER
« Older Entries Recent Entries »