@@ -278,9 +278,9 @@ bool NimBLECharacteristic::sendValue(const uint8_t* value, size_t length, bool i
278278
279279 // Null buffer will read the value from the characteristic
280280 if (isNotification) {
281- rc = ble_gattc_notify_custom (connHandle, m_handle, om);
281+ rc = ble_gatts_notify_custom (connHandle, m_handle, om);
282282 } else {
283- rc = ble_gattc_indicate_custom (connHandle, m_handle, om);
283+ rc = ble_gatts_indicate_custom (connHandle, m_handle, om);
284284 }
285285
286286 goto done;
@@ -296,17 +296,17 @@ bool NimBLECharacteristic::sendValue(const uint8_t* value, size_t length, bool i
296296 }
297297
298298 if (isNotification) {
299- rc = ble_gattc_notify_custom (ch, m_handle, om);
299+ rc = ble_gatts_notify_custom (ch, m_handle, om);
300300 } else {
301- rc = ble_gattc_indicate_custom (ch, m_handle, om);
301+ rc = ble_gatts_indicate_custom (ch, m_handle, om);
302302 }
303303 }
304304 } else if (connHandle != BLE_HS_CONN_HANDLE_NONE) {
305305 // Null buffer will read the value from the characteristic
306306 if (isNotification) {
307- rc = ble_gattc_notify_custom (connHandle, m_handle, nullptr );
307+ rc = ble_gatts_notify_custom (connHandle, m_handle, nullptr );
308308 } else {
309- rc = ble_gattc_indicate_custom (connHandle, m_handle, nullptr );
309+ rc = ble_gatts_indicate_custom (connHandle, m_handle, nullptr );
310310 }
311311 } else { // Notify or indicate to all connected peers the characteristic value
312312 ble_gatts_chr_updated (m_handle);
0 commit comments