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... | |
Data Structures | |
struct | provisioning_proxy_net_param_t |
This structure contains the network parameters sent by the provisioning proxy to the new node. More... | |
struct | provisioning_conf_t |
This structure holds the provisioning parameters. More... | |
struct | provisioning_proxy_conf_t |
This structure holds the joining proxy parameters. More... | |
Enumerations | |
enum | provisioning_ret_e { PROV_RET_OK = 0, PROV_RET_INVALID_STATE = 1, PROV_RET_INVALID_PARAM = 2, PROV_RET_INVALID_DATA = 3, PROV_RET_JOINING_LIB_ERROR = 4, PROV_RET_INTERNAL_ERROR = 5 } |
Return codes of provisioning functions. More... | |
enum | provisioning_res_e { PROV_RES_SUCCESS = 0, PROV_RES_TIMEOUT = 1, PROV_RES_NACK = 2, PROV_RES_INVALID_DATA = 3, PROV_RES_INVALID_PACKET = 4, PROV_RES_ERROR_SENDING_DATA = 5, PROV_RES_ERROR_SCANNING_BEACONS = 6, PROV_RES_ERROR_JOINING = 7, PROV_RES_ERROR_NO_ROUTE = 8, PROV_RES_STOPPED = 9, PROV_RES_ERROR_INTERNAL = 10 } |
Provisioning result. More... | |
enum | provisioning_method_e { PROV_METHOD_UNSECURED = 0, PROV_METHOD_SECURED = 1, PROV_METHOD_EXTENDED_UID = 3 } |
supported provisioning methods 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 58 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 124 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 71 of file provisioning.h.
provisioning_ret_e Provisioning_init | ( | provisioning_conf_t * | conf | ) |
Initialize the provisioning process.
conf | Configuration for the 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_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 94 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. |
struct provisioning_conf_t |
This structure holds the provisioning parameters.
Definition at line 133 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. |
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. |
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. |
uint16_t | timeout_s |
Timeout in seconds (typ. 10sec for LL and 120sec for LE network) |
const uint8_t * | uid |
UID of the node |
uint8_t | uid_len |
Length of the UID buffer. |
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 167 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. |
supported provisioning methods
Enumerator | |
---|---|
PROV_METHOD_UNSECURED | Unsecured provisioning method. |
PROV_METHOD_SECURED | Secured provisioning method. |
PROV_METHOD_EXTENDED_UID | Extended UID provisioning method. |
Definition at line 43 of file provisioning.h.
enum provisioning_res_e |
Provisioning result.
Definition at line 26 of file provisioning.h.
enum provisioning_ret_e |
Return codes of provisioning functions.
Definition at line 15 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 88 of file provisioning.h.