RAK RAK7431 Manuel utilisateur

Documentation Center
Quick Start Guide
Prerequisite
What do you need?
Before going through each and every step in the installation guide of the RAK7431 WisNode Bridge Serial, make
sure to prepare the necessary items listed below:
Hardware Tools
1. RAK7431 WisNode Bridge Serial
2. Micro USB Cable
3. Gateway in Range, for Testing
4. A Windows/Mac OS/Linux Computer
Software Tools
RAK Serial Port Tool
MQTTfx Tool
Product Configuration
Typical Network Application
RAK7431 converts data from the RS485 protocol into LPWAN wireless messages and delivers it to a cloud server
through an LPWAN gateway. Cloud servers can also proactively send data to RAK7431 for two-way data
transmission. Using the RAK7431, you can convert data from a conventional RS485 wired network to a wireless
network.
Figure 1: Example communication with RS485 enabled devices
Connect the RAK7431 to the Sensor
Power Interface Configuration
The RAK7431 device can be powered either by:
DC (VIN/GND) terminals
Micro USB.

Documentation Center
The DC screw terminals are supporting 8 to 48 VDC. The Micro USB port can be used to power the RAK7431, up
to 5 V / 500 mA DC. At the same time, the USB port is used as the configuration port for the device. Using the
USB cable to connect the RAK7431 to a computer’s USB port, you can import your configuration settings.
📝
NOTE
The Micro USB port can be used only for powering the device. It cannot provide power to VOUT and
power other devices in the RS485 network.
Figure 2: RAK7431 bridge with connected sensor and power supply
Data Interface Configuration
The RAK7431 - RS485 serial interface can support up to 16 RS485 devices. VOUT on the data interface can
supply external power to the RS485 connected devices (only when the device is powered from the DC input). The
VOUT output voltage is the same as the DC input voltage VIN.
Figure 3: RAK7431 Interface pin definition
Gateway Connection Settings
In this section, the RAK7431 WisNode Bridge Serial shall be connected into the RAKwireless Gateway. For this
demonstration, a RAK7249 WisGate Edge Max shall be used. Listed below are the requisites for this section.

Documentation Center
RAK Serial Port Tool - used to configure the RAK7431 WisNode Bridge Serial
Web Management Platform Documentation - guide on how to configure the RAK7249 WisGate Edge Max
Gateway Configuration
Set-up the Built-in Network Server
1. Sign in to the gateway by following the Accessing the Web Management section of the WEB Management
Platform documentation.
2. Setup the RAK7249 WisGate Edge Max using its Built-in Network Server by following this guide.
Adding Application
1. To enter the application configuration interface click: LoRaNetwork > Application. Enter a name for the
application and click the Add button.
Figure 4: Create Application in the Buil-In Network Server
2. Turn on the Auto Add LoRa Device slider.
3. Generate Application EUI and Application Key by pressing the generate icon marked in the image below.
📝
NOTE
The description is optional.

Documentation Center
Figure 5: Registering an application
4. After which, press Save & Apply.
5. You will be returned to the Application page. Select Edit on the created application.
Figure 6: Application list
6. Enter the Device EUI and press Add.
📝
NOTE
The RAK7431 Device EUI can be seen at the label on the back
Figure 7: Adding the RAK7431

Documentation Center
7. On the next page, select the settings provided below:
LoRaWAN Class: C
Join Mode: OTAA
Description: Optional
Figure 8: Adding the RAK7431 to the Built-In Server
RAK7431 Configuration
Connect the RAK7431 to your Network
1. Connect the RAK7431 to a computer using the Micro USB cable.
2. Open the RAK Serial Tool and select the correct COM port. The default baud rate is 115200.
3. After selecting, press Open.
Figure 9: RAK Serial Tool
To set up the Device EUI, run the command:

Documentation Center
To check the Device EUI run:
To set up the Application EUI run the command:
To set up the Application Key run the command:
To check the previously configured Application EUI and Key, run the commands:
Figure 10: Configuring the RAK7431
Set the Frequency Region
The node supports the following Regional Frequencies:
AT+DEVEUI=<Device EUI>
AT+DEVEUI
AT+APPEUI=<application EUI>
AT+APPKEY=<application Key>
AT+APPEUI
AT+APPKEY
sh
sh
sh
sh
sh
sh

