2026-02-23 9:26 AM - last edited on 2026-02-27 12:54 AM by Imen.D
I have established BLE advertisement and connection is established successfully between ST BLE toolbox and the stm32wb55 based board.
I am unable to read the chateristic value from the st ble tool box.
My code is
in custom_app.c file
I2C_HandleTypeDef hi2c1;
int sizecharwrite;
uint8_t my_value =5;
float adc_voltage_ble = ADS1115_readSingleEnded_AIN0(&hi2c1);
uint8_t pPayload;
sizecharwrite=snprintf( ble_voltage,sizeof(ble_voltage),"%0.2f", adc_voltage_ble );
if (sizecharwrite < 0 || sizecharwrite >= sizeof(ble_voltage)) {
// Error or truncation
return;
}
memcpy(pPayload,&ble_voltage, sizeof(ble_voltage));
aci_gatt_update_char_value(CustomChemdetectHdle,
CustomCharwriteHdle,
0, /* charValOffset */
SizeCharwrite, /* charValueLen */
(uint8_t ) pPayload);Edited to apply source code formatting - please see How to insert source code for future reference.
2026-03-30 1:15 AM
Hello @sound,
Ensure the characteristic is configured with the 'Read' property and correct permissions.
You can follow the guidelines in the ST wiki articles:
I advise you to monitor the debug Output logs for errors during characteristic read requests.