  | 
        
           Wirepas SDK
           
         | 
        
          
         | 
      
    
  
 
  
  
 
Go to the documentation of this file.
    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 // "JBTX" 
   58 #if defined(MAC_PROFILE_ISM24) 
   60 #define JOINING_NETWORK_CHANNEL 36 
   68 #define JOINING_RX_TIMEOUT      600 
   71 #define JOINING_TX_INTERVAL     500 
   77 #if defined(MAC_PROFILE_ISM24) || defined(MAC_PROFILE_SUBG) 
   79 #define JOINING_BEACON_TYPE 0x647650fb // "PROVIS" 
  112 typedef struct __attribute__((__packed__))
 
  119 typedef struct __attribute__((__packed__))
 
  128 typedef struct __attribute__((__packed__))
 
  139 typedef struct __attribute__((__packed__))
 
  144 typedef struct __attribute__((__packed__))
 
  150 typedef union __attribute__((__packed__))
 
  152     union __attribute__((__packed__))
 
  289 #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