gatt_client_write_client_characteristic_configuration() function
Writes the client characteristic configuration of the specified characteristic. It is used to subscribe for notifications or indications of the characteristic value. For notifications or indications specify: GATT_CLIENT_CHARACTERISTICS_CONFIGURATION_NOTIFICATION resp. GATT_CLIENT_CHARACTERISTICS_CONFIGURATION_INDICATION as configuration value. The GATT_EVENT_QUERY_COMPLETE event marks the end of write. The write is successfully performed if the event's att_status field is set to ATT_ERROR_SUCCESS (see bluetooth.h for ATT_ERROR codes).
status ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER if no HCI connection for con_handle is found BTSTACK_MEMORY_ALLOC_FAILED if no GATT client for con_handle could be allocated GATT_CLIENT_IN_WRONG_STATE if GATT client is not ready GATT_CLIENT_CHARACTERISTIC_NOTIFICATION_NOT_SUPPORTED if configuring notification, but characteristic has no notification property set GATT_CLIENT_CHARACTERISTIC_INDICATION_NOT_SUPPORTED if configuring indication, but characteristic has no indication property set ERROR_CODE_UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE if configuration is invalid ERROR_CODE_SUCCESS if query is successfully registered
Examples
gatt_client_write_client_characteristic_configuration() is referenced by 1 libraries and example projects: