BT Mesh Provisioner Application Component#
BT Mesh Provisioner Application component provides application-level functionality for provisioning devices into a Bluetooth Mesh network.
Enumerations#
Current provisioner mode, either single run command line mode or ui, menu mode.
Functions#
Macros#
Optstring argument for getopt.
NCP node address.
Array terminate element length.
Optstring argument for getopt.
Usage info.
Enumeration Documentation#
prov_mode_t#
prov_mode_t
Current provisioner mode, either single run command line mode or ui, menu mode.
| Enumerator | |
|---|---|
| PROV_CMD_LINE_MODE | |
| PROV_UI_MODE | |
Function Documentation#
btmesh_app_prov_init#
sl_status_t btmesh_app_prov_init (int opt, char * optarg)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| int | [in] | opt | Command option |
| char * | [in] | optarg | Command argument |
Provisioner Command Line Application Init
btmesh_app_prov_process_action#
void btmesh_app_prov_process_action (void )
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Provisioner Application Process Action
btmesh_app_prov_on_event#
void btmesh_app_prov_on_event (sl_btmesh_msg_t * evt)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_btmesh_msg_t * | [in] | evt | Event coming from the Bluetooth Mesh stack |
Bluetooth Mesh stack event handler
btmesh_app_prov_get_command#
void btmesh_app_prov_get_command (command_t * prov_command, command_state_t * prov_command_state)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| command_t * | [out] | prov_command | Current command |
| command_state_t * | [out] | prov_command_state | Current command status |
Get the provisioner command and command status
btmesh_app_prov_set_command#
void btmesh_app_prov_set_command (command_t prov_command)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| command_t | [in] | prov_command | New command |
Set the provisioner command
btmesh_app_prov_set_command_state#
void btmesh_app_prov_set_command_state (command_state_t prov_command_state)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| command_state_t | [out] | prov_command_state | New command status |
Set the provisioner command status
btmesh_app_prov_get_cmd_options#
void btmesh_app_prov_get_cmd_options (struct option ** prov_options)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| struct option ** | [out] | prov_options | Options struct array address |
Get the command options struct array address
btmesh_cbp_prov_get_cmd_options#
void btmesh_cbp_prov_get_cmd_options (struct option ** prov_options)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| struct option ** | [out] | prov_options | Options struct array address |
Get the command options struct array address for CBP
btmesh_app_prov_handle_ui#
void btmesh_app_prov_handle_ui (void )
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Handle the main menu in UI mode
btmesh_app_prov_get_uuid_from_unprov_list#
bool btmesh_app_prov_get_uuid_from_unprov_list (uuid_128 * command_uuid)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uuid_128 * | [out] | command_uuid | The variable to fill with the parsed data |
Get UUID from UI for provisioning
btmesh_app_prov_get_uuid_from_prov_list#
bool btmesh_app_prov_get_uuid_from_prov_list (uuid_128 * command_uuid)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uuid_128 * | [out] | command_uuid | The variable to fill with UUID |
Get UUID from UI from rovisioned node list
btmesh_app_prov_get_ddb_status#
bool btmesh_app_prov_get_ddb_status (void )
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Get ddb status after startup
btmesh_app_prov_set_mode#
void btmesh_app_prov_set_mode (prov_mode_t prov_mode)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| prov_mode_t | [in] | prov_mode | New provisioner mode |
Set provisioner mode, command line or ui mode
btmesh_app_prov_get_mode#
prov_mode_t btmesh_app_prov_get_mode (void )
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Get provisioner mode command line or menu UI mode
btmesh_app_prov_on_nodeinfo_end#
void btmesh_app_prov_on_nodeinfo_end (void )
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Callback to inform when the nodeinfo query ends
btmesh_app_prov_end_of_cmd#
void btmesh_app_prov_end_of_cmd (void )
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Callback to inform when the command ends
btmesh_app_prov_append_uuid#
void btmesh_app_prov_append_uuid (uuid_128 * uuid)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uuid_128 * | [in] | uuid | Pointer to the UUID |
Helper script to print a given UUID
btmesh_app_prov_get_networks_number#
uint16_t btmesh_app_prov_get_networks_number (void )
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Get ddb status after startup
btmesh_app_prov_handle_cbp#
void btmesh_app_prov_handle_cbp (uint16_t netkey_index, uuid_128 uuid, bd_addr mac_address, uint8_t bearer_type)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint16_t | [in] | netkey_index | Netkey index of the network |
| uuid_128 | [in] | uuid | UUID of the device to be provisioned |
| bd_addr | [in] | mac_address | MAC address of the device to be provisioned |
| uint8_t | [in] | bearer_type | Type of the provisioning bearer layer. Can be PB-ADV (0) or PB-GATT (1). |
Handle certificate-based provisioning
btmesh_app_prov_set_cbp_capability#
void btmesh_app_prov_set_cbp_capability (bool capability)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| bool | [in] | capability | true if the node is CBP-capable, false otherwise |
Inform the CBP handler if the provisioned node is capable of CBP or not
btmesh_app_prov_get_cbp_status#
bool btmesh_app_prov_get_cbp_status (void )
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Get current CBP status from the CBP handler