![]() |
Wirepas SDK
|
Go to the source code of this file.
Typedefs | |
typedef void(* | provisioning_joining_end_cb_f) (provisioning_res_e result) |
The end joining callback. This function is called at the end of the joining process. More... | |
typedef provisioning_ret_e(* | provisioning_start_cb_f) (void) |
Provisioning start callback. More... | |
Functions | |
provisioning_ret_e | Provisioning_Data_decode (provisioning_data_conf_t *conf, bool dry_run) |
Decode (and apply if valid) the received provisioning data. More... | |
provisioning_ret_e | Provisioning_Joining_init (provisioning_joining_conf_t *conf) |
Initialize the Joining module. More... | |
provisioning_ret_e | Provisioning_Joining_start (void) |
Start the joining process (listen to joining beacon and select a network to join). More... | |
provisioning_ret_e | Provisioning_Joining_stop (void) |
Stops the joining process. More... | |
provisioning_ret_e | Provisioning_Failsafe_init (const provisioning_failsafe_conf_t *conf) |
Initialize the failsafe module. More... | |
provisioning_ret_e | Provisioning_Failsafe_start (void) |
Start failsafe. More... | |
provisioning_ret_e | Provisioning_Failsafe_stop (void) |
Stop failsafe. More... | |
Data Structures | |
struct | pdu_prov_hdr_t |
struct | pdu_prov_start_t |
struct | pdu_prov_data_t |
struct | pdu_prov_data_ack_t |
struct | pdu_prov_nack_t |
union | pdu_prov_t |
struct | provisioning_data_conf_t |
This structure holds the provisioning data parameters. More... | |
struct | provisioning_joining_conf_t |
This structure holds the joining node parameters. More... | |
struct | provisioning_failsafe_conf_t |
Structure to hold failsafe parameters. More... | |
union | pdu_prov_t.__unnamed__ |
Enumerations | |
enum | provisioning_data_ids_e { PROV_DATA_ID_ENC_KEY = 0, PROV_DATA_ID_AUTH_KEY = 1, PROV_DATA_ID_NET_ADDR = 2, PROV_DATA_ID_NET_CHAN = 3, PROV_DATA_ID_NODE_ADDR = 4, PROV_DATA_ID_NODE_ROLE = 5, PROV_DATA_ID_NET_KEY_SEQ = 6, PROV_DATA_ID_MGMT_ENC_KEY = 7, PROV_DATA_ID_MGMT_AUTH_KEY = 8, RTC_ID_TIMESTAMP = 0, RTC_ID_TIMEZONE_OFFSET = 1 } |
List of Wirepas Ids for CBOR encoded provisioning data. More... | |
enum | prov_packet_type_e { PROV_PACKET_TYPE_START = 1, PROV_PACKET_TYPE_DATA = 2, PROV_PACKET_TYPE_DATA_ACK = 3, PROV_PACKET_TYPE_NACK = 4 } |
enum | prov_nack_type_e { PROV_NACK_TYPE_NOT_AUTHORIZED = 0, PROV_NACK_TYPE_METHOD_NOT_SUPPORTED = 1, PROV_NACK_TYPE_INVALID_DATA = 2, PROV_NACK_TYPE_INVALID_KEY_IDX = 3 } |
Macros | |
#define | PROV_PDU_SIZE 135 |
#define | PROV_CTR_SIZE 2 |
#define | PROV_MIC_SIZE 5 |
#define | ENC_KEY_OFFSET 16 |
#define | PROV_DATA_OFFSET (sizeof(pdu_prov_hdr_t) + 1 + PROV_CTR_SIZE) |
#define | PROV_DATA_MIN_USER_ID 128 |
#define | PROV_DATA_MAX_USER_ID 255 |
#define | JOINING_NETWORK_ADDRESS 0x9E4ADC |
#define | JOINING_RX_TIMEOUT 600 |
#define | JOINING_TX_INTERVAL 500 |
typedef void(* provisioning_joining_end_cb_f) (provisioning_res_e result) |
The end joining callback. This function is called at the end of the joining process.
result | Result of the joining process. |
Definition at line 183 of file provisioning_int.h.
typedef provisioning_ret_e(* provisioning_start_cb_f) (void) |
Provisioning start callback.
Definition at line 202 of file provisioning_int.h.
provisioning_ret_e Provisioning_Data_decode | ( | provisioning_data_conf_t * | conf, |
bool | dry_run | ||
) |
Decode (and apply if valid) the received provisioning data.
conf | Configuration for the provisioning data decoder. |
dry_run | If true, only check data validity and don't apply it. |
provisioning_ret_e Provisioning_Failsafe_init | ( | const provisioning_failsafe_conf_t * | conf | ) |
Initialize the failsafe module.
conf | Failsafe configuration |
provisioning_ret_e Provisioning_Failsafe_start | ( | void | ) |
Start failsafe.
provisioning_ret_e Provisioning_Failsafe_stop | ( | void | ) |
Stop failsafe.
provisioning_ret_e Provisioning_Joining_init | ( | provisioning_joining_conf_t * | conf | ) |
Initialize the Joining module.
conf | Configuration for the Joining module. |
provisioning_ret_e Provisioning_Joining_start | ( | void | ) |
Start the joining process (listen to joining beacon and select a network to join).
provisioning_ret_e Provisioning_Joining_stop | ( | void | ) |
Stops the joining process.
struct pdu_prov_hdr_t |
Definition at line 109 of file provisioning_int.h.
Data Fields | ||
---|---|---|
app_addr_t | address | |
uint8_t | session_id | |
uint8_t | type |
struct pdu_prov_start_t |
Definition at line 116 of file provisioning_int.h.
Data Fields | ||
---|---|---|
uint8_t | iv[AES_128_KEY_BLOCK_SIZE] | |
uint8_t | method | |
pdu_prov_hdr_t | pdu_header | |
uint8_t | uid[135 - sizeof(pdu_prov_hdr_t) - 1 - AES_128_KEY_BLOCK_SIZE] |
struct pdu_prov_data_t |
Definition at line 125 of file provisioning_int.h.
Data Fields | ||
---|---|---|
uint16_t | counter | |
uint8_t | data[135 -(sizeof(pdu_prov_hdr_t)+1+2) - 5] | |
uint8_t | key_index | |
pdu_prov_hdr_t | pdu_header |
struct pdu_prov_data_ack_t |
Definition at line 136 of file provisioning_int.h.
Data Fields | ||
---|---|---|
pdu_prov_hdr_t | pdu_header |
struct pdu_prov_nack_t |
Definition at line 141 of file provisioning_int.h.
Data Fields | ||
---|---|---|
uint8_t | nack_type | |
pdu_prov_hdr_t | pdu_header |
union pdu_prov_t |
Definition at line 147 of file provisioning_int.h.
Data Fields | ||
---|---|---|
union pdu_prov_t | __unnamed__ | |
pdu_prov_data_t | data | |
pdu_prov_data_ack_t | data_ack | |
pdu_prov_nack_t | nack | |
pdu_prov_start_t | start |
struct provisioning_data_conf_t |
This structure holds the provisioning data parameters.
Definition at line 163 of file provisioning_int.h.
Data Fields | ||
---|---|---|
uint8_t * | buffer |
buffer containing provisioning data. |
provisioning_end_cb_f | end_cb |
End provisioning callback. |
uint8_t | length |
length of provisioning buffer. |
uint8_t | method |
method used in provisioning. |
provisioning_user_data_cb_f | user_data_cb |
Data provisioning callback. |
struct provisioning_joining_conf_t |
This structure holds the joining node parameters.
Definition at line 188 of file provisioning_int.h.
Data Fields | ||
---|---|---|
provisioning_joining_end_cb_f | end_cb |
End joining callback. |
provisioning_joining_beacon_cb_f | joining_cb |
Callback used to select which beacon to connect to. |
uint8_t | nb_retry |
How many retries are allowed to connect to a network. |
struct provisioning_failsafe_conf_t |
Structure to hold failsafe parameters.
Definition at line 207 of file provisioning_int.h.
Data Fields | ||
---|---|---|
provisioning_start_cb_f | start_cb |
Start provisioning callback. |
uint16_t | timeout_sec |
Wait timeout in seconds. |
union pdu_prov_t.__unnamed__ |
Definition at line 149 of file provisioning_int.h.
Data Fields | ||
---|---|---|
pdu_prov_hdr_t | pdu_header | |
uint8_t | pld[135 - sizeof(pdu_prov_hdr_t)] |
enum prov_nack_type_e |
Enumerator | |
---|---|
PROV_NACK_TYPE_NOT_AUTHORIZED | |
PROV_NACK_TYPE_METHOD_NOT_SUPPORTED | |
PROV_NACK_TYPE_INVALID_DATA | |
PROV_NACK_TYPE_INVALID_KEY_IDX |
Definition at line 101 of file provisioning_int.h.
enum prov_packet_type_e |
Enumerator | |
---|---|
PROV_PACKET_TYPE_START | |
PROV_PACKET_TYPE_DATA | |
PROV_PACKET_TYPE_DATA_ACK | |
PROV_PACKET_TYPE_NACK |
Definition at line 93 of file provisioning_int.h.
List of Wirepas Ids for CBOR encoded provisioning data.
A value for the joining type field., Allows to identify provisioning proxy nodes.
Definition at line 81 of file provisioning_int.h.
#define ENC_KEY_OFFSET 16 |
Encryption key offset in Key buffer.
Definition at line 40 of file provisioning_int.h.
#define JOINING_NETWORK_ADDRESS 0x9E4ADC |
Network address for sending and receiving joining beacons
Definition at line 54 of file provisioning_int.h.
#define JOINING_RX_TIMEOUT 600 |
Time to scan for joining beacons, in milliseconds. JOINING_RX_TIMEOUT and JOINING_TX_INTERVAL needs to be modified accordingly.
Definition at line 66 of file provisioning_int.h.
#define JOINING_TX_INTERVAL 500 |
Interval to send joining beacons, in milliseconds
Definition at line 69 of file provisioning_int.h.
#define PROV_CTR_SIZE 2 |
Size of the counter used in AES CTR mode encryption.
Definition at line 34 of file provisioning_int.h.
#define PROV_DATA_MAX_USER_ID 255 |
Maximum User Specific Id in Cbor provisioning buffer (range [128:255]).
Definition at line 51 of file provisioning_int.h.
#define PROV_DATA_MIN_USER_ID 128 |
Minimum User Specific Id in Cbor provisioning buffer (range [128:255]).
Definition at line 48 of file provisioning_int.h.
#define PROV_DATA_OFFSET (sizeof(pdu_prov_hdr_t) + 1 + PROV_CTR_SIZE) |
Offset of the data in the provisioning DATA packet. pdu_prov_hdr(6) + key_index(1) + counter(2)
Definition at line 45 of file provisioning_int.h.
#define PROV_MIC_SIZE 5 |
Size of MIC in DATA packet if secured method is used.
Definition at line 37 of file provisioning_int.h.
#define PROV_PDU_SIZE 135 |
Maximum size of a packet payload. Needed for buffer size definitions.
Definition at line 31 of file provisioning_int.h.