Skip to content

Commit 235b46f

Browse files
authored
Fixed: Wrong function call
1 parent 9ae615a commit 235b46f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

main/db_ble.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,12 @@ static const struct ble_gatt_svc_def new_ble_svc_gatt_defs[] = {
227227
if (conn_handle_subs[i]) {
228228

229229
/* Write to the characteristics */
230-
int rc = ble_gatts_write(i,ble_spp_svc_gatt_notify_val_handle,data,data_len);
230+
int rc = ble_gattc_write_flat(i,ble_spp_svc_gatt_notify_val_handle,
231+
data, /* Data pointer */
232+
data_len, /* Data length */
233+
NULL, /* Callback function */
234+
NULL /* Callback function arguments */
235+
);
231236
if (rc != 0) {
232237
ESP_LOGE(TAG, "Failed to write characteristic value (rc = %d)", rc);
233238
return rc;

0 commit comments

Comments
 (0)