LORAWAN_Join

Definition: This API initiates the LoRaWAN join procedure and activates the end device to successfully connect to the LoRaWAN network.

Syntax

StackRetStatus_t LORAWAN_Join(ActivationType_t activationTypeNew);

Input Parameters

Table 1. Input Parameters

Parameter Name

Parameter Type

Description

activationTypeNew

ActivationType_t

Activation type:
  • LORAWAN_OTAA = 0
  • LORAWAN_ABP = 1.

Return Type and Values

Table 2. Return Type

Parameter Name

Parameter Type

Description

StackRetStatus_t

ENUM

Enumerated values containing all return types from LoRaWAN layers

Table 3. Return Values

Return Value

Reason

LORAWAN_SUCCESS

LoRaWAN join procedure is successfully initiated

LORAWAN_MAC_PAUSED

LoRaWAN MAC layer is paused. Join procedure will only happen in Active state

LORAWAN_SILENT_IMMEDIATELY_ACTIVE

The server decided that any further up-link transmission is not possible from this end device

LORAWAN_NWK_JOIN_IN_PROGRESS

Already one join procedure is in progress. MAC cannot initiate join procedure until previous request is completed.

LORAWAN_BUSY

MAC layer is not IDLE. Until other transaction is completed, MAC cannot initiate join procedure

LORAWAN_KEYS_NOT_INITIALIZED

For initiating join procedure, keys need to be available by MAC Layer. If keys are not set, MAC layer will not initiate join procedure.

API Type – Asynchronous