2024 · Seminar paper C

IOT Devices and the Web

The goal of this project was to demonstrate the possibility of using the Web platform to interact with low power IOT devices. Project focused on taking a existing library, written by the profesor, and adding functionality to work with Bluetooth Low Energie and Serial connections like Bluetooth or USB.

View on GitHub

Built with

  • C++
  • ESP32
  • Bluetooth Low Energie
  • Serial COM
  • SolidJS

Working demo

Bluetooth Low Energie

To get started lets different between Bluetooth and Bluetooth Low Energie (BLE). Bluetooth (Legacy) is actually many standard in one. Each functionality like audio or video or text input are completely different profiles and technologyes. While BLE is one started that works in one way and is separat from Bluetooth Classic.

The BLE standard was made in 2010 and had existed since Bluetooth 4.0, but has only recently become widely used for more thing like audio. It is efficient and fast offering power use of 0.001W to 0.5W and 6 ms processing time, which is much better in comparison with Classic that uses 1 W and takes 100 ms to react.

Serial COM

For serial connections you could both use a Bluetooth Classic serial connection or connect directly with a USB cable. You could in theory use any other connections like I2C or other onboard standards.

The C++ library

The plan was to make reusable functions to interact with the hardware, so the same function can be register and bused bu Serial COM and BLE. For BLE this was achieved by directly passing the value of the changed Characteristic into the modular function. While for SerialCon had to provide the command name and then manually handle the rest of processing.

void Commands::init() {
    CommandService::init(20);
    StorageProvider::init(saveCallback, loadCallback);
    initDisplay();

    CommandService::add("config", configSerialCommand);
    CommandService::add(UUID_CONFIG, configSerialCommand, true);
    CommandService::add("wifi", wifiSerialComands);
    CommandService::add(UUID_WIFI_SSID, wifiBleSSIDcommand, true);
    CommandService::add(UUID_WIFI_PASSWORD, wifiBlePassCommand, true);
	//...

Example of serial mode

Send Command

Example commands:

  • help
  • wifi
  • display

ESP32 Serial Monitor

Jovica.me

Contact me:

hi@jovica.me