Skip to main content

RAK811 Breakout Board AT Command Manual

Introduction

The RAK811 Breakout Board is designed to simplify LoRaWAN and LoRa point-to-point (P2P) communication. To integrate LoRa technology into your projects, RAK811 has easy-to-use AT commands via a UART communication interface. Through these AT commands, you can set the parameters needed for LoRa P2P and LoRaWAN communication. You can even control the available GPIO pins and analog input of RAK811. You can also use any microcontroller with a UART interface to control the RAK811 Breakout Board.

The UART serial communication is exposed on the UART1 port through Pin 6 (TX1) and Pin 7 (RX1). The default parameters of the UART1 communication are 115200 / 8-N-1. The firmware upgrade is also possible through this port. To get familiar with the pin distribution of this module and find a schematic circuit of a reference application, refer to the RAK811 Breakout Board Datasheet. You can also see the complete RAK811 Breakout Board pin descriptions in Appendix IV.

The RAK811 Breakout Board also supports another serial port through the Pin 25 (TX3) and Pin 26 (RX3). This port is named UART3 with default parameters 115200 / 8-N-1. You can use UART3 as an alternative to UART1 when sending AT commands. You can also use UART3 when developing custom firmware via RUI. UART3 pins are not exposed on RAK811 Breakout Module. You can use RAK811 Breakout Board or RAK811 Evaluation Board if you need UART3 pins.

For AT commands example usage, you can check these sections of the Quick Start Guide:

AT Command Syntax

The AT command is based on ASCII characters. A command begins with the prefix AT or at and ends with <CR><LF> (i.e. \r\n). The maximum length is 255 characters, which includes the <CR><LF> characters at the end of the command. For the rest of the document, the \r\n part is omitted for the sake of clarity.

The AT commands can be classified into the following groups:

  • Read Command: Reads the current configuration or status of the module. The command name and the list of parameters are separated by = character. The <m> parameter is separated with its associated value <n> by the : character.
at+get_config=<m>:<n>
  • Write Command: Writes/Modifies the current configuration of the module. The command name and the list of parameters are separated by = character. The <m> parameter is separated with its associated value <n> by the : character.
at+set_config=<m>:<n>
  • Operational Command: Some commands are neither read nor write commands but are used to execute an action.
at+send=lora:<m>:<n> // Sends data through the LoRa transceiver.
  • Special Command: The RAK811 UART port has two operational modes: Configuration Mode (default mode) and Data Transmission Mode. Data transmission mode allows you to send ASCII payloads directly to the network server via UART without using any AT Command interface like at+send=lora:X:YYY. Data transmission mode is explained further on Interface Type AT Command section of this document.
NOTE

To enable data transmission mode, you need to input at+set_config=device:uart_mode:<index>:<mode> command. To switch back from data transmission mode to configuration mode (AT command default mode), the command to be entered is +++ and does not contain terminators such as \r and \n.

After the command is executed by the module, a reply is sent back to the external MCU. If the command is successful, the usual reply has the following format:

OK [information]\r\n
NOTE

Only Read Commands have information in the replied message, while Write Commands do not have an informative description.

The firmware developed running in the external MCU will expect at a minimum string of Ok\r\n after sending a successful command to the board. On the other hand, when the command is not successfully executed by the board, you will receive a response in the following format:

ERROR: [ErrCode]\r\n

Error Code Table

Error CodeDescription
1The last command received is an unsupported AT command.
2Invalid parameter in the AT command.
3There is an error when reading or writing the flash memory.
4There is an error when reading or writing through the IIC bus.
5There is an error when sending data through the UART port. Check if you exceed 256 bytes UART buffer.
80The LoRa transceiver is busy, could not process a new command.
81LoRa service is unknown. Unknown MAC command received by the node. Execute commands that are not supported in the current state, such as sending the at+join command in P2P mode.
82The LoRa parameters are invalid.
83The LoRa parameters are invalid.
84The LoRa data rate (DR) is invalid.
85The LoRa frequency and data rate are invalid.
86The device has not joined into a LoRa network.
87The length of the packet exceeded the maximum allowed by the LoRa protocol.
88Service is closed by the server. Due to the limitation of duty cycle, the server will send the "SRV_MAC_DUTY_CYCLE_REQ" MAC command to close the service.
89This is an unsupported region code.
90Duty cycle is restricted. Due to the duty cycle, data cannot be sent at this time until the time limit is removed.
91No valid LoRa channel could be found.
92No available LoRa channel could be found.
93Status is error. Generally, the internal state of the protocol stack is wrong.
94Time out reached while sending the packet through the LoRa transceiver.
95Time out reached while waiting for a packet in the LoRa RX1 window.
96Time out reached while waiting for a packet in the LoRa RX2 window.
97There is an error while receiving a packet during the LoRa RX1 window.
98There is an error while receiving a packet during the LoRa RX2 window.
99Failed to join into a LoRa network.
100Duplicate downlink message is detected. A message with an invalid downlink count is received.
101Payload size is not valid for the current data rate (DR).
102Many downlink packets are lost.
103Address fail. The address of the received packet does not match the address of the current node.
104Invalid MIC is detected in the LoRa message.

