Gateway System - Function Description
The article offers a detailed explanation of the gateway system's functionalities, covering navigation, password settings, node device management, project management, and data handling. It includes methods for adding node devices, real-time data interpretation, and using JS scripts for data parsing, making it ideal for tech enthusiasts seeking to optimize their device management and improve efficiency.
Overall Overview
The gateway system is divided into a Function Navigation Bar, an Information Bar, a Language & Password Settings Area, and a Function Area.
- Navigation Bar: All main functions of the gateway are accessed through the navigation bar.
- Information Bar: Displays information such as region, network, and time.
- Language & Password Settings Area: Includes functions like Chinese-English language switching, password modification, and region modification.
Function Area: A detailed configuration area and data display area for different functions.

Enter the login password
When you access the gateway system login page, an interface requiring you to enter the login password will appear, as shown in the figure below:
Enter the login password (default password: admin).
Click the "Login" button to access the gateway configuration system.

You can change your gateway login password at any time in the location shown in the figure below.


Node Device
Function Introduction

Add Node Device
Click the "+" symbol to add a new node device.

A window for selecting node device addition pops up. There are three ways to add a node device:
- Automatic Addition: After entering the last three digits of the node device's EUI number, the system can automatically scan and add the device, enabling quick addition. This method only supports LoRaWAN node devices of the DF brand.
- Manual Addition: Add the device by manually entering node device information such as Device EUI and APPKey. This method supports LoRaWAN node devices of all brands.
- Bulk Addition: Import a CSV file of the node device list to bulk add node devices to the gateway.

Automatic Addition of Node Devices
The automatic node device addition is a simpler and more convenient scan-based device addition method designed for DFRobot's control terminals. You only need to enter the last 3 digits of the DVEUI to add the device.
Click the "+" button to start adding the device.

Select "Automatic Addition" in the pop-up window.

Locate the DEUI device number on the control terminal's housing, then enter its last three digits:

Plug the control terminal into a USB port to power it on, then click "Next":

At this point, the gateway will automatically scan the node control terminal that has just been powered on:

After a few seconds, the node control terminal will be detected and registered successfully:

After clicking the "Complete" button, the newly added device will now appear in the device list.

Manual Addition of Node Devices
Click "Manual Addition" :

After clicking "Manual Addition", the following window will pop up. Fill in the information based on the relevant details of the node device.
The information you enter must be consistent with that of the node device; please refer to the relevant information of the node device for verification.
An example is provided below. After completing the filling, click the "Confirm Addition" button. A prompt indicating "Registration Completed" will then pop up. Click the "Complete" button to finish the registration.

Bulk Addition of Node Devices
When there are a large number of node devices, entering their information one by one is a labor-intensive task and prone to errors. In such cases, you can use the CSV format batch import method to add node devices in bulk. The specific steps are as follows:
Preparing the CSV File:
Enter the node information into a spreadsheet using a spreadsheet application and save it in CSV format. Below is a sample CSV format, which can be imported for testing.

Sample File: Node List.rar
Import Node List:
After clicking the "+", select " Bulk Addition" in the pop-up window:

The bulk addition window pops up:

Click "Upload File" and select the edited CSV file; the system will automatically recognize the device parameters in the CSV file. After confirming there are no errors, click "Confirm Addition"—the node information in the CSV will then be added to the gateway device list.

Added:


Device Settings
Click the gear icon in the device list to access Device Settings.

In the Device Settings function, you can configure settings such as the device's name, type, and whether it is enabled—these are all relatively easy to understand.
Later, we will explain the unique function of data parsing.

Data Parsing (Testing Phase)
The Data Parsing function is a feature that interacts with the SIoT server and is currently in the testing phase.
Developed by DFRobot for the gateway, the Data Parsing function converts raw data into actual values through JS scripts. It allows users to perform formula conversion and parsing on node data by writing JS scripts.
Meanwhile, the parsed data will automatically create a Topic in the gateway's built-in SIoT server, enabling users to obtain this data in real time.
The Data Parsing function includes four built-in features:
- RAW: Outputs raw data; users cannot modify the code here.
- TEXT: Outputs text data; users cannot modify the code here.
- DTU: Parses the raw data related to the control terminal device (SKU: DFR1120) and outputs actual values; users cannot modify the code here.
- Custom: Users can modify the code freely in the custom section, and a new data parsing function will be created after renaming.
Method for custom parsing scripts:
Select the Custom option, then click "Parse/Verify".

