 |
Wirepas SDK
|
|
Go to the documentation of this file.
6 #ifndef _PROVISIONING_INT_H_
7 #define _PROVISIONING_INT_H_
13 #if defined(MAC_PROFILE_DECTNR)
21 #define PROV_DOWNLINK_SRC_EP 0xA0
22 #define PROV_DOWNLINK_DST_EP 0x28
24 #define PROV_UPLINK_SRC_EP 0xA0
25 #define PROV_UPLINK_DST_EP 0x27
31 #define PROV_PDU_SIZE 135
34 #define PROV_CTR_SIZE 2
37 #define PROV_MIC_SIZE 5
40 #define ENC_KEY_OFFSET 16
45 #define PROV_DATA_OFFSET (sizeof(pdu_prov_hdr_t) + 1 + PROV_CTR_SIZE)
48 #define PROV_DATA_MIN_USER_ID 128
51 #define PROV_DATA_MAX_USER_ID 255
54 #define JOINING_NETWORK_ADDRESS 0x9E4ADC // "JBTX"
57 #if defined(MAC_PROFILE_DECTNR) || defined(MAC_PROFILE_SUBG)
59 #define JOINING_NETWORK_CHANNEL 4
66 #define JOINING_RX_TIMEOUT 600
69 #define JOINING_TX_INTERVAL 500
74 #if defined(MAC_PROFILE_DECTNR)
76 #define JOINING_BEACON_TYPE 0xA027
109 typedef struct __attribute__((__packed__))
116 typedef struct __attribute__((__packed__))
125 typedef struct __attribute__((__packed__))
136 typedef struct __attribute__((__packed__))
141 typedef struct __attribute__((__packed__))
147 typedef union __attribute__((__packed__))
149 union __attribute__((__packed__))
286 #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.
@ PROV_DATA_ID_NET_KEY_SEQ
provisioning_res_e
Provisioning result.
@ PROV_DATA_ID_MGMT_ENC_KEY
Structure to hold failsafe parameters.
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.
provisioning_ret_e Provisioning_Failsafe_init(const provisioning_failsafe_conf_t *conf)
Initialize the failsafe 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_ret_e Provisioning_Failsafe_stop(void)
Stop failsafe.
provisioning_ret_e(* provisioning_start_cb_f)(void)
Provisioning start callback.
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_Failsafe_start(void)
Start failsafe.
provisioning_ret_e Provisioning_Joining_stop(void)
Stops the joining process.
This structure holds the joining node parameters.
@ PROV_NACK_TYPE_NOT_AUTHORIZED
provisioning_start_cb_f start_cb
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_DATA_ID_MGMT_AUTH_KEY
@ PROV_PACKET_TYPE_DATA_ACK