Year End 2024 Sale
Skip to main content

RAK Unified Interface V3 (RUI3) Serial Operating Modes

RAKwireless offers RAKwireless Unified Interface V3 (RUI3) which allows you to develop firmware for you RAKwireless devices and modules quickly and easily. RUI3 has APIs that you can use to create your own custom firmware on the module itself. You also have the option to use an external host microcontroller or microprocessor which sends commands via AT commands to RUI3 compatible module. The commands are sent via serial interface (abstracted as Serial Port) thru UART, USB, BLE and NFC.

This guide gives information and details about the three Serial Operating Modes of RUI3:

RUI3 Serial Operating Modes

AT Mode

It is designed for humans to configure devices interactively. It can also be used for M2M communication, but the transmission of big-sized human-readable text data is very inefficient. This is the easiest to understand on the three RUI3 serial modes because many other communication modems offers AT Command interfaces. In AT command mode, the RUI3 enabled device needs to wait for an external command coming from a host microcontroller or microprocessor.

For example, AT+APPEUI=? AT command will show the Device EUI.

AT+APPEUI=?
0102030405060708
OK

Custom Mode

The AT command has corresponding parsers to analyze every byte received from the serial port (in every command sent, there will be expected reply). In custom mode, you can disable AT Command and create your own set of command and write dedicated parsers for each custom commands you designed. This gives you flexibility in creating your own command. This mode requires you to use RUI3 APIs.

RAK Modules Default Serial Operating Mode

The default mode of every serial port can be switched to a new mode. After switching to a new mode, the new mode setting will be kept even if the device resets. Default serial port has AT command mode. The default serial port is also where firmware update is done.

RAK4630

RAK DeviceSerial PortSerial Instance AssignmentDefault Mode
RAK4630USB (Default serial port)SerialAT Command
UART1 (pin 19, 20)Serial0AT Command
UART2 (pin 15, 16)Serial1Custom Mode
BLEAT Command
RAK4631+RAK5005-OUSB (Default serial port)SerialAT Command
TX0/RX0 (Base board)Serial0AT Command
TX1/RX1 (Base board)Serial1Custom Mode
BLEAT Command

RAK3172

RAK DeviceSerial PortSerial Instance AssignmentDefault Mode
RAK3172UART2 (pin 1, 2) (Default serial port)Serial, Serial2AT Command
UART1 (pin 4, 5)Serial1Custom Mode
RAK3272SUART2 (J4 header pin 7, 8) (Default serial port)Serial, Serial2AT Command
UART1 (J5 header pin 5, 6)Serial1Custom Mode
RAK3372USB (Default serial port)Serial, Serial2AT Command
TX1/RX1 (Base board)Serial1Custom Mode

RAK3172-SiP

RAK DeviceSerial PortSerial Instance AssignmentDefault Mode
RAK3172-SiPUART2 (pin 29, 30) (Default serial port)Serial, Serial2AT Command
UART1 (pin 17, 18)Serial1Custom Mode
RAK3272-SiPUART2 (J3 header pin 7, 8) (Default serial port)Serial, Serial2AT Command
UART1 (J4 header pin 5, 6)Serial1Custom Mode

Switching Serial Operating Mode

After switching to a new mode, the new mode setting will be kept even if the device resets.

AT Command to Custom Mode

You need to use the RUI API Serial.begin to switch the serial operating mode to custom mode. There is no direct AT command to switch to custom mode. You have to upload a firmware that uses the RUI API to the device. For example, in switching the Serial1 to custom mode, you will need Serial1.begin(115200,RAK_CUSTOM_MODE).

Custom Mode to AT Command

AT+ATM command on a Serial Port will switch its serial operating mode to AT Command mode.

Serial Operating Mode Design Summary

AT Command ModeCustom Mode
Target UserHuman/MachineHuman/Machine
PurposeConfigure devicesCustomize serial port parser
BenefitFriendly interface for humanExtendable
DrawbackInefficient in M2M caseNeed to write parser from scratch
PrerequisiteNoNeed to setup IDE to write code