6#ifndef _PROVISIONING_INT_H_
7#define _PROVISIONING_INT_H_
14#if defined(MAC_PROFILE_ISM24) || defined(MAC_PROFILE_SUBG)
22#define PROV_DOWNLINK_SRC_EP 255
23#define PROV_DOWNLINK_DST_EP 246
25#define PROV_UPLINK_SRC_EP 246
26#define PROV_UPLINK_DST_EP 255
32#define PROV_PDU_SIZE 135
35#define PROV_CTR_SIZE 2
38#define PROV_MIC_SIZE 5
41#define ENC_KEY_OFFSET 16
46#define PROV_DATA_OFFSET (sizeof(pdu_prov_hdr_t) + 1 + PROV_CTR_SIZE)
49#define PROV_DATA_MIN_USER_ID 128
52#define PROV_DATA_MAX_USER_ID 255
55#define JOINING_NETWORK_ADDRESS 0x9E4ADC
58#if defined(MAC_PROFILE_ISM24)
60#define JOINING_NETWORK_CHANNEL 36
64#if defined(MAC_PROFILE_ISM24)
69#define JOINING_RX_TIMEOUT 600
72#if defined(MAC_PROFILE_ISM24)
74#define JOINING_TX_INTERVAL 500
81#if defined(MAC_PROFILE_ISM24) || defined(MAC_PROFILE_SUBG)
83#define JOINING_BEACON_TYPE 0x647650fb
90#define PROV_START_FLAGS_NONE 0
95#define PROV_START_FLAGS_NW_PARAM_EQUAL_CHECK 1
127typedef struct __attribute__((__packed__))
134typedef struct __attribute__((__packed__))
144typedef struct __attribute__((__packed__))
155typedef struct __attribute__((__packed__))
160typedef struct __attribute__((__packed__))
166typedef union __attribute__((__packed__))
168 union __attribute__((__packed__))
324const app_lib_joining_received_beacon_t *
326 const app_lib_joining_received_beacon_t * beacons);
#define AES_128_KEY_BLOCK_SIZE
AES 128 block size in bytes.
provisioning_ret_e
Return codes of provisioning functions.
const 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_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....
bool(* provisioning_end_cb_f)(provisioning_res_e result)
The end provisioning callback. This function is called at the end of the provisioning process.
bool Provisioning_Failsafe_callback_end(provisioning_res_e result)
Callback for ending provisioning.
const app_lib_joining_received_beacon_t * Provisioning_Failsafe_callback_beacons(const app_lib_joining_received_beacon_t *beacons)
Callback for joining beacon filtering.
provisioning_ret_e Provisioning_Failsafe_start(void)
Start failsafe.
provisioning_ret_e Provisioning_Failsafe_stop(void)
Stop failsafe.
pdu_prov_hdr_t pdu_header
@ PROV_NACK_TYPE_INVALID_DATA
@ PROV_NACK_TYPE_NOT_AUTHORIZED
@ PROV_NACK_TYPE_INVALID_KEY_IDX
@ PROV_NACK_TYPE_METHOD_NOT_SUPPORTED
provisioning_start_cb_f start_cb
provisioning_ret_e Provisioning_Failsafe_init(const provisioning_failsafe_conf_t *conf)
Initialize the failsafe module.
provisioning_user_data_cb_f user_data_cb
provisioning_joining_end_cb_f end_cb
pdu_prov_data_ack_t data_ack
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_ret_e Provisioning_Data_decode(provisioning_data_conf_t *conf, bool dry_run)
Decode (and apply if valid) the received provisioning data.
provisioning_ret_e(* provisioning_start_cb_f)(void)
Provisioning start callback.
@ PROV_PACKET_TYPE_DATA_ACK
provisioning_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).
provisioning_joining_beacon_cb_f joining_cb
provisioning_ret_e Provisioning_Joining_stop(void)
Stops the joining process.
provisioning_ret_e Provisioning_Joining_init(provisioning_joining_conf_t *conf)
Initialize the Joining module.
provisioning_data_ids_e
List of Wirepas Ids for CBOR encoded provisioning data.
@ PROV_DATA_ID_NET_KEY_SEQ
@ PROV_DATA_ID_MGMT_KEY_SEQ
@ PROV_DATA_ID_MGMT_ENC_KEY
@ PROV_DATA_ID_MGMT_AUTH_KEY
This structure holds the provisioning data parameters.
Structure to hold failsafe parameters.
This structure holds the joining node parameters.