A JS script editing window will pop up. Paste the edited script into the code area, name the script in the upper section, and after successful verification, click the Save button to save the script.

JS Script Illustration:
The following code demonstrates converting the obtained hexadecimal data of the node device into text data.
function Decode(hexStr) {
var hexArray = hexStr.match(/.{1,2}/g).map(function(byte) {
return parseInt(byte, 16);
});
var txt = String.fromCharCode.apply(null, hexArray);
return { "text": txt };
}
Function Steps:
- Input Handling: The function receives a hexadecimal string
hexStras input. - String Splitting: Use the regular expression
/.{1,2}/gto split the string into groups of two characters each. For example, "48656c6c6f" will be split into ["48", "65", "6c", "6c", "6f"]. - Conversion to Decimal Array: Use
mapandparseInt(byte, 16)to convert each two-character hexadecimal number into a decimal value. For example, "48" → 72, "65" → 101, "6c" → 108, etc. - Conversion to Text: Use
String.fromCharCode.apply(null, hexArray)to convert the decimal value array into corresponding ASCII characters. For example, [72, 101, 108, 108, 111] → "Hello". - Return Result: Return an object containing the decoded text:
{"text": txt}.
When a JS script runs correctly and receives valid data, a Topic will be automatically created in the SIoT server.
Project Management
In a LoRaWAN network, you may deploy multiple sets of devices, each corresponding to a different area. As the number of devices increases, it may become inconvenient to manage and monitor them. Therefore, the gateway is equipped with a project management function to facilitate the reasonable classification and management of your devices. As shown in the figure:

Among them, "app-Built-in" is the default project. Click the "Project" icon on the left to enter the Project Settings page, then click the "+" sign in the upper left corner to bring up the New Project page. After entering the project information, you can add a new project.
Note: Only English characters can be used for the project name and description; Chinese characters are not allowed.

Real-time Data
Real-time Data
After a node device is correctly registered on the gateway and powered on, the node will send a network access packet and periodic data packets to the gateway. At this point, incoming data can be viewed on the Data page. The Real-time Data function is mainly used for debugging during device deployment.
The data in Real-time Data is not saved. When you exit the page or re-enter it, the data will be cleared.
At the top of the Real-time Data page, several data filtering tools are provided. You can filter and view data based on conditions such as signal-to-noise ratio (SNR), signal strength, device EUI, and data type. This prevents difficulties in viewing and analyzing data due to excessive data volume.
Additionally, a data export function is available on the right side, allowing you to export the data as a JSON file and save it to your computer.

Data Interpretation:
| name | Instructions |
|---|---|
| Serial Number | The sequence of data reception; click the icon to expand and view detailed data information. |
| Time | The time when data is received is the time set by the gateway. |
| TYPE | Data Type |
| Device Name | The name of the node device, which can be customized by the user. |
| DEUI | The unique EUI number of the device, which is 16 bits in length and usually marked on the device. |
| Device Address | The node device address number automatically assigned by the gateway. |
| Rate | The current communication rate; this value can be modified in the Node APP to adjust the communication rate. |
| SNR | Signal-to-Noise Ratio (SNR): The smaller the value, the better the signal-to-noise ratio. |
| RSSI | Signal Strength: The smaller the value, the better the signal strength. |
| Communication Frequency | Current Communication Frequency |
| Data Parsing | Data received from node devices and parsed by the gateway. |
Send Data
The data sending function is used for device debugging. It allows manual data transmission to node devices, which is applied in debugging and function verification. As shown in the figure below:

Function Explanation:
| Name | Explanation |
|---|---|
| DEUI | The unique EUI number of the device, which is 16 bits in length and usually marked on the device. |
| Data Type | Types of data to send, with two options available: Text: Text format; HEX: Hexadecimal format (must be an even number of digits) |
| Load | The detailed data to be sent |
| Port | Port Number: 0-255 selectable |
| Confirmation Packet | Choose whether the node needs to send confirmation data to the gateway after receiving the data. |
| Skip Frame Counter |
Sending Example:
The following example will demonstrate sending a piece of data to the DTU control terminal to turn on the DTU's relay.
Step 1: Set the rules for the DTU



Step 2: The Gateway Sends Data
Configure the data to be sent as shown in the figure below, then click the "Send Data" button to send the data to the node DTU. Since the device type was set to CLASS-C device just now, you will hear the relay pull-in sound after pressing the "Send Data" button, and after 3 seconds, you will hear the relay release sound.

Was this article helpful?