General AT Command

  1. at+version

This command is used to get the current firmware version number.

OperationCommandResponse
Readat+versionOK <version number>

Parameter: NONE

Example:

at+version\r\n
OK V3.0.0.14.H

  1. at+help

This command is used to obtain all AT commands supported by the current firmware.

OperationCommandResponse
Readat+helpOK <all AT commands>

Parameter: NONE

Example:

at+help\r\n

OK Device AT commands:

at+version
at+help
at+set_config=device:restart
at+set_config=device:sleep:X
at+get_config=device:status
at+set_config=device:uart:X:Y
at+set_config=device:uart_mode:X:Y
at+send=uart:X:YYY
at+set_config=device:gpio:X:Y
at+get_config=device:gpio:X
at+get_config=device:adc:X

LoRaWAN AT commands:

at+set_config=lora:default_parameters
at+join
at+send=lora:X:YYY
at+set_config=lora:region:XXX
at+get_config=lora:channel
at+set_config=lora:dev_eui:XXXX
at+set_config=lora:app_eui:XXXX
at+set_config=lora:app_key:XXXX
at+set_config=lora:dev_addr:XXXX
at+set_config=lora:apps_key:XXXX
at+set_config=lora:nwks_key:XXXX
at+set_config=lora:multicastenable:X
at+set_config=lora:multicast_dev_addr:XXXX
at+set_config=lora:multicast_apps_key:XXXX
at+set_config=lora:multicast_nwks_key:XXXX
at+set_config=lora:join_mode:X
at+set_config=lora:work_mode:X
at+set_config=lora:ch_mask:X:Y
at+set_config=lora:class:X
at+set_config=lora:confirm:X
at+set_config=lora:dr:X
at+set_config=lora:tx_power:X
at+set_config=lora:adr:X
at+get_config=lora:status
at+set_config=lora:dutycycle_enable:X
at+set_config=lora:send_repeat_cnt:X

LoRaP2P AT commands:

at+set_config=lorap2p:XXX:Y:Z:A:B:C
at+set_config=lorap2p:transfer_mode:X
at+send=lorap2p:XXX

  1. at+set_config=device:restart

This command is used to restart the device.

OperationCommandResponse
Readat+set_config=device:restart

Parameter: NONE

Example:

at+set_config=device:restart

LoRa (R) is a registered trademark or service mark of Semtech Corporation or its affiliates. LoRaWAN (R) is a licensed mark.

RAK811 Version:3.0.0.14.H
UART1 work mode: RUI_UART_NORMAL, 9600, N81
UART3 work mode: RUI_UART_NORMAL, 115200, N81
LoRa work mode: P2P
LoRa P2P Transfer_mode: Sender
Initialization OK

  1. at+set_config=device:sleep:<status>

This command is used to change the current state of the device between the sleep and the wake-up mode.

OperationCommandResponse
Writeat+set_config=device:sleep:<status>OK<STATUS>

Parameter:

Status 0: wake up
1: sleep

Example:

at+set_config=device:sleep:1\r\n
OK Sleep

at+set_config=device:sleep:0\r\n
OK Wake Up
NOTE

During sleep, Pin 7 (RX1) and Pin 26 (RX3) are automatically configured as wake up pins and in external interrupt mode with an internal pull-down resistor. Wake-up will be triggered by a rising edge on these RX pins.


  1. at+get_config=device:status

This command is used to obtain the current status of the device.

OperationCommandResponse
Readat+get_config=device:statusOK<information>

Parameter: None

Example:

at+get_config=device:status\r\n
OK Board Core:RAK811
MCU:STM32L151CBU6A
LoRa chip:SX1276

Interface Type AT Command

  1. at+set_config=device:uart:<index>:<baud_rate>

This command is used to configure the baud rate for a UART port.

NOTE

There will be no reply after executing this configuration if a different baud rate is set. To make your UART serial communication work again, configure the UART baud rate setting of the Serial Port Tool based on the new baud rate.

OperationCommandResponse
Writeat+set_config=device:uart:<index>:<baud_rate>OK

Parameter:

index UART Number: 1 or 3. Two UART ports are currently supported starting FW V3.0.0.14.H - UART1 and UART3
baud_rate UART Baud rate:1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200

Example:

at+set_config=device:uart:1:115200\r\n

  1. at+set_config=device:uart_mode:<index>:<mode>

This command is used to set the UART operation from AT configuration mode to data transmission mode.

