 |
Wirepas SDK
|
|
Go to the documentation of this file.
6 #ifndef _PROVISIONING_INT_H_
7 #define _PROVISIONING_INT_H_
19 #define PROV_DOWNLINK_EP 255
21 #define PROV_UPLINK_EP 246
24 #define PROV_PDU_SIZE 102
27 #define PROV_CTR_SIZE 2
30 #define PROV_MIC_SIZE 5
33 #define ENC_KEY_OFFSET 16
38 #define PROV_DATA_OFFSET (sizeof(pdu_prov_hdr_t) + 1 + PROV_CTR_SIZE)
41 #define PROV_DATA_MIN_USER_ID 128
44 #define PROV_DATA_MAX_USER_ID 255
47 #define JOINING_NETWORK_ADDRESS 0x89d3b8 // "JBTX"
50 #define JOINING_NETWORK_CHANNEL 4
56 #define JOINING_RX_TIMEOUT 600
59 #define JOINING_TX_INTERVAL 500
64 #define JOINING_BEACON_TYPE 0x647650fb // "PROVIS"
93 typedef struct __attribute__((__packed__))
100 typedef struct __attribute__((__packed__))
109 typedef struct __attribute__((__packed__))
120 typedef struct __attribute__((__packed__))
125 typedef struct __attribute__((__packed__))
131 typedef union __attribute__((__packed__))
133 union __attribute__((__packed__))
225 #endif //_PROVISIONING_INT_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.
provisioning_res_e
Provisioning result.
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.
provisioning_joining_beacon_cb_f joining_cb
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_Joining_init(provisioning_joining_conf_t *conf)
Initialize the Joining module.
pdu_prov_hdr_t pdu_header
@ PROV_NACK_TYPE_INVALID_DATA
#define AES_128_KEY_BLOCK_SIZE
AES 128 block size in bytes.
pdu_prov_data_ack_t data_ack
provisioning_data_ids_e
List of Wirepas Ids for CBOR encoded provisioning data.
provisioning_user_data_cb_f user_data_cb
@ PROV_NACK_TYPE_METHOD_NOT_SUPPORTED
provisioning_end_cb_f end_cb
provisioning_ret_e
Return codes of provisioning functions.
provisioning_joining_end_cb_f end_cb
provisioning_ret_e Provisioning_Joining_start(void)
Start the joining process (listen to joining beacon and select a network to join).
@ PROV_NACK_TYPE_INVALID_KEY_IDX
bool(* provisioning_end_cb_f)(provisioning_res_e result)
The end provisioning callback. This function is called at the end of the provisioning process.
provisioning_ret_e Provisioning_Joining_stop(void)
Stops the joining process.
This structure holds the joining node parameters.
@ PROV_NACK_TYPE_NOT_AUTHORIZED
provisioning_ret_e Provisioning_Data_decode(provisioning_data_conf_t *conf, bool dry_run)
Decode (and apply if valid) the received provisioning data.
This structure holds the provisioning data parameters.
@ PROV_PACKET_TYPE_DATA_ACK