Documentation Center
EU433
CN470
CN470ALI
RU864
IN865
EU868
US915
AU915
KR920
AS923
For this demonstration, EU868 shall be used. To set the desired regional frequency band use the command:
📝
NOTE
The regional frequency settings need to be consistent with the RAK commercial gateway supported band.
Data Serial Port Rate Setting
📝
NOTE
The baud rate setting needs to be consistent with the baud rate of the sensor, which is 9600.
The AT command for execution is:
Operating and Activation Mode Settings
1. Supported operating modes are two: Class A and Class C. To set the operating mode (Class C in this case),
you need to execute the AT command:
📝
NOTE
The changes take effect as soon as they are made.
2. Activation mode supports the following two modes: ABP and OTAA. To set the activation mode (OTAA in this
case), you need to execute the AT command:
AT+REGION=EU868
AT+BAUDRATE=9600
AT+CLASS=C
AT+JOINMODE=OTAA
sh
sh
sh
sh

Documentation Center
3. Restart is needed for the modification to take effect. To restart the RAK7431, execute the command:
4. If everything is configured right, after the execution of the restart command this output pops up in the RAK
Serial Tool:
Figure 11: RAK7431 Successful Join
Configure RAK7431 Working Modes
Data Transparent Mode
When the RS485 data interface works in Modbus mode, the data encapsulation format can be divided into two
types: transparent mode and non-transparent mode.
In transparent mode, the Modbus execution instruction response data (data, received by the node) will be
directly forwarded through the LoRaWAN network.
In the non-transparent mode, the Modbus execution instruction response data (data, received by the node)
will be encapsulated in the message header according to the Modbus protocol, and then transmitted to the
server through LoRaWAN.
📝
NOTE
The non-transparent mode is the default one.
Enter the following AT command in the RAK Serial Tool to change the mode:
AT+RESTART
AT+TRANSPARENT=n
sh
sh

Documentation Center
📝
NOTE
The change takes effect immediately after modification.
Scheduled Polling Function
When the device works in MODBUS mode, it supports the scheduled polling function.
This means that the device will perform a polling operation every given period (polling cycle). During polling, the
device will send the pre-added MODBUS instructions in turn and forward the corresponding response data through
the LoRaWAN network.
The device turns on the scheduled polling by default. The AT command for this is:
📝
NOTE
The modification takes effect after restart.
Figure 12: Scheduled polling example
Scheduled Polling Cycle
This command sets/reads the scheduled polling cycle. This command only works if scheduled polling is enabled.
The modification takes effect after the next polling cycle or a restart.
n Condition
0 transparent mode is turned off
1 it is turned on
n Condition
0 turns scheduled polling off
1 turns it on
AT+ENABLEPOLL=n
sh

Documentation Center
Example: To set the polling cycle to 60 seconds, use this command:
RAK7431 supports polling mode, which stores up to 32 query instructions at a maximum length of 128 bytes per
instruction. Polling intervals and wait times can be adjusted as needed. RAK7431 converts the data returned by
the RS485 node into a LoRaWAN message, which can be sent to the LoRaWAN gateway as is or encapsulated. In
transparent mode, the data for the RS485 is sent in the payload of the LoRa message as is, and in non-
transparent mode, the data of RS485 is encapsulated in the LoRa message with a header and validation.
Add Polling Instructions
To add polling instruction, execute the AT command:
According to the temperature and humidity register address of the temperature and humidity sensor in the
example and the RS485 address, the polling instruction should be:
Example: If you have added multiple RS485 temperature and humidity sensors, continue to increase the polling
instructions based on the RS485 address and register address, for example:
RS485 Temperature and humidity sensor addr: 01, Polling 1: 010300000002C40B
RS485 Temperature and humidity sensor addr: 04, Polling 2: 040300000002C45E
RS485 Temperature and humidity sensor addr: 08, Polling 3: 080300000002C492
RS485 Temperature and humidity sensor addr: 0F, Polling 4: 0F0300000002C525
You will need to increase the polling instruction by the following AT commands:
Parameter Description Value Range
n polling instruction ID 1 to 127
xxxx polling instruction content; hexadecimal string 128 bytes max
AT+POLLPERIOD=60
AT+ADDPOLL=<n>:<xxxx>
AT+ADDPOLL=1:010300000002C40B
AT+ADDPOLL=1:010300000002C40B
AT+ADDPOLL=2:040300000002C45E
AT+ADDPOLL=3:080300000002C492
sh
sh
sh
sh
sh
sh
Table des matières
















