Robustel E2C Trinity LoRa Device to BACnet/IP Data Forwarding User Guide
Document Version: V1.0
Gateways & Firmware Requirement:
| Software | E2C Field | E2C Facility |
|---|---|---|
| Gateways supporting | LG3120e | LG5120 |
| Firmware Requirement | =2.4.111 | (TBD) |
This manual is designed for field engineers who need to forward LoRaWAN sensor data to higher-level systems (such as a BMS — Building Management System) via the BACnet/IP protocol. By following the step-by-step instructions in this manual, you will complete the full configuration workflow from LoRa southbound data collection to northbound BACnet/IP data forwarding.
You do not need deep theoretical knowledge of the BACnet or LoRaWAN protocols. By following the instructions in this manual, you can easily configure the gateway as a BACnet Server, map LoRa sensor data tags to BACnet objects, and verify the data using third-party tools.
Gateway Role: From Collector to Server
In a typical IIoT project, imagine the gateway as a translator between your local sensors and the Building Management System (BMS). The data flow consists of two main stages:
First Stage (Southbound): LoRaWAN sensors communicate with the gateway via wireless radio frequencies. The gateway acts as a LoRaWAN Network Server (LNS), receiving encrypted hexadecimal raw data from the sensors and decoding it into readable engineering values (e.g., Temperature: 26°C) using a Payload Codec script, then storing them as internal "Tags".
Second Stage (Northbound): The gateway operates as a BACnet IP Server on the network. It takes those internal Tags, converts them into standard BACnet objects, and exposes them so that a higher-level system, such as a BMS or a BACnet testing tool like Yabe Explorer, can continuously read the data.
(Note: This document uses the LG3120e gateway and E2C Field software as an example. The configuration process for other supported gateway and software combinations is very similar.)
Before starting the configuration, please ensure the following preparations are met:
| Device | Requirement |
|---|---|
| Gateway | A Robustel gateway with E2C Field or E2C Facility software installed, and must support LoRaWAN functionality. In this document, we use LG3120e with E2C Field for an example. |
| Debugging PC | A PC used to log into the gateway's Web UI and run the BACnet testing software (Yabe). |
| Southbound Device | LoRaWAN sensor(s) (powered on), to provide the initial data source. |
| Ethernet Cable | Standard Ethernet cables to connect the gateway and the debugging PC. |
Before forwarding data via BACnet, the gateway must first collect data from the field devices. In this guide, we will use a LoRaWAN temperature and humidity sensor as an example to collect two tags: Temperature and Humidity.
The purpose of this step is to provide the gateway with a "translator" script to convert raw hexadecimal data sent by the sensor into readable data points (e.g., temperature, humidity, or battery level). You only need to do this once per sensor model. Please follow the path below based on your sensor's current status:
Please navigate to LNS Configuration > 【Payload Codecs】.
The system supports creating custom Codec files through either Add or Copy methods. These operations require the operator to have a technical background in Codec development. This step explains the method of importing a file, which has a lower barrier to entry and broader applicability, to complete the creation of a Payload Codec for the vast majority of standard use cases.
Purpose of this step: To define the shared network settings for a specific model of sensor. Instead of typing the frequency and join settings for multiple identical sensors, you create one Profile and apply it to all of them.
| Parameter Name | Configuration Description | Recommended / Example Value |
|---|---|---|
| Payload Codec | The translator script you verified in Step 1. | e.g., AM102_Codec |
| Name | A recognizable name for this model template. | e.g., Profile_AM102_EU868 |
| Description | (Optional) Brief details about this profile's purpose. | e.g., Milesight AM102 sensor profile |
| Region | The LoRa radio frequency band applicable to your physical location. | e.g., EU868, US915, AS923 |
| MAC Version | The LoRaWAN protocol version supported by the sensor (check the sensor datasheet). | e.g., 1.0.3 |
| Regional parameters revision | The revision of the LoRaWAN Regional Parameters specification the sensor complies with. Must be correct to avoid MAC errors. | e.g., A, B, or RP002-1.0.0 |
| ADR algorithm | The Adaptive Data Rate algorithm used by the network server to optimize data rates. Usually left as default. | e.g., Default ADR algorithm |
| Flush queue on activate | Clears any pending downlink messages when the device re-joins the network. Highly recommended for OTAA. | Checked (Yes) |
| RX1 Delay | The delay in seconds for the first receive window. Keep the default unless specified otherwise by the sensor manual. | e.g., 1 |
| Expected Uplink interval (seconds) | The expected time interval between regular sensor data reports. | e.g., 3600 (for 1 hour) |
| Activation Method | How the sensor securely connects to the gateway. OTAA is highly recommended for security. | OTAA |
| Device Class | The LoRaWAN operating class. Class A (battery-powered/sleeps) or Class C (mains-powered/always listening). | e.g., Class A |
Purpose of this step: To register the actual, physical sensor to the gateway using its unique IDs, and select which data points (Tags) you want to collect.
| Parameter Name | Configuration Description | Recommended / Example Value |
|---|---|---|
| Device Profile | Select the pre-configured template for this sensor model (created in Step 2). This automatically applies the correct network and decoding rules. | e.g., Profile_AM102_EU868 |
| Name | A custom, recognizable name for this specific physical sensor. | e.g., MeetingRoom_Sensor_01 |
| Description | (Optional) Additional notes about the device's installation location, purpose, or physical condition. | e.g., 3rd Floor Meeting Room A |
| Device EUI (HEX) | The globally unique 16-character hexadecimal identifier of the sensor. Typically found on the device's physical label or its packaging. | e.g., 24E124128C012345 |
| Join EUI (AppEUI) | The globally unique 16-character hexadecimal identifier used to identify the Join Server during the OTAA process. Provided by the manufacturer. | e.g., 5572404C696E6B4C |
| Application Key (AppKey) | The 32-character AES-128 root key specific to this device, used to secure the OTAA activation. This is highly sensitive information provided by the vendor. | e.g., 5572404C696E6B4C6F52613230313823 |
Once added, power on or reboot your physical sensor to force it to join the gateway.
Tip: You can check the Status to verify if the Temperature and Humidity tags are successfully reading values before proceeding to the BACnet configuration.
This is the core step where we expose our internal tags to the BACnet network.
| Parameter | Description & Action |
|---|---|
| Local network port | Select the gateway's network interface connected to the LAN (e.g., br_lan(192.168.0.1)). |
| Port Number | Keep the default 47808. This is the standard UDP port for BACnet IP. |
| Local Device ID | Enter a unique number for this gateway in your building network (e.g., 0). Note: This ID must not duplicate any other BACnet device on the same LAN. |
| Enable BBMD | Enable this if the higher-level system (e.g., Yabe or BMS) and the gateway are on different subnets. Leave it disabled (default) if they are on the same subnet. |
The Yabe / BMS does not understand the internal tag names like "Temperature". It only understands standard BACnet Objects like "Analog Input 1 (AI:1)". You must translate them using the BACnet IP Mapping Table.
| Parameter | Description | Example Value |
|---|---|---|
| Mapping Object Type | The standard BACnet object type (e.g., AI for Analog Input). | AI |
| Device | Select the Southbound device from which to collect data. | MeetingRoom_Sensor_01 |
| Tag | Select the specific Southbound data variable to map. | Temperature (or Humidity) |
| Instance number | The unique instance identifier for the BACnet object. | 1 (for Temperature) / 2 (for Humidity) |
| Conversion Mode | How to handle decimal to integer conversion (Round, Ceil, Floor). This setting applies to both data forwarding (uplink) and write-back (downlink). | Round |
Tip: This section uses AI (Analog Input) as an example to demonstrate the most basic mapping workflow. If you need to map other types of BACnet objects (such as BI, BO, MSI, etc.), or need to understand detailed rules for data conversion and write-back, please refer to Chapter 8 "BACnet Mapping Rules in Detail".
If you have configured writable tags on the southbound side and mapped them to writable BACnet object types (such as AO, BO, MSO), you can verify the write-back function as follows:
| Issue / Phenomenon | Possible Cause | Solution |
|---|---|---|
| Yabe cannot find the gateway | PC and Gateway are not on the same network subnet | Ping the gateway's IP from your PC to ensure network connectivity. Check if Windows Firewall is blocking UDP 47808. |
| Yabe finds the gateway, but there are no AI:1 / AI:2 objects | Configuration is submitted but not published | Go back to the E2C Web UI, ensure you have clicked both [Submit] and [Publish]. |
| Object exists in Yabe, but value is 0 or frozen | The Southbound collection failed, so the tag has no data | Go to Data Collection to verify if the LoRaWAN device is actually online and updating values. |
| BMS reports "Device ID Conflict" | Another controller on the site is using the same Device ID | Change the Local Device ID in the BACnet IP Server configuration to a unique number (e.g., change 0 to 2001). Submit and Publish. |
| Write-back command sent, but sensor does not respond | LoRaWAN sensor is in sleep mode, command is queued; or sensor does not support downlink control | Wait for the sensor's next wake-up (duration depends on the reporting interval), or confirm whether the sensor supports downlink control commands. |
| Yabe reports error during write-back (Error Code 25) | The written value exceeds the boundary value range, or numeric overflow occurred | Check if the written value is within the allowed range, and confirm whether the object type supports write operations. |
| Value after write-back does not match expectation | [Conversion Mode] conversion rule caused the numeric change | Confirm whether the [Conversion Mode] setting meets expectations (Round / Ceil / Floor). |
| Parameter | Default / Recommended Value | Description |
|---|---|---|
| Port | 47808 (UDP) | Standard BACnet/IP port. Do not change unless specified by the BMS engineer. |
| Local Device ID | Unique number (e.g., 0 to 4194303) | The unique identifier of the gateway in the BACnet network. |
| AI (Analog Input) | E.g., AI:1, AI:2 | Used for continuous numerical sensor data (Temperature, Pressure, Level). Mostly Read-Only. |
| AV (Analog Value) | E.g., AV:1, AV:2 | Internal analog value, no physical I/O meaning. Read/Write. |
| AO (Analog Output) | E.g., AO:1, AO:2 | Used for continuous numerical control targets (Frequency setting, Valve opening percentage). Read/Write. |
| BI (Binary Input) | E.g., BI:1 | Used for digital status (Running/Stopped status, Fault alarm). Read-Only. |
| BV (Binary Value) | E.g., BV:1 | Internal binary value, no physical I/O meaning. Read/Write. |
| BO (Binary Output) | E.g., BO:1 | Used for digital control commands (Start/Stop command). Read/Write. |
| MSI (Multi-state Input) | E.g., MSI:1 | Used for multi-state input (e.g., operating mode: Cooling/Heating/Ventilation). Read-Only. |
| MSO (Multi-state Output) | E.g., MSO:1 | Used for multi-state output (e.g., setting operating mode). Read/Write. |
| MSV (Multi-state Value) | E.g., MSV:1 | Internal multi-state value, similar to MSI/MSO but without physical I/O meaning. Read/Write. |
| BACnet Object Type | Allowed Southbound Source Data Types | Description |
|---|---|---|
| AI / AO / AV | ushort, short, uint, int, ulong, long, float, double, BYTE | Numeric data is uniformly converted to REAL (float32) for forwarding. |
| BI / BO / BV | All types (excluding string, raw-data, BCD) | Numeric / Boolean: 0 maps to INACTIVE (0), non-zero maps to ACTIVE (1). |
| MSI / MSO / MSV | ushort, short, uint, int, ulong, long, float, double | Integer data is processed according to [Conversion Mode]. In BACnet standard, Present_Value starts from 1. |
| Conversion Scenario | Uplink (Forwarding) | Downlink (Write-back) |
|---|---|---|
| Float to Integer | Default is Round; if user configures [Conversion Mode], follow the configuration | Default is Round; if user configures [Conversion Mode], follow the configuration |
| Float to Boolean | Non-zero is true | Non-zero is true |
| Boundary Value Overflow | Yabe reports error, Status_Flags=1, Error Code=25 | Yabe reports error, Status_Flags=1, Error Code=25 |
The mapping page provides a [Conversion Mode] field, which is empty by default (dropdown single-select). Options are as follows:
If left blank, the system defaults to Round. This setting applies to both Data Forwarding (uplink) and Write-back (downlink).
When mapping to MSI, MSO, or MSV object types, an [Enable +1 Offset] checkbox will appear, checked by default.
Recommendation: In the BACnet standard, Present_Value for MSI/MSO/MSV starts from 1. If your original tag values start from 0, it is recommended to keep [Enable +1 Offset] checked to ensure compliance with the BACnet standard.