During data transmission mode, all standard AT Commands will not work and the data that you sent to UART will go directly to the network server as ASCII payload with \r\n. If you input AZ, the network server will receive an uplink hex value of 415A0D0A. This means A=0x41, Z=0x5A, \r=0x0D and \n=0x0A.

NOTE

To switch back from data transmission mode to configuration mode, use +++ (+++ without \ r\ n).

OperationCommandResponse
Writeat+set_config=device:uart_mode:<index>:<mode>OK

Parameter:

indexUART Number: 1 or 3. Two UART ports are currently supported starting FW V3.0.0.14.H - UART1 and UART3
modeUART Mode: Only 1 can be selected, which means the UART is set to data transmission mode

Example:

at+set_config=device:uart_mode:1:1\r\n
OK

+++
OK

  1. at+send=uart:<index>:<data>

This command is used for sending data over a UART port.

OperationCommandResponse
Writeat+send=uart:<index>:<data>OK

Parameter:

index UART Number: 1 or 3. Two UART ports are currently supported starting FW V3.0.0.14.H - UART1 and UART3
mode The data you want to send. The maximum length of data is 250 characters, equivalent to 255 — the length of at+... — the length of \ r\ n.

Example:

at+send=uart:1:12345\r\n
OK

  1. at+get_config=device:gpio:<pin_num>

This command is used to obtain the voltage level status of a pin on a module.

OperationCommandResponse
Readat+get_config=device:gpio:<pin_num>OK<status>

Parameter:

pin_num Pin index of the module
(GPIO pins available on this Breakout board are Pin 2, Pin 3, Pin 4, Pin 5, Pin 8, Pin 9, Pin 14, Pin 15, Pin 16, Pin 20, Pin 22, and Pin 23 of the RAK811 module)
status(Return Value) 0: Low Voltage Level

1: High Voltage Level
Figure 8317: GPIO Pinout Mapping for RAK811 Breakout Board

Example:

at+get_config=device:gpio:2\r\n
OK 1

  1. at+set_config=device:gpio:<pin_num>:<status>

This command is used to set the voltage level state (high or low) of a pin on a board.

OperationCommandResponse
Writeat+set_config=device:gpio:<pin_num>:<status>OK

Parameter:

pin_numPin index of the module (GPIO pins available on this Breakout board are Pin 2, Pin 3, Pin 4, Pin 5, Pin 8, Pin 9, Pin 14, Pin 15, Pin 16, Pin 20, Pin 22, and Pin 23 of the RAK811 module) Please refer on Figure 1.
status0: Low Voltage Level 1: High Voltage Level

Example:

at+set_config=device:gpio:2:0\r\n
OK

  1. at+get_config=device:adc:<pin_num>

This command is used to obtain the voltage level of an ADC pin of the board.

OperationCommandResponse
Readat+get_config=device:adc:<pin_num>OK<voltage>

Parameter:

pin_num ADC pin index of the module
(ADC pins available on this Breakout board are different between high and low-frequency modules.
- For low-frequency modules, the ADC pins are Pin 2, Pin 3, Pin 4, Pin 5, Pin 15, Pin 20, Pin 22, and Pin 23
- For high-frequency modules, the ADC pins are in 2, Pin 3, Pin 4, Pin 20, Pin 22, and Pin 23)
Voltage(Return Value) Voltage,Unit: mV
Figure 8318: ADC Pinout of the RAK811 Breakout board on Low-frequency modules
Figure 8319: ADC Pinout of the RAK811 Breakout board on High-frequency modules

Example:

at+get_config=device:adc:2\r\n
OK 1663mV

LoRaWAN Type AT Command

  1. at+join

This command is used to join a LoRaWAN network.

OperationCommandResponse
at+joinOK Join Success

Parameter: NONE

Example:

at+join\r\n
OK Join Success

  1. at+send=lora:<port>:<data>

This command is used to send data via LoRaWAN.

OperationCommandResponse
at+send=lora:<port>:<data>OK

Parameter:

port Sending port of LoRa. The value range is 1-223.
data The sending data format is in hexadecimal format. The possible values are between 00-FF. The module will internally cast every two characters into a byte before sending it to the LoRa transceiver. The maximum length varies depending on the band frequency and DR (LoRaWAN standard). Refer to Appendix III.

Example:

When sending data as unconfirmed uplink:

at+send=lora:1:5A00\r\n
OK

When sending data as confirmed uplink:

at+send=lora:1:5A00\r\n
OK
at+recv=0,-105,-12,0
NOTE

When sending a confirmed message, you will receive an ACK response, i.e. at+recv=.... The 0, -105, -12,0 stands for:

  • 0: For the LoRa port;
  • -105: For the RSSI;
  • -12: For the SNR;
  • 0: For the length of the data (no valid data in ACK).

  1. at+set_config=lora:region:<region>

This command is used for setting the appropriate working frequency band.

OperationCommandResponse
Writeat+set_config=lora:region:<region>OK

Parameter:

