I am working on an ESP32 project that involves BLE communication with a Unity application. The ESP32 reads data from sensors and notifies the connected BLE client (Unity app) of the sensor values. Most of the characteristics are working fine, but I am facing an issue with one specific characteristic (Ch_data1) that fails to notify the client.Project Details:Microcontroller: ESP32BLE Client: Unity applicationBLE Server: ESP32Sensors: DHT11, DHT22 for temperature and humidityAdditional Data: Voltage readingProgramming Language: C++ for ESP32, C# for UnityProblem Description:
The Ch_data1 characteristic, which contains voltage, firmware version, and other relevant data, is not notifying the connected BLE client (Unity application). Other characteristics are successfully notifying the client, but Ch_data1 fails to do so despite similar setup and code.What I've Tried:
Ensured MTU is set to 512Verified other characteristics notify correctlyChecked data formatting and lengthAdded delays between notificationsTested with BLE scanner apps to rule out Unity app issuesRequirements:
Identify the root cause of why Ch_data1 is not notifying the BLE client.Provide a solution or workaround to enable successful notification for Ch_data1.Ensure the solution is stable and doesn't interfere with other BLE functionalities.Additional Information:
I'm using the NimBLE library for BLE on the ESP32.Unity logs indicate it subscribes to the characteristic, but no data is received.Other characteristics (e.g., temperature, humidity) notify correctly without issues.Deliverables:
Debugged and fixed code for the ESP32.Detailed explanation of the issue and the steps taken to resolve it.(Optional) Any recommendations for optimizing BLE communication in my setup.
Success story sharing