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... | |
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... | |
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... | |
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 } |
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_DOWNLINK_EP 255 |
#define | PROV_UPLINK_EP 246 |
#define | PROV_PDU_SIZE 102 |
#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_NETWORK_CHANNEL 4 |
#define | JOINING_RX_TIMEOUT 600 |
#define | JOINING_TX_INTERVAL 500 |
#define | JOINING_BEACON_TYPE 0x647650fb |
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 170 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_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 98 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 105 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[102 - sizeof(pdu_prov_hdr_t) - 1 - AES_128_KEY_BLOCK_SIZE] |
struct pdu_prov_data_t |
Definition at line 114 of file provisioning_int.h.
Data Fields | ||
---|---|---|
uint16_t | counter | |
uint8_t | data[102 -(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 125 of file provisioning_int.h.
Data Fields | ||
---|---|---|
pdu_prov_hdr_t | pdu_header |
struct pdu_prov_nack_t |
Definition at line 130 of file provisioning_int.h.
Data Fields | ||
---|---|---|
uint8_t | nack_type | |
pdu_prov_hdr_t | pdu_header |
union pdu_prov_t |
Definition at line 136 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 152 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. |
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 175 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. |
union pdu_prov_t.__unnamed__ |
Definition at line 138 of file provisioning_int.h.
Data Fields | ||
---|---|---|
pdu_prov_hdr_t | pdu_header | |
uint8_t | pld[102 - 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 90 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 82 of file provisioning_int.h.
List of Wirepas Ids for CBOR encoded provisioning data.
Enumerator | |
---|---|
PROV_DATA_ID_ENC_KEY | |
PROV_DATA_ID_AUTH_KEY | |
PROV_DATA_ID_NET_ADDR | |
PROV_DATA_ID_NET_CHAN | |
PROV_DATA_ID_NODE_ADDR | |
PROV_DATA_ID_NODE_ROLE |
Definition at line 72 of file provisioning_int.h.
#define ENC_KEY_OFFSET 16 |
Encryption key offset in Key buffer.
Definition at line 32 of file provisioning_int.h.
#define JOINING_BEACON_TYPE 0x647650fb |
A value for the joining type field., Allows to identify provisioning proxy nodes.
Definition at line 69 of file provisioning_int.h.
#define JOINING_NETWORK_ADDRESS 0x9E4ADC |
Network address for sending and receiving joining beacons
Definition at line 46 of file provisioning_int.h.
#define JOINING_NETWORK_CHANNEL 4 |
Network channel 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 61 of file provisioning_int.h.
#define JOINING_TX_INTERVAL 500 |
Interval to send joining beacons, in milliseconds
Definition at line 64 of file provisioning_int.h.
#define PROV_CTR_SIZE 2 |
Size of the counter used in AES CTR mode encryption.
Definition at line 26 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 43 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 40 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 37 of file provisioning_int.h.
#define PROV_DOWNLINK_EP 255 |
Provisioning downlink endpoint.
Definition at line 18 of file provisioning_int.h.
#define PROV_MIC_SIZE 5 |
Size of MIC in DATA packet if secured method is used.
Definition at line 29 of file provisioning_int.h.
#define PROV_PDU_SIZE 102 |
Maximum size of a packet payload. Needed for buffer size definitions.
Definition at line 23 of file provisioning_int.h.
#define PROV_UPLINK_EP 246 |
Provisioning uplink endpoint.
Definition at line 20 of file provisioning_int.h.