region EU433, CN470, IN865, EU868, US915, AU915, KR920, AS923. The default is EU868.

Example:

at+set_config=lora:region:EU868\r\n
OK
NOTE

In the AS923 frequency band, the supported frequency plan is "as2" and dwell is set to 1.


  1. at+get_config=lora:channel

This command is used to read all the LoRa channel information given the current region configured on the board.

OperationCommandResponse
Readat+get_config=lora:channelOK <channel information>

Parameter: NONE

Example: EU868 region

at+get_config=lora:channel\r\n
OK *0,on,868100000,0,5; *1,on,868300000,0,5; *2,on,868500000,0,5; 3,off,0,0,0; 4,off,0,0,0; 5,off,0,0,0; 6,off,0,0,0; 7,off,0,0,0; *8,on,867100000,0,5; *9,on,867300000,0,5; *10,on,867500000,0,5; *11,on,867700000,0,5; *12,on,867900000,0,5; 13,off,0,0,0; 14,off,0,0,0; 15,off,0,0,0
NOTE

With "*0,on,868100000,0,5" as an example,the following is the channel parameter analysis:

  • * at the beginning, if the channel is open;
  • 0 is the channel ID;
  • on indicates the current status of the channel;
  • 868100000 is the actual frequency of the channel,unit is Hz;
  • 0,5 indicates the DR of the channel, DR0~DR5.

  1. at+set_config=lora:ch_mask:<channel_number>:<status>

This command is used for switching a channel (turn on or off) in the current region.

OperationCommandResponse
Writeat+set_config=lora:ch_mask:<channel_number>:<status>OK

Parameter:

channel_number Channel number
status 0: off
1: on

Example:

at+set_config=lora:ch_mask:0:0\r\n
OK

  1. at+set_config=lora:dev_eui:<dev_eui>

This command is used to set the Device EUI parameter for the LoRaWAN OTAA mode.

OperationCommandResponse
Writeat+set_config=lora:dev_eui:<dev_eui>OK

Parameter:

dev_eui Device EUI

Example:

at+set_config=lora:dev_eui:3530353064377716\r\n
OK

  1. at+set_config=lora:app_eui:<app_eui>

This command is used to set the Application EUI parameter for the LoRaWAN OTAA mode.

OperationCommandResponse
Writeat+set_config=lora:app_eui:<app_eui>OK

Parameter:

app_eui Application EUI
NOTE

All zero value Application EUI at+set_config=lora:app_eui:0000000000000000 is not supported and will return error.

Example:

at+set_config=lora:app_eui:0000000000000001\r\n
OK

  1. at+set_config=lora:app_key:<app_key>

This command is used to set the Application Key parameter for the LoRaWAN OTAA mode.

OperationCommandResponse
Writeat+set_config=lora:app_key:<app_key>OK

Parameter:

app_key Application Key

Example:

at+set_config=lora:app_key:841986913ACD00BBC2BE2479D70F3228\r\n
OK

  1. at+set_config=lora:dev_addr:<dev_addr>

This command is used to set the Device Address parameter for the LoRaWAN ABP mode.

OperationCommandResponse
Writeat+set_config=lora:dev_addr:<dev_addr>OK

Parameter:

dev_addr Device Address

Example:

at+set_config=lora:dev_addr:260125D7\r\n
OK

  1. at+set_config=lora:apps_key:<apps_key>

This command is used to set the Application Session Key parameter for the LoRaWAN ABP mode.

OperationCommandResponse
Writeat+set_config=lora:apps_key:<apps_key>OK

Parameter:

apps_key Application Session Key

Example:

at+set_config=lora:apps_key:841986913ACD00BBC2BE2479D70F3228\r\n
OK

  1. at+set_config=lora:nwks_key:<nwks_key>

This command is used to set the Network Session Key parameter for the LoRaWAN ABP mode.

OperationCommandResponse
Readat+set_config=lora:nwks_key:<nwks_key>OK

Parameter:

nwks_key Network Session Key

Example:

at+set_config=lora:nwks_key:69AF20AEA26C01B243945A28C9172B42\r\n
OK

  1. at+set_config=lora:multicastenable:<IsEnable>
OperationCommandResponse
Writeat+set_config=lora:multicastenable:<IsEnable>OK

Parameter:

IsEnable 0: disable
1: enable
The default is disable.

Example:

at+set_config=lora:multicastenable:1\r\n
OK

  1. at+set_config=lora:multicast_dev_addr:<multicast_dev_addr>

This command is used for setting the Device Address for the multicast feature.

OperationCommandResponse
Writeat+set_config=lora:multicast_dev_addr:<multicast_dev_addr>OK

Parameter:

multicast_dev_addr Multicast Device Address

Example:

at+set_config=lora:multicast_dev_addr:260111fd\r\n
OK

  1. at+set_config=lora:multicast_apps_key:<multicast_apps_key>

