Download Print this page

Advertisement

Quick Links

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.
Connect the RAK7431 to the Sensor
Power Interface Configuration
The RAK7431 device can be powered either by:
DC (VIN/GND) terminals
Micro USB.
Figure 1: Example communication with RS485 enabled devices

Advertisement

loading

Summary of Contents for RAK RAK7431

  • Page 1 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.
  • Page 2: Data Interface Configuration

    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.
  • Page 3: Gateway Configuration

    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...
  • Page 4 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...
  • Page 5 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.
  • Page 6 To set up the Application Key run the command: AT+APPKEY=<application Key> To check the previously configured Application EUI and Key, run the commands: AT+APPEUI AT+APPKEY Figure 10: Configuring the RAK7431 Set the Frequency Region The node supports the following Regional Frequencies:...
  • Page 7 For this demonstration, EU868 shall be used. To set the desired regional frequency band use the command: AT+REGION=EU868 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.
  • Page 8 3. Restart is needed for the modification to take effect. To restart the RAK7431, execute the command: AT+RESTART 4. If everything is configured right, after the execution of the restart command this output pops up in the RAK Serial Tool:...
  • Page 9 Documentation Center Condition transparent mode is turned off it is turned on 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.
  • Page 10 Example: To set the polling cycle to 60 seconds, use this command: AT+POLLPERIOD=60 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.
  • Page 11 Documentation Center AT+ADDPOLL=4:0F0300000002C525 The RAK7431 sends an instruction to the sensor every 1 minute to obtain temperature and humidity data, and the following is the result of 3 consecutive scheduled polls: DTU Tx: The polling instruction sent to the Sensors over RS485 Data Interface DTU Rx: The sensor data received.
  • Page 12 To better demonstrate the functionality we will use the Application Server Integration feature to subscribe to the Built-In Network Server Topics, using the MQTT client, to obtain data and send instructions to the RAK7431. Figure 15: Gateway MQTT Topic Templates To communicate with the MQTT bridge in the gateway we need to use MQTT Topic Templates.
  • Page 13 Documentation Center Figure 17: MQTT.fx settings 4. Click on the Connect button. The green dot indicates that the connection is successfully subscribed to the MQTT Broker. Figure 18: MQTT.fx connected successfully If we want to receive all data from the MQTT Bridge, we can use the wildcard character #. 5.
  • Page 14 Documentation Center Figure 20: Subscribed topic data Notice that the data field is in base64 format, which has to be converted to hex string to be useful. We can change the data format from the built-in server settings. 6. This is done by going to Gateway>Application>Integrations>Data Encode/Decode Type and chose HEX String form the drop-down menu.
  • Page 15 Documentation Center Figure 21: Change the Data Encode/Decode Type Now, all received data will be in HEX String.
  • Page 16 Figure 22: Received data field in HEX format RAK7431 Remote Control and Configuration via MQTT.fx To remotely control the RAK7431 you need to publish messages to the Gateway’s Network Server MQTT “TX” topic. Add a Scheduled Polling Task List Downlink instruction message format:...
  • Page 17 Content of the uplink: "confirmed":true, "fPort":129, "data":"030001000901010300000002C40B" Parameter Description This indicates that the downlink to the RAK7431 will be "confirmed":true confirmed for successful receiving. Defines the port that we want to send the command. (For "fPort":129 more information on the fPort see the...
  • Page 18 5. The content of the task Figure 24: Publishing data to RX topic After publishing the data, we can see the downlink instruction and uplink answer from the RAK Serial Tool: Figure 25: Received data and sent an answer Message format when execution is successful:...
  • Page 19 Documentation Center Figure 26: Received confirmation of the task Remove the Scheduled Polling Task List Downlink instruction message format: DTU_CMD MSER MDATA_LEN MDATA TASK_ID 0x04 2Byte 2Byte 1Byte Example: Removal of timed polling temperature and humidity sensor task order on a node: Publish the topic:...
  • Page 20 Documentation Center Application/1/device/60c5a8fffe75404b/tx Content: "confirmed":true, "fPort":129, "data":"040001000101" Figure 27: Remove poll downlink message Message format when execution is successful: DTU_CMD MSER MDATA_LEN MDATA TASK_ID 0x84 2Byte 2Byte 1Byte...
  • Page 21 Documentation Center Figure 28: Poll removed successfully message The MQTT subscription bar sees the upstream message "84000100010101", which means the task was successfully removed. Read the Scheduled Polling Task List Downlink instruction message format: DTU_CMD MSER MDATA_LEN MDATA TASK_ID 0x05 2Byte 2Byte 1Byte...
  • Page 22 Documentation Center "confirmed":true, "fPort":129, "data":"050001000101" Figure 29: Publishing the read poll task message Perform successful upstream message format: DTU_CMD MSER MDATA_LEN MDATA TASK_ID DATA 0x85 2Byte 2Byte 1Byte nByte Open the MQTT subscription column that is to see to the performance of the above line: "8500010009010103000000002C40B"...
  • Page 23 Documentation Center Figure 30: Received message from the node Read the LoRa Configuration Downlink instruction message format: DTU_CMD MSER MDATA_LEN MDATA 0x06 2Byte 2Byte 0Byte Publish topic: Application/1/device/60c5a8fffe75404b/tx Content: "confirmed":true, "fPort":129, "data":"0600010000"...
  • Page 24 Documentation Center Figure 31: Publish LoRa configuration read message Perform successful upstream message format: DTU_CMD MSER MDATA_LEN MDATA DATA TXPWR CONFIRM RETRY RATE 0x86 2Byte 2Byte 1Byte 1Byte 1Byte 1Byte 1Byte DATARATE: Speed rate (0 – 5) TXPOWER: The transmit power level (0 – 20) CONFIRM: Whether to turn on ACK 0 –...
  • Page 25 Documentation Center Figure 32: Received message with LoRa configuration Open the MQTT subscription bar to see the upstream message "860001000006000010301000000" to read the LoRa configuration based on the upstream message format for the successful execution above. Change the LoRa Configuration Downlink instruction message format: DTU_CMD MSER...
  • Page 26 Documentation Center Figure 33: Publish change LoRa configuration data Perform successful upstream message format: DTU_CMD MSER MDATA_LEN MDATA 0x87 2Byte 2Byte 0Byte Open the MQTT subscription bar to see the upstream message for successful execution: "8700010000". Figure 34: Received confirmation message Reset the default LoRa Configuration Publish topic: Application/1/device/60c5a8fffe75404b/tx...
  • Page 27 Documentation Center "comfirmed":true, "fPort":129, "data":"1D00010000" Figure 35: Publish reset the default LoRa configuration Open the MQTT subscription bar to see the upstream message for successful execution: "9D00010000". Figure 36: Received Data LORA configuration default values: DATARATE TXPOWER CONFIRM RETRY ADR_ENABlE DUTYCYCLE_ENABLE 0 –...
  • Page 28 Documentation Center DTU_CMD MSER MDATA_LEN MDATA 0x08 2Byte 2Byte 0Byte Publish topic: Application/1/device/60c5a8fffe75404b/tx Content: "comfirmed":true, "fPort":129, "data":"0800010000" Figure 37: Publish message for reading the DTU configuration Uplink data message format when execution successful: DTU_CMD MSER MDATA_LEN MDATA POLL POLL RETRY RS485 ENABLE PERIOD...
  • Page 29 Documentation Center Figure 38: Received message with current DTU configuration Change the DTU POLL configuration Downlink instruction message format: DTU_CMD MSER MDATA_LEN MDATA POLL POLL RETRY RS485 ENABLE PERIOD TIMEOUT 0x09 2Byte 2Byte 1Byte 4Byte 1Byte 1Byte 1Byte Publish topic: Application/1/device/60c5a8fffe75404b/tx Content: "comfirmed":true,...
  • Page 30 Documentation Center Figure 39: Publish message for change the DTU configuration Uplink data message format when execution successful: DTU_CMD MSER MDATA_LEN MDATA 0x89 2Byte 2Byte 0Byte Open the MQTT subscription bar to see the upstream message for successful execution: "8900010000". Figure 40: Received confirmation message Reset the default DTU Configuration Publish topic:...
  • Page 31 Documentation Center "comfirmed":true, "fPort":129, "data":"1E00010000" Figure 41: Publish reset the default DTU configuration Open the MQTT subscription bar to see the upstream message for successful execution: "9E00010000". Figure 42: Received Data DTU Configure the initial value: POLL_ENABLE POLL_PERIOD BUS_TIMEOUT RS485 1 - on 3600 seconds 1 second...