RUI3 (RAK Unified Interface 3) - RAK4631

Public Member Functions

bool get ()
 
bool set (bool value)
 

Detailed Description

Description
This api allows the user to access the network join mode

Member Function Documentation

◆ get()

bool get ( )
Description
This api allows the user to get the network join mode
Syntax
api.lorawan.njm.get()
Returns
bool
Return values
TRUE: OTAA
FALSE: ABP
Example
void setup()
{
    Serial.begin(115200);

    Serial.printf("Set network join mode %s\n\r", api.lorawan.njm.set(1) ? "Success" : "Fail");
}

void loop()
{
    Serial.printf("Network join mode is %s\n\r", api.lorawan.cfm.get() ? "OTAA" : "ABP");

    delay(1000);
}

◆ set()

bool set ( bool  value)
Description
This api allows the user to set the network join mode
Syntax
api.lorawan.njm.set(value)
Parameters
valuethe mode of network join mode
ABP: 0
OTAA: 1
Returns
bool
Return values
TRUEfor setting network join mode success
FALSEfor setting network join mode failure
Example
void setup()
{
    Serial.begin(115200);

    Serial.printf("Set network join mode %s\n\r", api.lorawan.njm.set(1) ? "Success" : "Fail");
}

void loop()
{
    Serial.printf("Network join mode is %s\n\r", api.lorawan.njm.get() ? "OTAA" : "ABP");

    delay(1000);
}