This command is used for the setting of the Application Session Key for the multicast feature.

OperationCommandResponse
Writeat+set_config=lora:multicast_apps_key:<multicast_apps_key>OK

Parameter:

multicast_app_addr Multicast Application Session Key

Example:

at+set_config=lora:multicast_apps_key:F13DDFA2619B10411F02F042E1C0F356\r\n
OK

  1. at+set_config=lora:multicast_nwks_key:<multicast_nwks_key>

This command is used to set the Network Session Key for the multicast feature.

OperationCommandResponse
Writeat+set_config=lora:multicast_nwks_key:<multicast_nwks_key>OK

Parameter:

multicast_nwks_key Multicast Network Session Key

Example:

at+set_config=lora:multicast_nwks_key:1D1991F5377C675879C39B6908D437A6\r\n
OK

  1. at+set_config=lora:join_mode:<mode>

This command is used to switch the LoRaWAN access mode between the OTAA and the ABP mode.

OperationCommandResponse
Writeat+set_config=lora:join_mode:<mode>OK

Parameter:

mode Activation mode
0: OTAA
1: ABP
The default is OTAA.

Example:

at+set_config=lora:join_mode:1\r\n
OK

  1. at+set_config=lora:class:<class>

This command is used to set LoRaWAN class to Class A, Class B, or Class C.

OperationCommandResponse
Writeat+set_config=lora:class:<class>OK

Parameter:

class 0: Class A
1: Class B (Not supported at this time)
2: Class C
The default is Class A.

Example:

at+set_config=lora:class:0\r\n
OK

  1. at+set_config=lora:confirm:<type>

This command is used for setting the type of messages to be sent: Confirmed/Unconfirmed.

OperationCommandResponse
Writeat+set_config=lora:confirm:<type>OK

Parameter:

type 0: unconfirm type
1: confirm type
The default is unconfirm type.

Example:

at+set_config=lora:confirm:0\r\n
OK
  1. at+set_config=lora:dr:<dr>

This command is used to set the data rate (DR) of LoRa.

OperationCommandResponse
Writeat+set_config=lora:dr:<dr>OK

Parameter:

dr The data rate of LoRa is related to the current region. In most of the LoRa areas, it is common to use 0 to 5. Detailed reference can be made to LoRaWAN 1.0.2 specification.

  1. at+set_config=lora:tx_power:<tx_power>

This command is used to set the RF transmission power level of the LoRa transceiver.

OperationCommandResponse
Writeat+set_config=lora:tx_power:<tx_power>OK

Parameter:

tx_power Refer to Appendix II for possible values of tx_power. The table of Appendix II is based on LoRaWAN 1.0.2 specification. LoRa transmit power level varies depending on frequency band.

If the resulting TX power is higher than the capability of LoRa Radio, the output power will be based on the max TX power of the LoRa Radio in the module. For RAK811 module, the max TX power is 20dBm. Take note of this when using regional bands with MaxEIRP higher than 20dBm like US915, AU915 and IN865 whose MaxEIRP is 30dBm.

The default setting is 0.

Example:

at+set_config=lora:tx_power:0\r\n
OK

  1. at+set_config=lora:adr:<status>

This command is used to turn on/off the ADR feature of the LoRa communication.

OperationCommandResponse
Writeat+set_config=lora:adr:<status>OK

Parameter:

status 0: Turn off
1: Turn on
The default is on.

Example:

at+set_config=lora:adr:0\r\n
OK

  1. at+get_config=lora:status

This command is used to get all the information related to the current LoRa status, except the channel information.

OperationCommandResponse
Readat+get_config=lora:statusOK <lora status detail>

Parameter: NONE

Example:

at+get_config=lora:status\r\n
OK Work Mode: LoRaWAN
Region: EU868
Send_interval: 600s
Auto send status: false.
MulticastEnable: true.
Multi_Dev_Addr: 260111FD
Multi_Apps_Key: F13DDFA2619B10411F02F042E1C0F356
Multi_Nwks_Key: 1D1991F5377C675879C39B6908D437A6
Join_mode: OTAA
DevEui: 0000000000000888
AppEui: 0000000000000888
AppKey: 00000000000008880000000000000888
Class: C
Joined Network:false
IsConfirm: unconfirm
AdrEnable: true
EnableRepeaterSupport: false
RX2_CHANNEL_FREQUENCY: 869525000, RX2_CHANNEL_DR:0
RX_WINDOW_DURATION: 3000ms
RECEIVE_DELAY_1: 1000ms
RECEIVE_DELAY_2: 2000ms
JOIN_ACCEPT_DELAY_1: 5000ms
JOIN_ACCEPT_DELAY_2: 6000ms
Current Datarate: 4
Primeval Datarate: 4
ChannelsTxPower: 0
UpLinkCounter: 0
DownLinkCounter: 0

  1. at+set_config=lora:dutycycle_enable:<status>

