Issues with Bluetooth and Sensor Initialization on ESP32 using Zephyr RTOS

@Middleware & OS I'm developing a health monitoring system using an ESP32 microcontroller running Zephyr RTOS. The system uses Bluetooth to transmit data from sensors to a mobile application. I'm using a MAX30100 pulse oximeter and heart-rate sensor connected to the ESP32. My goal is to read the sensor data and send it via Bluetooth.


I've written the code to initialize the sensors and set up Bluetooth communication, but I'm encountering errors. Specifically, the Bluetooth connection fails to establish, and I'm not receiving any data on my mobile application. Here are the steps I've tried and the errors encountered.

Error prompt
 Compiling Zephyr application...
[100%] Building C object CMakeFiles/app.dir/src/main.c.obj
[100%] Linking C executable zephyr/zephyr.elf
[100%] Built target app

Running Zephyr application...
***** Booting Zephyr OS v2.5.0-rc1 *****
Failed to find MAX30100 sensor

[Alternatively, if sensor initialization is successful]
***** Booting Zephyr OS v2.5.0-rc1 *****
Bluetooth init failed (err -5)

[Alternatively, if Bluetooth initialization is successful]
***** Booting Zephyr OS v2.5.0-rc1 *****
Bluetooth initialized
Advertising failed to start (err -5)
file0.jpg
Was this page helpful?