Skip to main content

ble_gattc_register_for_notification

Function ble_gattc_register_for_notification 

Source
pub unsafe extern "C" fn ble_gattc_register_for_notification(
    conn_handle: u16,
    char_val_handle: u16,
) -> i32
Expand description

Registers for notifications on a specified characteristic by writing to its Client Characteristic Configuration Descriptor (CCCD).

This function initiates discovery of all descriptors associated with the given characteristic value handle (char_val_handle). If a CCCD is found, it writes the appropriate value to enable notifications.

@param conn_handle The handle of the connection with the peer device. @param char_val_handle The value handle of the characteristic to register for notification.

@return 0 on success, non-zero error code on failure.