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)
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)
attachment 0
1 Reply
Joseph Ogbonna
Joseph Ogbonna2mo ago
To resolve the issues with your ESP32 health monitoring system: 1. Sensor Initialization: - Ensure the MAX30100 sensor is correctly connected and powered. - Verify the I2C configuration and driver support in Zephyr. 2. Bluetooth Issues: - Check and configure Bluetooth settings in Zephyr, including stack and profiles. - Ensure the advertising parameters are correct and that the system has enough resources allocated. try this steps if it persist let me know
Want results from more Discord servers?
Add your server