2.1.2 LORAWAN_Reset

Definition: This function automatically resets the LoRaWAN stack software and initializes the stacks with the parameters for the selected ISM band. During this Reset routine:

  • MAC DB is initialized with default parameters
  • LoRaWAN regional parameters module is initialized
  • Radio layer default DB initialization is triggered

The Reset routine must be called after every software reset of the stack. To change the regional band dynamically, Reset routine calls the new ISM band, which un-initializes an old regional parameter and re-initiates the new ISM band. If the ISM band is same as the one stored in DB, the regional parameter initializes the same default ISM band.

Syntax

StackRetStatus_t LORAWAN_Reset (IsmBand_t ismBand);

Input Parameters

Table 2-2. Input Parameters

Parameter Name

Parameter Type

Description

ismBand

IsmBand_t

ISM band types. Refer to Table 2-37 for a list of defined ISM band types.

Return Type and Values

Table 2-3. Return Type

Parameter Name

Parameter Type

Description

StackRetStatus_t

ENUM

Enumerated values containing all return types from LoRaWAN layers

Table 2-4. Return Values

Return Value

Reason

LORAWAN_SUCCESS

LoRaWAN stack is successfully being reset and default values are restored

LORAWAN_INVALID_PARAMETER

Given ISM band is invalid

API Type – Synchronous