Blecker

Bluetooth low energy (BLE) tracker for ESP32

Internet of Things (IoT)C++MIT

Abstract

Blecker is an open-source Internet of Things (IoT) project. Bluetooth low energy (BLE) tracker for ESP32. This software is written for ESP32 boards to track BLE devices. It can be used for your smart home, scan BLE devices and send their presence to your smart home hub over MQTT. It is built using C++, ESP32, MQTT, Arduino. The complete source code is publicly available on GitHub under the MIT License, making it a useful reference for students building an Internet of Things (IoT) mini project or final-year project.

1. Introduction

This software is written for ESP32 boards to track BLE devices. It can be used for your smart home, scan BLE devices and send their presence to your smart home hub over MQTT. From version 1.04 webhook call is also possible. This is a ready-to-use program, you don't need to modify the code (add your wifi, mqtt credentials whatever). Settings can be done on a nice web interface.

This is a very simple tracker software which creates an MQTT topic for each scanned device mac address (without ":" ) under the base topic and sends the availability as payload. I personally use it for presence detection of family members. Every family member has a BLE device on her/his keyring and smart home can do automations depends on the members' availability. For example: turn on the alarm system if nobody at home.

The scan is running in every 2 seconds for 5 seconds and collects the devices into a list. In case of an available device, it sends an MQTT message as available. If the device is gone or can't be scanned after 120 seconds then a "not available" message will be sent out.

2. Objective

Bluetooth low energy (BLE) tracker for ESP32

This project demonstrates how C++, ESP32, MQTT can be applied to a real-world Internet of Things (IoT) problem.

4. Technology Stack

C++ESP32MQTTArduino

5. System Requirements

General requirements for this technology stack — check the README for exact versions.

  • Arduino IDE / PlatformIO or a C++ compiler (g++)
  • Target board (e.g. Arduino, ESP32) where applicable
  • Git (to clone the repository)

6. Installation & Setup

git clone https://github.com/redakker/blecker.git
cd blecker
  1. ESP32-S (dev board)
  2. ESP32-S2 (dev board)
  3. espcam32 (Tested by @ozett)
  4. ESP32-D1-MINI
  5. AZDelivery ESP-32 Dev Kit C V4 (Tested by @maarten682)
  6. All ESP32 (BLE capable) board
  7. Nut Bluetooth Beacon https://www.amazon.com/Nut-F6-world-Smallest-Trackers/dp/B01B0WRC4I/
  8. Long Range (500m) Bluetooth Beacon https://www.amazon.com/programmable-Battery-Bluetooth-eddystone-Technology/dp/B07PT9758D

Full setup instructions are in the project README.

7. Future Enhancements

Suggested extensions you can add to make this your own project.

  • Add a mobile dashboard using Blynk or Firebase
  • Store readings in a cloud database for history charts
  • Add alerts via SMS / Telegram when thresholds are crossed

8. Viva / Review Questions

Common questions examiners ask for projects in this domain.

  1. Which microcontroller / board and sensors are used and why?
  2. How does the device send data (Wi-Fi, MQTT, HTTP, Bluetooth)?
  3. Where is the sensor data stored and visualised?
  4. How is power consumption managed?
  5. How would you secure the device and its communication?

9. Source Code & License

This project is developed by redakker and published on GitHub under the MIT License. Please follow the license terms and credit the original author when you use or modify this code.

Want to build this as your internship project?

Work on an Internet of Things (IoT) project like this with mentor guidance, weekly reviews and an internship certificate from Training Trains, Erode — online or offline.

Apply for Internet of Things (IoT) Internship