Exported Functions
- group Prov_Client_Exported_Functions
-
Functions
-
T_CLIENT_ID prov_client_add(P_FUN_GENERAL_APP_CB app_cb)
-
Register the provision client to the stack.
Registers the provisioning client with a callback function to handle events.
- Parameters:
-
app_cb – [in] The application callback function to handle client events.
- Return values:
-
client_id – The unique identifier for the provisioning client instance.
- Returns:
-
The client ID assigned to the provision client.
-
void prov_client_deinit(void)
-
Deinitialize the provision client.
Cleans up resources associated with the provision client.
-
bool prov_client_handle_set(uint8_t conn_id, prov_handle_type_t type, uint16_t value)
-
Set the handle of the client based on the connection ID.
Associate a handle value with its type for a given connection ID.
- Parameters:
conn_id – [in] The ID of the connection.
type – [in] The type of handle being set.
value – [in] The value of the handle to set.
- Return values:
true – if the handle was set successfully.
false – if the handle could not be set, possibly due to invalid type or connection ID.
- Returns:
-
The operation result as a boolean.
-
uint16_t prov_client_handle_get(uint8_t conn_id, prov_handle_type_t type)
-
Get the handle value of the client based on the connection ID.
Retrieve the value of a handle based on its type for a given connection ID.
- Parameters:
conn_id – [in] The ID of the connection.
type – [in] The type of handle to retrieve.
- Return values:
-
handle – The value of the handle if found.
- Returns:
-
The handle value of the specified type.
-
bool prov_client_start_discovery(uint8_t conn_id)
-
Start the service discovery process.
Initiates the discovery of various characteristics and CCCDs related to the provisioning service.
- Parameters:
-
conn_id – [in] The ID of the connection.
- Return values:
true – if the discovery was initiated successfully.
false – if the discovery could not be started, possibly due to connection issues.
- Returns:
-
The operation result as a boolean.
-
bool prov_client_read_by_handle(uint8_t conn_id, prov_read_type_t type)
-
Read the server data by handle.
Sends a read request to the server to obtain data based on a specified handle type.
- Parameters:
conn_id – [in] The ID of the connection.
type – [in] The type of data to read.
- Return values:
true – if the read request was sent successfully.
false – if the read could not be initiated, possibly due to invalid handle type.
- Returns:
-
The operation result as a boolean.
-
bool prov_client_read_by_uuid(uint8_t conn_id, prov_read_type_t type)
-
Read the server data by UUID.
Sends a read request to the server to retrieve data based on a specific UUID.
- Parameters:
conn_id – [in] The ID of the connection.
type – [in] The type of read operation to perform, relating to the UUID.
- Return values:
true – if the read request was sent successfully.
false – if the read could not be initiated, potentially due to issues with UUID presence.
- Returns:
-
The operation result as a boolean.
-
bool prov_client_data_out_cccd_set(uint8_t conn_id, bool command)
-
Write the CCCD of a characteristic to enable or disable notifications.
Modifies the CCCD of a characteristic to control whether the client receives notifications.
- Parameters:
conn_id – [in] The ID of the connection.
command – [in] The CCCD value indicating whether to Enable (true - notifications are enabled) or Disable (false - notifications are disabled).
- Return values:
true – if the CCCD write was successful.
false – if the CCCD could not be written, possibly due to connection or characteristic issues.
- Returns:
-
The operation result as a boolean.
-
bool prov_client_data_in_write(uint8_t conn_id, uint8_t *pdata, uint16_t length)
-
Write to a characteristic’s data input.
Sends data to the server by writing to a specified characteristic.
- Parameters:
conn_id – [in] The ID of the connection.
pdata – [in] Pointer to the data to write.
length – [in] The length of data being written.
- Return values:
true – if the data was written successfully.
false – if the data could not be written, possibly due to data length or connection issues.
- Returns:
-
The operation result as a boolean.
-
T_CLIENT_ID prov_client_add(P_FUN_GENERAL_APP_CB app_cb)