|
Wirepas SDK
|
|
Go to the documentation of this file.
6 #ifndef _PROVISIONING_INT_H_
7 #define _PROVISIONING_INT_H_
18 #define PROV_DOWNLINK_EP 255
20 #define PROV_UPLINK_EP 246
23 #define PROV_PDU_SIZE 102
26 #define PROV_CTR_SIZE 2
29 #define PROV_MIC_SIZE 5
32 #define ENC_KEY_OFFSET 16
37 #define PROV_DATA_OFFSET (sizeof(pdu_prov_hdr_t) + 1 + PROV_CTR_SIZE)
40 #define PROV_DATA_MIN_USER_ID 128
43 #define PROV_DATA_MAX_USER_ID 255
46 #define JOINING_NETWORK_ADDRESS 0x9E4ADC // "JBTX"
50 #ifdef MAC_PROFILE_ISM24
51 #define JOINING_NETWORK_CHANNEL 36
54 #define JOINING_NETWORK_CHANNEL 4
61 #define JOINING_RX_TIMEOUT 600
64 #define JOINING_TX_INTERVAL 500
69 #define JOINING_BEACON_TYPE 0x647650fb // "PROVIS"
98 typedef struct __attribute__((__packed__))
105 typedef struct __attribute__((__packed__))
114 typedef struct __attribute__((__packed__))
125 typedef struct __attribute__((__packed__))
130 typedef struct __attribute__((__packed__))
136 typedef union __attribute__((__packed__))
138 union __attribute__((__packed__))
230 #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