This command is used to enable or disable the Duty Cycle feature.

OperationCommandResponse
Writeat+set_config=lora:dutycycle_enable:<status>OK

Parameter:

status 0: disable
1: enable
The default is disable.

Example:

at+set_config=lora:dutycycle_enable:1\r\n
OK

  1. at+set_config=lora: send_repeat_cnt:<num>

This command is used to set the number of retransmitting attempts on an uplink message. When activated, the board will resend a message if its corresponding ACK (downlink) is not received after sending a confirmed uplink message. The default value is 0, which means that the board will not resend any message by default.

OperationCommandResponse
Writeat+set_config=lora: send_repeat_cnt:<num>OK

Parameter:

num Number of retries, up to 8.
The default is 0.

Example:

at+set_config=lora:send_repeat_cnt:1\r\n
OK

  1. at+set_config=lora:default_parameters

This command is used to restore OTAA, ABP, multicast related network access parameters set at the factory, including dev_eui,app_eui, etc.

OperationCommandResponse
Writeat+set_config=lora:default_parametersOK

Parameter: NONE

Example:

at+set_config=lora:default_parameters\r\n
OK

LoRa P2P Type AT Command

  1. at+set_config=lora:work_mode:<mode>

This command is used to switch the LoRa work mode between the LoRaWAN and the LoRa P2P mode. This command will cause the module to restart.

OperationCommandResponse
Writeat+set_config=lora:work_mode:<mode>

Parameter:

mode Work mode of LoRa
0: LoRaWAN
1: LoRa P2P

The default is LoRaWAN mode.

Example

at+set_config=lora:work_mode:1\r\n
UART1 work mode: RUI_UART_NORMAL
Current work_mode:P2P
Initialization OK

  1. at+set_config=lorap2p:<frequency>:<spreadfact>:<bandwidth>:<codingrate>:<preamlen>:<power>

This command is used to set the relevant parameters of LoRa P2P mode and is only valid when the LoRa mode is switched to LoRa P2P before.

OperationCommandResponse
Writeat+set_config=lorap2p:<frequency>:<spreadfact>:<bandwidth>:<codingrate>:<preamlen>:<power>OK

Parameter:

frequencyFrequency, the unit is Hz
The default is 869525000 Hz.
spreadfactSpreading factor
The default is 12.
bandwidth0: 125 kHz
1: 250 kHz
2: 500 kHz

The default is 0.
codingrate1: 4/5
2: 4/6
3: 4/7
4: 4/8

The default is 1.
preamblePreamble Length. 5~65535
The default is 8.
powerTX power. The unit is in dBm. 5~20
The default is 20.

Example

at+set_config=lorap2p:869525000:12:0:1:8:20\r\n
OK

  1. at+set_config=lorap2p:transfer_mode:<mode>

This command is used to switch the state of the LoRa transceiver between sending and receiving state, and it is only valid when the LoRa mode is set to LoRa P2P before.

OperationCommandResponse
Writeat+set_config=lorap2p: transfer_mode:<mode>OK

Parameter

mode1: receiver mode
2: sender mode

The default is sender mode.

Example

at+set_config=lorap2p:transfer_mode:1\r\n
OK

  1. at+send=lorap2p:<data>

This command is used to send data through LoRa P2P and is only valid when the LoRa work mode is set to LoRa P2P before.

OperationCommandResponse
Sendat+send=lorap2p:<data>OK

Parameter

dataThe data to be sent, and the format is hexadecimal.

Example

at+send=lorap2p:1234\r\n
OK

In LoRa P2P mode, the receiving node receives the data and outputs the data in the following format:

at+recv=<RSSI>,<SNR>,<Data Length>:<Data>

Appendix

Appendix I: Data Rate by Region

EU433/EU868/AS923
Data RateConfigurationIndicative Physical Bit Rate [bit/s]
0LoRa: SF12 / 125 kHz250
1LoRa: SF11 / 125 kHz440
2LoRa: SF10 / 125 kHz980
3LoRa: SF9 / 125 kHz1760
4LoRa: SF8 / 125 kHz3125
5LoRa: SF7 / 125 kHz5470
6LoRa: SF7 / 250 kHz11000
7FSK: 50 kbps50000
8 ~ 15RFU

CN470/KR920
Data RateConfigurationIndicative Physical Bit Rate [bit/s]
0LoRa: SF12 / 125 kHz250
1LoRa: SF11 / 125 kHz440
2LoRa: SF10 / 125 kHz980
3LoRa: SF9 / 125 kHz1760
4LoRa: SF8 / 125 kHz3125
5LoRa: SF7 / 125 kHz5470
6 ~ 15RFU

