Definitions and prototypes for Profile Client interface. More...
Functions | |
uint16_t | ble_client_prf_add (const prf_client_info_t *p_client_prf_info, uint8_t *p_client_prf_id) |
Add a client profile by providing its detail information, including manager callback functions and GATT client callback functions. This API should be called in application initialization function. More... | |
uint16_t | ble_gattc_prf_services_browse (uint8_t prf_id, uint8_t conn_idx, const ble_uuid_t *p_srvc_uuid) |
Profile client Browse Specific Primary Service information on remote GATT server. More... | |
uint16_t | ble_gattc_prf_primary_services_discover (uint8_t prf_id, uint8_t conn_idx, const ble_uuid_t *p_srvc_uuid) |
Profile client Discover Primary Services on remote GATT server. More... | |
uint16_t | ble_gattc_prf_included_services_discover (uint8_t prf_id, uint8_t conn_idx, uint16_t start_hdl, uint16_t end_hdl) |
Profile client Discover Included Services on remote GATT server. More... | |
uint16_t | ble_gattc_prf_char_discover (uint8_t prf_id, uint8_t conn_idx, gattc_disc_char_t *p_disc_char) |
Profile client Discover Characteristics on remote GATT server. More... | |
uint16_t | ble_gattc_prf_char_desc_discover (uint8_t prf_id, uint8_t conn_idx, uint16_t start_hdl, uint16_t end_hdl) |
Profile client Discover Characteristics Descriptors on remote GATT server. More... | |
uint16_t | ble_gattc_prf_read (uint8_t prf_id, uint8_t conn_idx, uint16_t handle, uint16_t offset) |
Profile client Read Attribute from remote GATT server. More... | |
uint16_t | ble_gattc_prf_read_by_uuid (uint8_t prf_id, uint8_t conn_idx, gattc_read_by_uuid_t *p_read_by_uuid) |
Profile client Read Attribute by UUID. More... | |
uint16_t | ble_gattc_prf_read_multiple (uint8_t prf_id, uint8_t conn_idx, const gattc_read_multiple_t *p_param) |
Profile client Initiate a Read Multiple Characteristic Values procedure. More... | |
uint16_t | ble_gattc_prf_write (uint8_t prf_id, uint8_t conn_idx, gattc_write_attr_value_t *p_write_attr_value) |
Profile client Write (Long) Characteristic (Descriptor) Value. More... | |
uint16_t | ble_gattc_prf_write_prepare (uint8_t prf_id, uint8_t conn_idx, gattc_write_attr_value_t *p_write_attr_value) |
Profile client Prepare Long/Reliable Write to remote GATT server. More... | |
uint16_t | ble_gattc_prf_write_execute (uint8_t prf_id, uint8_t conn_idx, bool execute) |
Profile client Execute Reliable/Long Write to remote GATT server. More... | |
uint16_t | ble_gattc_prf_write_no_resp (uint8_t prf_id, uint8_t conn_idx, gattc_write_no_resp_t *p_write_no_resp) |
Profile client Write Attribute to remote GATT server (without response). More... | |
uint16_t | ble_gattc_prf_indicate_cfm (uint8_t prf_id, uint8_t conn_idx, uint16_t handle) |
Profile client Confirm Reception of Indication. More... | |
uint16_t | ble_gattc_prf_evt_handle_register (uint8_t prf_id, uint8_t conn_idx, gattc_prf_reg_peer_evt_t *env) |
Profile client Register Indication/Notification event. More... | |
uint16_t | ble_gattc_prf_evt_handle_unregister (uint8_t prf_id, uint8_t conn_idx, gattc_prf_reg_peer_evt_t *env) |
Profile client Unregister Indication/Notification event. More... | |
Definitions and prototypes for Profile Client interface.
uint16_t ble_client_prf_add | ( | const prf_client_info_t * | p_client_prf_info, |
uint8_t * | p_client_prf_id | ||
) |
Add a client profile by providing its detail information, including manager callback functions and GATT client callback functions. This API should be called in application initialization function.
[in] | p_client_prf_info | Pointer to the p_client_prf_info. See prf_client_info_t. |
[out] | p_client_prf_id | Pointer to the client profile id. |
SDK_SUCCESS | The profile info is recorded successfully, and the profile ENV will be initialized in profile initialization callback function. |
SDK_ERR_POINTER_NULL | The parameter p_client_prf_info or p_client_prf_id is NULL, or input parameters that prf_info points to are invalid. |
SDK_ERR_NO_RESOURCES | The profile number is up to the maximum number the system can support. |
uint16_t ble_gattc_prf_char_desc_discover | ( | uint8_t | prf_id, |
uint8_t | conn_idx, | ||
uint16_t | start_hdl, | ||
uint16_t | end_hdl | ||
) |
Profile client Discover Characteristics Descriptors on remote GATT server.
[in] | prf_id | Profile id. |
[in] | conn_idx | Current connection index. |
[in] | start_hdl | Start handle. |
[in] | end_hdl | End handle. |
SDK_SUCCESS | Successfully start the Descriptor Discovery procedure. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_INVALID_PARAM | Invalid parameter(s) supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gattc_prf_char_discover | ( | uint8_t | prf_id, |
uint8_t | conn_idx, | ||
gattc_disc_char_t * | p_disc_char | ||
) |
Profile client Discover Characteristics on remote GATT server.
[in] | prf_id | Profile id. |
[in] | conn_idx | Current connection index. |
[in] | p_disc_char | Pointer to discover by characteristic UUID info. |
SDK_SUCCESS | Successfully start the Characteristic Discovery procedure. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_POINTER_NULL | Invalid pointer supplied. |
SDK_ERR_INVALID_PARAM | Invalid parameter(s) supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gattc_prf_evt_handle_register | ( | uint8_t | prf_id, |
uint8_t | conn_idx, | ||
gattc_prf_reg_peer_evt_t * | env | ||
) |
Profile client Register Indication/Notification event.
[in] | prf_id | Profile id. |
[in] | conn_idx | Current connection index. |
[in] | env | Pointer to the profile registeration event info. |
SDK_SUCCESS | Successfully register Indication/Notification event. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_POINTER_NULL | Invalid pointer supplied. |
SDK_ERR_INVALID_PARAM | Invalid parameter(s) supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gattc_prf_evt_handle_unregister | ( | uint8_t | prf_id, |
uint8_t | conn_idx, | ||
gattc_prf_reg_peer_evt_t * | env | ||
) |
Profile client Unregister Indication/Notification event.
[in] | prf_id | Profile id. |
[in] | conn_idx | Current connection index. |
[in] | env | Pointer to the profile registeration event info. |
SDK_SUCCESS | Successfully unregister Indication/Notification event. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_POINTER_NULL | Invalid pointer supplied. |
SDK_ERR_INVALID_PARAM | Invalid parameter(s) supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gattc_prf_included_services_discover | ( | uint8_t | prf_id, |
uint8_t | conn_idx, | ||
uint16_t | start_hdl, | ||
uint16_t | end_hdl | ||
) |
Profile client Discover Included Services on remote GATT server.
[in] | prf_id | Profile id. |
[in] | conn_idx | Current connection index. |
[in] | start_hdl | Start handle. |
[in] | end_hdl | End handle. |
SDK_SUCCESS | Successfully start the Relationship Discovery procedure. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_INVALID_PARAM | Invalid parameter(s) supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gattc_prf_indicate_cfm | ( | uint8_t | prf_id, |
uint8_t | conn_idx, | ||
uint16_t | handle | ||
) |
Profile client Confirm Reception of Indication.
[in] | prf_id | Profile id. |
[in] | conn_idx | Current connection index. |
[in] | handle | Value handle. |
SDK_SUCCESS | Successfully send a Confirm Reception of Indication request. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_INVALID_PARAM | Invalid parameter(s) supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gattc_prf_primary_services_discover | ( | uint8_t | prf_id, |
uint8_t | conn_idx, | ||
const ble_uuid_t * | p_srvc_uuid | ||
) |
Profile client Discover Primary Services on remote GATT server.
[in] | prf_id | Profile id. |
[in] | conn_idx | Current connection index. |
[in] | p_srvc_uuid | Pointer to Service UUID. |
SDK_SUCCESS | Successfully start the Primary Service Discovery procedure. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_POINTER_NULL | Invalid pointer supplied. |
SDK_ERR_INVALID_PARAM | Invalid parameter(s) supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gattc_prf_read | ( | uint8_t | prf_id, |
uint8_t | conn_idx, | ||
uint16_t | handle, | ||
uint16_t | offset | ||
) |
Profile client Read Attribute from remote GATT server.
[in] | prf_id | Profile id. |
[in] | conn_idx | Current connection index. |
[in] | handle | Attribute handle. |
[in] | offset | Value offset to start with. |
SDK_SUCCESS | Successfully start the Read (Long) procedure. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_INVALID_PARAM | Invalid parameter(s) supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gattc_prf_read_by_uuid | ( | uint8_t | prf_id, |
uint8_t | conn_idx, | ||
gattc_read_by_uuid_t * | p_read_by_uuid | ||
) |
Profile client Read Attribute by UUID.
[in] | prf_id | Profile id. |
[in] | conn_idx | Current connection index. |
[in] | p_read_by_uuid | Pointer to Read by Characteristic UUID info. |
SDK_SUCCESS | Successfully start the Read Using Characteristic UUID procedure. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_POINTER_NULL | Invalid pointer supplied. |
SDK_ERR_INVALID_PARAM | Invalid parameter(s) supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gattc_prf_read_multiple | ( | uint8_t | prf_id, |
uint8_t | conn_idx, | ||
const gattc_read_multiple_t * | p_param | ||
) |
Profile client Initiate a Read Multiple Characteristic Values procedure.
[in] | prf_id | Profile id. |
[in] | conn_idx | Current connection index. |
[in] | p_param | Pointer to the parameters of the value. |
SDK_SUCCESS | Successfully start the Read Multiple Characteristic Values procedure. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_POINTER_NULL | Invalid pointer supplied. |
SDK_ERR_INVALID_PARAM | Invalid parameter(s) supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gattc_prf_services_browse | ( | uint8_t | prf_id, |
uint8_t | conn_idx, | ||
const ble_uuid_t * | p_srvc_uuid | ||
) |
Profile client Browse Specific Primary Service information on remote GATT server.
[in] | prf_id | Profile id. |
[in] | conn_idx | Current connection index. |
[in] | p_srvc_uuid | Pointer to Service UUID. |
SDK_SUCCESS | Successfully start the Browse Service(s) procedure. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_POINTER_NULL | Invalid pointer supplied. |
SDK_ERR_INVALID_PARAM | Invalid parameter(s) supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gattc_prf_write | ( | uint8_t | prf_id, |
uint8_t | conn_idx, | ||
gattc_write_attr_value_t * | p_write_attr_value | ||
) |
Profile client Write (Long) Characteristic (Descriptor) Value.
[in] | prf_id | Profile id. |
[in] | conn_idx | Current connection index. |
[in] | p_write_attr_value | Pointer to the write attribue value info. |
SDK_SUCCESS | Successfully start the Write procedure. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_POINTER_NULL | Invalid pointer supplied. |
SDK_ERR_INVALID_PARAM | Invalid parameter(s) supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gattc_prf_write_execute | ( | uint8_t | prf_id, |
uint8_t | conn_idx, | ||
bool | execute | ||
) |
Profile client Execute Reliable/Long Write to remote GATT server.
[in] | prf_id | Profile id. |
[in] | conn_idx | Current connection index. |
[in] | execute | True if data shall be written; False if cancel all prepared writes. |
SDK_SUCCESS | Successfully send an Execute Write request. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_INVALID_PARAM | Invalid parameter(s) supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gattc_prf_write_no_resp | ( | uint8_t | prf_id, |
uint8_t | conn_idx, | ||
gattc_write_no_resp_t * | p_write_no_resp | ||
) |
Profile client Write Attribute to remote GATT server (without response).
[in] | prf_id | Profile id. |
[in] | conn_idx | Current connection index. |
[in] | p_write_no_resp | Pointer to the write without response info. |
SDK_SUCCESS | Successfully: start the (Signed) Write Without Response procedure. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_POINTER_NULL | Invalid pointer supplied. |
SDK_ERR_INVALID_PARAM | Invalid parameter(s) supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_gattc_prf_write_prepare | ( | uint8_t | prf_id, |
uint8_t | conn_idx, | ||
gattc_write_attr_value_t * | p_write_attr_value | ||
) |
Profile client Prepare Long/Reliable Write to remote GATT server.
[in] | prf_id | Profile id. |
[in] | conn_idx | Current connection index. |
[in] | p_write_attr_value | Pointer to the write attribue value info. |
SDK_SUCCESS | Successfully send prepare write request. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_POINTER_NULL | Invalid pointer supplied. |
SDK_ERR_INVALID_PARAM | Invalid parameter(s) supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |