![]() |
Wirepas SDK
|
Go to the source code of this file.
Typedefs | |
| typedef bool(* | provisioning_end_cb_f) (provisioning_res_e result) |
| The end provisioning callback. This function is called at the end of the provisioning process. More... | |
| typedef void(* | provisioning_user_data_cb_f) (uint32_t id, CborType type, uint8_t *data, uint8_t len) |
| Received User provisioning data callback. Provisioning data is received as a map of id:data. This function is callback for each id that are not reserved by Wirepas. More... | |
| typedef bool(* | provisioning_proxy_start_cb_f) (const uint8_t *uid, uint8_t uid_len, provisioning_method_e method, provisioning_proxy_net_param_t *net_param) |
| The proxy received START packet callback. This function is called when the proxy receives a valid START packet from a new node. More... | |
Functions | |
| provisioning_ret_e | Provisioning_init (provisioning_conf_t *conf) |
| Initialize the provisioning process. More... | |
| provisioning_ret_e | Provisioning_start (void) |
| Start the provisioning process. More... | |
| provisioning_ret_e | Provisioning_stop (void) |
| Stops the provisioning process. More... | |
| provisioning_ret_e | Provisioning_Proxy_init (provisioning_proxy_conf_t *conf) |
| Initialize the provisioning proxy. More... | |
| provisioning_ret_e | Provisioning_Proxy_start (void) |
| Start sending joining beacons. Provisioning packets will be forwarded to provisioning server or treated locally if local provisioning is enabled. More... | |
| provisioning_ret_e | Provisioning_Proxy_stop (void) |
| Stops the provisioning proxy. More... | |
| provisioning_ret_e | Provisioning_settings_write (const provisioning_settings_t *settings) |
| Writes provisioning settings to the secure storage. More... | |
| provisioning_ret_e | Provisioning_settings_read (provisioning_settings_t *settings) |
| Reads provisioning settings from the secure storage. More... | |
| provisioning_ret_e | Provisioning_init_from_storage (provisioning_conf_t *conf) |
| Initialize the provisioning process with provisioning settings from the secure storage. More... | |
Data Structures | |
| struct | provisioning_proxy_net_param_t |
| This structure contains the network parameters sent by the provisioning proxy to the new node. More... | |
| union | provisioning_uid_t |
| struct | provisioning_settings_t |
| This structure contains the provisioning settings stored in the secure storage. More... | |
| struct | provisioning_conf_t |
| This structure contains all provisioning related parameters. More... | |
| struct | provisioning_proxy_conf_t |
| This structure holds the joining proxy parameters. More... | |
| struct | provisioning_uid_t.__unnamed__ |
| struct | provisioning_settings_t.prov_keys |
Macros | |
| #define | PROV_UUID_SIZE_BYTES 16 |
| #define | PROV_KEY_SIZE_BYTES 16 |
| All security keys are 16 bytes long. More... | |
| #define | PROV_UID_MAX_SIZE_BYTES 79 |
| Maximum size of provisioning UID. More... | |
| #define | PROV_AUTH_UID_SIZE_BYTES 16 |
| Authenticator UID size. More... | |
| #define | PROV_METHOD_IS_UNSECURED(x) ((x) == 0) |
| Macro to check whether method is unsecured. More... | |
| #define | PROV_METHOD_IS_SECURED(x) (((x) & PROV_METHOD_FLAG_SECURED) != 0) |
| Macro to check whether method is secured. More... | |
| #define | PROV_METHOD_IS_EXTENDED_UID(x) (((x) & PROV_METHOD_FLAG_EXTENDED_UID) != 0) |
| Macro to check whether secure method uses extended UID. More... | |
| #define | PROV_METHOD_IS_KEY_MGMT(x) (((x) & PROV_METHOD_FLAG_KEY_MGMT) != 0) |
| Macro to check whether secure method uses scalable key management. More... | |
Variables | |
| const typedef app_lib_joining_received_beacon_t *(* | provisioning_joining_beacon_cb_f )(const app_lib_joining_received_beacon_t *beacons) |
| Selects which joining beacon to connect to at the end of a scan. More... | |
| typedef bool(* provisioning_end_cb_f) (provisioning_res_e result) |
The end provisioning callback. This function is called at the end of the provisioning process.
| result | Result of the provisioning process. |
Definition at line 143 of file provisioning.h.
| typedef bool(* provisioning_proxy_start_cb_f) (const uint8_t *uid, uint8_t uid_len, provisioning_method_e method, provisioning_proxy_net_param_t *net_param) |
The proxy received START packet callback. This function is called when the proxy receives a valid START packet from a new node.
| uid | A pointer to the node UID. |
| uid_len | The size in bytes of the UID |
| method | The provisioning method requested by the new node. |
| net_param | If returning true, the callback must fill this structure with the network parameters that will be sent to the new node. |
Definition at line 209 of file provisioning.h.
| typedef void(* provisioning_user_data_cb_f) (uint32_t id, CborType type, uint8_t *data, uint8_t len) |
Received User provisioning data callback. Provisioning data is received as a map of id:data. This function is callback for each id that are not reserved by Wirepas.
| id | Id of the received item. |
| data | Received data. |
| len | Length of the data. |
Definition at line 156 of file provisioning.h.
| provisioning_ret_e Provisioning_init | ( | provisioning_conf_t * | conf | ) |
Initialize the provisioning process.
| conf | Configuration for the provisioning. If conf is NULL, the library only registers the callbacks to receive provisioning configuration over Remote API and then returns with PROV_RET_INVALID_DATA. |
| provisioning_ret_e Provisioning_init_from_storage | ( | provisioning_conf_t * | conf | ) |
Initialize the provisioning process with provisioning settings from the secure storage.
| conf | Configuration defining callback functions for provisioning. |
| provisioning_ret_e Provisioning_Proxy_init | ( | provisioning_proxy_conf_t * | conf | ) |
Initialize the provisioning proxy.
| conf | Configuration for the provisioning proxy. |
| provisioning_ret_e Provisioning_Proxy_start | ( | void | ) |
Start sending joining beacons. Provisioning packets will be forwarded to provisioning server or treated locally if local provisioning is enabled.
| provisioning_ret_e Provisioning_Proxy_stop | ( | void | ) |
Stops the provisioning proxy.
| provisioning_ret_e Provisioning_settings_read | ( | provisioning_settings_t * | settings | ) |
Reads provisioning settings from the secure storage.
| settings | Pointer to provisioning settings structure for storing read configuration. |
| provisioning_ret_e Provisioning_settings_write | ( | const provisioning_settings_t * | settings | ) |
Writes provisioning settings to the secure storage.
| settings | Pointer to provisioning settings structure to be written to the secure storage. |
| provisioning_ret_e Provisioning_start | ( | void | ) |
Start the provisioning process.
| provisioning_ret_e Provisioning_stop | ( | void | ) |
Stops the provisioning process.
| struct provisioning_proxy_net_param_t |
This structure contains the network parameters sent by the provisioning proxy to the new node.
Definition at line 179 of file provisioning.h.
| Data Fields | ||
|---|---|---|
| uint8_t | auth_key[APP_LIB_SETTINGS_AES_KEY_NUM_BYTES] |
The network authentication key. |
| uint8_t | enc_key[APP_LIB_SETTINGS_AES_KEY_NUM_BYTES] |
The network encryption key. |
| app_lib_settings_net_addr_t | net_addr |
The network address. |
| app_lib_settings_net_channel_t | net_chan |
The network channel. |
| union provisioning_uid_t |
Definition at line 215 of file provisioning.h.
| Data Fields | ||
|---|---|---|
| struct provisioning_uid_t | __unnamed__ | |
| uint8_t | uid[79] | |
| struct provisioning_settings_t |
This structure contains the provisioning settings stored in the secure storage.
Definition at line 236 of file provisioning.h.
| Data Fields | ||
|---|---|---|
| provisioning_method_e | method |
The provisioning method that the node wants to use. |
| uint8_t | nb_retry |
How many retries are allowed to receive provisioning data. |
| struct provisioning_settings_t | prov_keys |
Key used for provisioning, [16B AK][16B EK] for Secured method. This implementation of the provisioning protocol only supports the factory key. |
| provisioning_uid_t | prov_uid |
UID of the node |
| uint8_t | prov_uid_len |
Length of the UID buffer. |
| uint16_t | timeout_s |
Timeout in seconds (typ. 10sec for LL and 120sec for LE network) |
| struct provisioning_conf_t |
This structure contains all provisioning related parameters.
Definition at line 263 of file provisioning.h.
| Data Fields | ||
|---|---|---|
| provisioning_joining_beacon_cb_f | beacon_joining_cb |
Beacon joining callback. Needed if use_joining is true. |
| provisioning_end_cb_f | end_cb |
End provisioning callback. |
| provisioning_settings_t | settings |
Provisioning settings. |
| provisioning_user_data_cb_f | user_data_cb |
Data provisioning callback. |
| struct provisioning_proxy_conf_t |
This structure holds the joining proxy parameters.
Definition at line 282 of file provisioning.h.
| Data Fields | ||
|---|---|---|
| bool | is_local_sec_allowed |
Is local secured provisioning method allowed. |
| bool | is_local_unsec_allowed |
Is local unsecured provisioning method allowed. |
| const uint8_t * | key |
Key used for provisioning, [16B AK][16B EK] for Secured method. This implementation of the provisioning protocol only supports the factory key. |
| uint8_t | key_len |
Length of the key. Secure method expects 32 bytes keys. |
| uint8_t | num_bytes |
Joining beacons payload number of bytes. |
| uint8_t * | payload |
Joining beacons payload. |
| provisioning_proxy_start_cb_f | start_cb |
The received START packet callback. |
| int8_t | tx_power |
Transmission power to use for sending joining beacons, in dBm. |
| struct provisioning_uid_t.__unnamed__ |
Definition at line 218 of file provisioning.h.
| struct provisioning_settings_t.prov_keys |
Key used for provisioning, [16B AK][16B EK] for Secured method. This implementation of the provisioning protocol only supports the factory key.
Definition at line 253 of file provisioning.h.
| Data Fields | ||
|---|---|---|
| uint8_t | auth_key[16] |
Authentication key |
| uint8_t | enc_key[16] |
Encryption key |
Provisioning methods.
Definition at line 89 of file provisioning.h.
Supported provisioning method bit flags.
Definition at line 68 of file provisioning.h.
| enum provisioning_res_e |
Provisioning result.
Definition at line 48 of file provisioning.h.
| enum provisioning_ret_e |
Return codes of provisioning functions.
Definition at line 37 of file provisioning.h.
| #define PROV_AUTH_UID_SIZE_BYTES 16 |
Authenticator UID size.
Definition at line 34 of file provisioning.h.
| #define PROV_KEY_SIZE_BYTES 16 |
All security keys are 16 bytes long.
Definition at line 24 of file provisioning.h.
| #define PROV_METHOD_IS_EXTENDED_UID | ( | x | ) | (((x) & PROV_METHOD_FLAG_EXTENDED_UID) != 0) |
Macro to check whether secure method uses extended UID.
Definition at line 128 of file provisioning.h.
| #define PROV_METHOD_IS_KEY_MGMT | ( | x | ) | (((x) & PROV_METHOD_FLAG_KEY_MGMT) != 0) |
Macro to check whether secure method uses scalable key management.
Definition at line 133 of file provisioning.h.
| #define PROV_METHOD_IS_SECURED | ( | x | ) | (((x) & PROV_METHOD_FLAG_SECURED) != 0) |
Macro to check whether method is secured.
Definition at line 123 of file provisioning.h.
| #define PROV_METHOD_IS_UNSECURED | ( | x | ) | ((x) == 0) |
Macro to check whether method is unsecured.
Definition at line 118 of file provisioning.h.
| #define PROV_UID_MAX_SIZE_BYTES 79 |
Maximum size of provisioning UID.
Definition at line 29 of file provisioning.h.
| #define PROV_UUID_SIZE_BYTES 16 |
UUID size in bytes as per RFC 4122 Section 4.1 "The UUID format is 16 octets"
Definition at line 19 of file provisioning.h.
| const typedef app_lib_joining_received_beacon_t*(* provisioning_joining_beacon_cb_f) (const app_lib_joining_received_beacon_t *beacons) |
Selects which joining beacon to connect to at the end of a scan.
| beacons | A buffer of joining beacons. |
Definition at line 173 of file provisioning.h.