US915
Data RateConfigurationIndicative Physical Bit Rate [bit/s]
0LoRa: SF10 / 125 kHz980
1LoRa: SF9 / 125 kHz1760
2LoRa: SF8 / 125 kHz3125
3LoRa: SF7 / 125 kHz5470
4LoRa: SF8 / 500 kHz12500
5 ~ 7RFU
8LoRa: SF12 / 500 kHz980
9LoRa: SF11 / 500 kHz1760
10LoRa: SF10 / 500 kHz3900
11LoRa: SF9 / 500 kHz7000
12LoRa: SF8 / 500 kHz12500
13LoRa: SF7 / 500 kHz21900
14 ~ 15RFU

AU915
Data RateConfigurationIndicative Physical Bit Rate [bit/s]
0LoRa: SF12 / 125 kHz250
1LoRa: SF11 / 125 kHz440
2LoRa: SF10 / 125 kHz980
3LoRa: SF9 / 125 kHz1760
4LoRa: SF8 / 125 kHz3125
5LoRa: SF7 / 125 kHz5470
6LoRa: SF8 / 500 kHz12500
7RFURFU
8LoRa: SF12 / 500 kHz980
9LoRa: SF11 / 500 kHz1760
10LoRa: SF10 / 500 kHz3900
11LoRa: SF9 / 500 kHz7000
12LoRa: SF8 / 500 kHz12500

IN865
Data RateConfigurationIndicative Physical Bit Rate [bit/s]
0LoRa: SF12 / 125 kHz250
1LoRa: SF11 / 125 kHz440
2LoRa: SF10 / 125 kHz980
3LoRa: SF9 / 125 kHz1760
4LoRa: SF8 / 125 kHz3125
5LoRa: SF7 / 125 kHz5470
6RFURFU
7FSK: 50 kbps50000
8 ~ 15RFURFU

Appendix II: TX Power by Region

EU868

By default, MaxEIRP is considered to be +16 dBm.

TXPowerConfiguration (EIRP)
0MaxEIRP
1MaxEIRP - 2 dB
2MaxEIRP - 4 dB
3MaxEIRP - 6 dB
4MaxEIRP - 8 dB
5MaxEIRP - 10 dB
6MaxEIRP - 12 dB
7MaxEIRP - 14 dB
8 ~ 15RFU

US915

By default, MaxEIRP is considered to be +30 dBm based on LoRa Alliance specification. However, the module's max TX power is only up to 20 dBm.

TXPowerConfiguration (Conducted Power)
0MaxEIRP
1MaxEIRP - 2 dB
2MaxEIRP - 4 dB
3 ~ 9
1010 dBm
11 ~ 15RFU

AU915

By default, MaxEIRP is considered to be +30 dBm based on LoRa Alliance specification. However, the module's max TX power is only up to 20 dBm.

TXPowerConfiguration (EIRP)
0MaxEIRP
1 ~ 10MaxEIRP - 2*TXPower
11 ~ 10RFU

KR920

By default, MaxEIRP is considered to be +14 dBm.

TXPowerConfiguration (EIRP)
0MaxEIRP
1MaxEIRP - 2 dB
2MaxEIRP - 4 dB
3MaxEIRP - 6 dB
4MaxEIRP - 8 dB
5MaxEIRP - 10 dB
6MaxEIRP - 12 dB
7MaxEIRP - 14 dB
8 ~ 15RFU

AS923

By default, Max EIRP shall be 16 dBm.

TXPowerConfiguration (EIRP)
0MaxEIRP
1MaxEIRP - 2 dB
2MaxEIRP - 4 dB
3MaxEIRP - 6 dB
4MaxEIRP - 8 dB
5MaxEIRP - 10 dB
6MaxEIRP - 12 dB
7MaxEIRP - 14 dB
8 ~ 15RFU

IN865

By default, MaxEIRP is considered to be +30 dBm based on LoRa Alliance specification. However, the module's max TX power is only up to 20 dBm.

TXPowerConfiguration (EIRP)
0MaxEIRP
1MaxEIRP - 2 dB
2MaxEIRP - 4 dB
3MaxEIRP - 6 dB
4MaxEIRP - 8 dB
5MaxEIRP - 10 dB
6MaxEIRP - 12 dB
7MaxEIRP - 14 dB
8MaxEIRP - 16 dB
9MaxEIRP - 18 dB
10MaxEIRP - 20 dB
11 ~ 15RFU

CN470

By default, MaxEIRP is considered to be +19.15 dBm.

TXPowerConfiguration (EIRP)
0MaxEIRP
1MaxEIRP - 2 dB
2MaxEIRP - 4 dB
3MaxEIRP - 6 dB
4MaxEIRP - 8 dB
5MaxEIRP - 10 dB
6MaxEIRP - 12 dB
7MaxEIRP - 14 dB
8 ~ 15RFU

EU433

By default, MAxEIRP is considered to be +12.15 dBm.

