Wirepas SDK
app_setup_int.h File Reference

Go to the source code of this file.

Data Structures

struct  app_setup_hdr_t
 Application setup data header. More...
 
struct  app_setup_node_t
 Node configuration. More...
 
struct  app_setup_network_t
 Key management configuration. More...
 
struct  app_setup_provisioning_t
 Provisioning configuration. More...
 
struct  app_setup_action_t
 Actions for application setup. More...
 
struct  app_setup
 Application setup data structure. More...
 

Macros

#define APP_SETUP_FORMAT   0xabb5e70b
 Internal header for application setup library. More...
 
#define APP_SETUP_VERSION   2
 Version of the library. More...
 
#define APP_SETUP_CLEAR_BYTE   0xff
 In flash 0xff marks empty byte. More...
 
#define APP_SETUP_KEY_SIZE_BYTES   16
 All security keys are 16 bytes long. More...
 
#define APP_SETUP_PROV_UID_MAX_SIZE_BYTES   79
 Maximum size of provisioning UID. More...
 
#define APP_SETUP_AUTH_UID_SIZE_BYTES   16
 Authenticator UID size. More...
 

Data Structure Documentation

◆ app_setup_hdr_t

struct app_setup_hdr_t

Application setup data header.

TYPES

Definition at line 66 of file app_setup_int.h.

Data Fields
uint32_t format

APP_SETUP_FORMAT

uint16_t length

Length in bytes of header + data

uint16_t version

APP_SETUP_VERSION

◆ app_setup_node_t

struct app_setup_node_t

Node configuration.

Definition at line 88 of file app_setup_int.h.

Data Fields
uint16_t diag_interval

Diagnostic interval in seconds

uint32_t id

Node id

uint8_t reserved
uint8_t role

Node role

◆ app_setup_network_t

struct app_setup_network_t

Key management configuration.

Definition at line 111 of file app_setup_int.h.

Data Fields
uint8_t mgmt_auth_key[16]

Management authentication key

uint8_t mgmt_enc_key[16]

Management encryption key

uint8_t mgmt_key_pair_seq

Management key pair sequence

uint32_t network_address

Network address

uint8_t network_auth_key[16]

Network authentication key

uint8_t network_channel

Network channel

uint8_t network_enc_key[16]

Network encryption key

uint8_t network_key_pair_seq

Network key pair sequence

uint8_t reserved

◆ app_setup_provisioning_t

struct app_setup_provisioning_t

Provisioning configuration.

Definition at line 161 of file app_setup_int.h.

Data Fields
uint8_t auth_key[16]

Authentication key if method is SECURED

uint8_t enc_key[16]

Encryption key if method is SECURED

uint8_t method

Provisioning method

uint8_t num_retries

How many retries will be attempted

uint8_t prov_uid[79]

Provisioning UID

uint8_t prov_uid_len

Provisioning UID length

uint16_t timeout

Timeout in seconds

◆ app_setup_action_t

struct app_setup_action_t

Actions for application setup.

Definition at line 203 of file app_setup_int.h.

Data Fields
uint8_t preserve_data

Preserved data in app persistent area after first boot

uint16_t reserved

Reserved to align structure to word

uint8_t start_dualmcu

Start dualMCU app on boot without explicit command

◆ app_setup

struct app_setup

Application setup data structure.

Definition at line 225 of file app_setup_int.h.

Data Fields
app_setup_action_t action

Application setup actions

app_setup_hdr_t header

Header

app_setup_network_t network

Network configuration

app_setup_node_t node

Node configuration

app_setup_provisioning_t provisioning

Provisioning configuration

Macro Definition Documentation

◆ APP_SETUP_AUTH_UID_SIZE_BYTES

#define APP_SETUP_AUTH_UID_SIZE_BYTES   16

Authenticator UID size.

Definition at line 57 of file app_setup_int.h.

◆ APP_SETUP_CLEAR_BYTE

#define APP_SETUP_CLEAR_BYTE   0xff

In flash 0xff marks empty byte.

Definition at line 42 of file app_setup_int.h.

◆ APP_SETUP_FORMAT

#define APP_SETUP_FORMAT   0xabb5e70b

Internal header for application setup library.

     Data structures match the output produced by:

         tools/app_setup.py
Note
Data structures are packed and aligned so that every compound member and array are word addressable.

One should not use scalar members as pointers, because they are not guaranteed to be on word addressable offset. DEFINITIONS

Application setup data identifier

     If application persistent area has this at the beginning, the
     data is presumed to be application setup data.

Definition at line 32 of file app_setup_int.h.

◆ APP_SETUP_KEY_SIZE_BYTES

#define APP_SETUP_KEY_SIZE_BYTES   16

All security keys are 16 bytes long.

Definition at line 47 of file app_setup_int.h.

◆ APP_SETUP_PROV_UID_MAX_SIZE_BYTES

#define APP_SETUP_PROV_UID_MAX_SIZE_BYTES   79

Maximum size of provisioning UID.

Definition at line 52 of file app_setup_int.h.

◆ APP_SETUP_VERSION

#define APP_SETUP_VERSION   2

Version of the library.

Definition at line 37 of file app_setup_int.h.