Microchip® Advanced Software Framework

enddevice_cert.c File Reference

LORAWAN Certification Application.

Copyright (c) 2019-2020 Microchip Technology Inc. and its subsidiaries.

#include "asf.h"
#include "lorawan.h"
#include "system_task_manager.h"
#include "enddevice_cert.h"
#include "enddevice_cpc.h"
#include "conf_certification.h"
#include "sio2host.h"
#include "sw_timer.h"
#include "pds_interface.h"

Macros

#define MAX_NA_CHANNELS   72
 
#define MAX_SUBBAND_CHANNELS   8
 

Functions

void cert_app_init (void)
 Initialization the Demo application. More...
 
void cert_app_timer_callback (uint8_t param)
 
static void cert_appdata_callback (void *appHandle, appCbParams_t *appdata)
 Callback function for the ending of Bidirectional communication of Application data. More...
 
static void cert_enable_channels (void)
 
static void cert_enter_test_mode (void)
 
static void cert_handle_cert_rx_data (uint8_t *data, uint8_t dataLen)
 
static void cert_joindata_callback (StackRetStatus_t status)
 
static bool cert_select_band (void)
 
StackRetStatus_t cert_set_join_parameters (ActivationType_t activation_type)
 
static StackRetStatus_t cert_set_mac_parameters (void)
 
static void print_array (uint8_t *array, uint8_t length)
 
static void print_stack_status (StackRetStatus_t status)
 

Variables

uint8_t appKey [16] = CERT_APPLICATION_KEY
 
static uint8_t appsKey [16] = CERT_APPLICATION_SESSION_KEY
 
static const char * bandStrings []
 
static uint8_t bandTable []
 
bool bTxCnf = false
 
uint32_t certAppTimeout = CERT_APP_TIMEOUT
 
uint8_t certAppTimerId
 
bool clear_linkcheck = false
 
bool cnfTxInProgress = false
 
IsmBand_t current_band
 
static uint32_t devAddr = CERT_DEVICE_ADDRESS
 
uint8_t devEui [8] = CERT_DEVICE_EUI
 
uint16_t downlinkCtr = 0
 
uint8_t joinEui [8] = CERT_APPLICATION_EUI
 
LorawanSendReq_t lorawanSendReq
 
static uint8_t nwksKey [16] = CERT_NETWORK_SESSION_KEY
 
bool pktRxd = false
 
uint8_t sendData [100]
 
uint16_t sendDataLen
 
uint8_t sendFport = CERT_APP_FPORT
 
const char * status_message []
 
uint8_t testMode = OFF
 
uint8_t tx_cw_timer
 
TransmissionType_t txType = CERT_APP_TRANSMISSION_TYPE
 
uint8_t uplinkTestNoResp = 0
 

#define MAX_NA_CHANNELS   72

Referenced by cert_enable_channels().

#define MAX_SUBBAND_CHANNELS   8

Referenced by cert_enable_channels().

static void cert_enter_test_mode ( void  )
static
static bool cert_select_band ( void  )
static
static StackRetStatus_t cert_set_mac_parameters ( void  )
static
static void print_array ( uint8_t *  array,
uint8_t  length 
)
static
static void print_stack_status ( StackRetStatus_t  status)
static

uint8_t appsKey[16] = CERT_APPLICATION_SESSION_KEY
static
const char* bandStrings[]
static
Initial value:
=
{
"0xFF",
"EU868",
"NA915",
"AU915",
"AS923",
"JPN923",
"KR920",
"IND865",
}

Referenced by cert_select_band().

uint8_t bandTable[]
static
Initial value:
=
{
0xFF,
}
Definition: stack_common.h:150
Definition: stack_common.h:169
Definition: stack_common.h:142
Definition: stack_common.h:152
Definition: stack_common.h:148
Definition: stack_common.h:173
Definition: stack_common.h:146
bool clear_linkcheck = false

Referenced by cert_app_timer_callback().

bool cnfTxInProgress = false
uint32_t devAddr = CERT_DEVICE_ADDRESS
static
LorawanSendReq_t lorawanSendReq
uint8_t nwksKey[16] = CERT_NETWORK_SESSION_KEY
static
const char* status_message[]
uint8_t testMode = OFF
uint8_t tx_cw_timer
uint8_t uplinkTestNoResp = 0