 |
Wirepas SDK
|
|
Go to the documentation of this file.
6 #ifndef _PROVISIONING_H_
7 #define _PROVISIONING_H_
19 #define PROV_UUID_SIZE_BYTES 16
24 #define PROV_KEY_SIZE_BYTES 16
29 #define PROV_UID_MAX_SIZE_BYTES 79
34 #define PROV_AUTH_UID_SIZE_BYTES 16
118 #define PROV_METHOD_IS_UNSECURED(x) ((x) == 0)
123 #define PROV_METHOD_IS_SECURED(x) (((x) & PROV_METHOD_FLAG_SECURED) != 0)
128 #define PROV_METHOD_IS_EXTENDED_UID(x) (((x) & PROV_METHOD_FLAG_EXTENDED_UID) != 0)
133 #define PROV_METHOD_IS_KEY_MGMT(x) (((x) & PROV_METHOD_FLAG_KEY_MGMT) != 0)
171 typedef const app_lib_joining_received_beacon_t *
172 (*provisioning_joining_beacon_cb_f)
173 (
const app_lib_joining_received_beacon_t * beacons);
221 uint8_t authenticator_uid_type;
225 uint8_t node_uid_type;
404 #endif //_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.
#define PROV_UUID_SIZE_BYTES
This structure holds the joining proxy parameters.
#define PROV_UID_MAX_SIZE_BYTES
Maximum size of provisioning UID.
provisioning_res_e
Provisioning result.
uint8_t app_lib_settings_net_channel_t
Channel type definition.
@ PROV_RES_ERROR_SCANNING_BEACONS
provisioning_method_e method
@ PROV_RES_INVALID_PACKET
provisioning_ret_e Provisioning_start(void)
Start the provisioning process.
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....
provisioning_ret_e Provisioning_Proxy_init(provisioning_proxy_conf_t *conf)
Initialize the provisioning proxy.
provisioning_ret_e Provisioning_Proxy_start(void)
Start sending joining beacons. Provisioning packets will be forwarded to provisioning server or treat...
provisioning_ret_e Provisioning_init(provisioning_conf_t *conf)
Initialize the provisioning process.
This structure contains the provisioning settings stored in the secure storage.
#define PROV_AUTH_UID_SIZE_BYTES
Authenticator UID size.
@ PROV_RES_ERROR_SENDING_DATA
This structure contains all provisioning related parameters.
@ PROV_RET_JOINING_LIB_ERROR
uint32_t app_lib_settings_net_addr_t
Network address type definition.
@ PROV_METHOD_FLAG_SECURED
app_lib_settings_net_channel_t net_chan
provisioning_ret_e Provisioning_stop(void)
Stops the provisioning process.
@ PROV_RET_INTERNAL_ERROR
provisioning_method_e
Provisioning methods.
bool is_local_unsec_allowed
@ PROV_METHOD_EXTENDED_UID_KEY_MGMT
provisioning_ret_e
Return codes of provisioning functions.
provisioning_settings_t settings
provisioning_ret_e Provisioning_Proxy_stop(void)
Stops the provisioning proxy.
@ PROV_METHOD_FLAG_EXTENDED_UID
@ PROV_METHOD_FLAG_KEY_MGMT
provisioning_joining_beacon_cb_f beacon_joining_cb
#define APP_LIB_SETTINGS_AES_KEY_NUM_BYTES
AES key size in bytes.
provisioning_ret_e Provisioning_settings_write(const provisioning_settings_t *settings)
Writes provisioning settings to the secure storage.
bool(* provisioning_end_cb_f)(provisioning_res_e result)
The end provisioning callback. This function is called at the end of the provisioning process.
#define PROV_KEY_SIZE_BYTES
All security keys are 16 bytes long.
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 STA...
provisioning_ret_e Provisioning_settings_read(provisioning_settings_t *settings)
Reads provisioning settings from the secure storage.
provisioning_method_flag_e
Supported provisioning method bit flags.
provisioning_user_data_cb_f user_data_cb
provisioning_proxy_start_cb_f start_cb
@ PROV_RES_ERROR_NO_ROUTE
provisioning_uid_t prov_uid
provisioning_ret_e Provisioning_init_from_storage(provisioning_conf_t *conf)
Initialize the provisioning process with provisioning settings from the secure storage.
@ PROV_RES_ERROR_INTERNAL
bool is_local_sec_allowed
This structure contains the network parameters sent by the provisioning proxy to the new node.
@ PROV_METHOD_EXTENDED_UID
provisioning_end_cb_f end_cb
@ PROV_RES_ERROR_FAILSAFE
app_lib_settings_net_addr_t net_addr