TXPowerConfiguration (EIRP)
0MaxEIRP
1MaxEIRP - 2 dB
2MaxEIRP - 4 dB
3MaxEIRP - 6 dB
4MaxEIRP - 8 dB
5MaxEIRP - 10 dB
6 ~ 15RFU

Appendix III: Maximum Transmission Load by Region

NOTE

The LoRaWAN stack adds 8 bytes to the user payload. In the following list, M is the maximum payload size and N is the maximum usable payload size for the user data without the MAC header.

EU868
Data RateMN
05951
15951
25951
3123115
4250242
5250242
6250242
7250242
8 ~ 15Not DefinedNot Defined

US915
Data RateMN
01911
16153
2133125
3250242
4250242
5 ~ 7Not DefinedNot Defined
86153
9137129
10250242
11250242
12250242
13250242
14 ~ 15Not DefinedNot Defined

AU915
Data RateMN
05951
15951
25951
3123115
4250242
5250242
6250242
7Not DefinedNot Defined
86153
9137129
10250242
11250242
12250242
13250242
14 ~ 15Not DefinedNot Defined

KR920
Data RateMN
05951
15951
25951
3123115
4250242
5250242
6 ~ 15Not DefinedNot Defined

AS923
Data RateUplink MAC Payload Size (M)Downlink MAC Payload Size (M)
UplinkDwellTime = 0UplinkDwellTime = 1DownlinkDwellTime = 0DownlinkDwellTime = 1
059N/A59N/A
159N/A59N/A
259195919
31236112361
4250133250133
5250250250250
6250250250250
7250250250250
8RFURFU

IN865
Data RateMN
05951
15951
25951
3123115
4250242
5250242
6250242
7250242
8 ~ 15Not DefinedNot Defined

CN470
Data RateMN
05951
15951
25951
3123115
4250242
5250242
6 ~ 15Not DefinedNot Defined

EU433
Data RateMN
05951
15951
25951
3123115
4250242
5250242
6250242
7250242
8 ~ 15Not DefinedNot Defined

Appendix IV: Pin Description of RAK811 Breakout Board

The pin definition of the RAK811 Breakout Board can be reviewed in the Pin Definition section of the Datasheet.

Listed are the summary of the pins of the RAK811 Breakout Board:

NOTE

Not all pins of the RAK811 module are exposed on the RAK811 Breakout board header connectors. Below are the pins available on the RAK811 Module that is on this Breakout board. For complete RAK811 module pinouts information, refer to the datasheet.

  1. About the UART Pin:

    • Pin 7 (RX1) and Pin 6 (TX1) are reserved for UART1.
    • Pin 26 (RX3) and Pin 25 (TX3) are reserved for UART3.
    • During sleep, Pin 7 (RX1) and Pin 26 (RX3) are automatically configured as wake-up pins and in external interrupt mode with internal pull-down resistor. Wake-up will be triggered by a rising edge on these RX pins.
  2. About the SWD debug Pin: Pin 10 (SWDIO) and Pin 13 (SWCLK) are used for SWD connection.

  3. About the power Pin: The power pin on the RAK811 module includes the VCC pin on Pin 11, and Ground pins (GND) are on the Pin 1, Pin 12, Pin 21, Pin 28, Pin 29, Pin 30, Pin 31, Pin 32, and Pin 34.

  4. About the reset Pin: The reset pin on the RAK811 module is Pin 24 (RST).

  5. About the BOOT Pin: The boot Pin on the RAK811 module is Pin 17 (BOOT0).

  6. About the RF antenna Pin: The RF antenna Pin on the RAK811 module is Pin 33 (RF_OUT).

  7. About the ADC Pin: The ADC pins available on the RAK811 are different between the high and low-frequency modules.

  • In the low-frequency modules, the ADC Pins are the following:

    • Pin 2 (PB12)
    • Pin 3 (PB14)
    • Pin 4 (PB15)
    • Pin 5 (PB13)
    • Pin 15 (PA3)
    • Pin 20 (PA2)
    • Pin 22 (PA1)
    • Pin 23 (PA0)
  • In the high-frequency modules, the ADC Pins are the following:

    • Pin 2 (PB12)
    • Pin 3 (PB14)
    • Pin 4 (PB15)
    • Pin 20 (PA2)
    • Pin 22 (PA1)
    • Pin 23 (PA0)
  1. About the GPIO Pin: The GPIO pins available on the RAK811 module are the following:
    • Pin 2
    • Pin 3
    • Pin 4
    • Pin 5
    • Pin 8
    • Pin 9
    • Pin 14
    • Pin 15
    • Pin 16
    • Pin 20
    • Pin 22
    • Pin 23
NOTE

If you want to use the RAK811 Breakout Board to make a product, you should understand how to upgrade the RAK811 firmware in the future. As mentioned, the firmware of the RAK811 Breakout Board can be upgraded through the SWD or UART1 port. Both require a general-purpose PC.