RUI3 (RAK Unified Interface 3) - RAK4631
RAKLorawan::band

Public Member Functions

int32_t get ()
 
bool set (uint8_t value)
 

Detailed Description

Description
This api set number corresponding to active regions
Note
0: EU433
1: CN470
2: RU864
3: IN865
4: EU868
5: US915
6: AU915
7: KR920
8: AS923-1
9: AS923-2
10:AS923-3
11:AS923-4

Member Function Documentation

◆ get()

int32_t get ( )
Description
This api get number corresponding to active regions
Syntax
api.lorawan.band.get()
Returns
the active region
Return values
0EU433
1CN470
2RU864
3IN865
4EU868
5US915
6AU915
7KR920
8AS923-1
9AS923-2
10AS923-3
11AS923-4
Example
  void setup()
  {
      Serial.begin(115200);

      Serial.printf("Set LoRa region %s\r\n", api.lorawan.band.set(4) ? "Success" : "Fail");
  }

  void loop()
  {
      Serial.printf("LoRa region = %d\r\n", api.lorawan.band.get());

      delay(1000);
  }

◆ set()

bool set ( uint8_t  value)
Description
This api set number corresponding to active regions
Syntax
api.lorawan.band.set(value)
Parameters
valuethe active region to set
Returns
bool
Return values
TRUEfor setting active region success
FALSEfor setting active region failure
Example
  void setup()
  {
      Serial.begin(115200);

      Serial.printf("Set LoRa region %s\r\n", api.lorawan.band.set(4) ? "Success" : "Fail");
  }

  void loop()
  {
      Serial.printf("LoRa region = %d\r\n", api.lorawan.band.get());

      delay(1000);
  }