DFP Data Forwarding Protocol Rules Description

What is DFP?

A set of data forwarding rules written by Stable Control Technology is taken from "Free Forward Protocol (FFP)", or DFP (DoubleF Protocol). DF can also be understood as the abbreviation of Datas Forward (Data Forwarding). The DF protocol is a data link layer protocol independent of the hardware interface, which specifies how the data flow is transmitted between different devices and between different interfaces.

The DF protocol is generally used to extend the transmission distance (data relay) of digital interfaces. It has nothing to do with the type of hardware interface and can be based on asynchronous data transmission media such as UART, LoRA, and TCP.

Gateway Repeater DFP Data Forwarding Protocol

Data forwarding rules

(1) Each device in the same area has a unique address (no devices with the same address in the same area). The legal device addresses are 0x01~0xFE. 0xFF is equivalent to an arbitrary address value, and 0x00 is equivalent to a non-existent address value.

(2) Each device has multiple digital interfaces (such as: UART, LoRA, etc.), and each port has independent communication parameters (different parameters can form different data areas). Each device has a number of group ID codes (GroupA_ID/GroupB_ID, etc.) corresponding to the digital interface.

(3) The transmitted data packets all carry the protocol prefix FP (Forward Prefix), and FP contains information such as the starting device address of the data packet, the destination device address of the data packet, the data packet group ID, and the record of the data packet forwarding path.

(4) When the DFP device receives a data packet (dry data) without FP through a digital interface, it will be automatically added to it. The addition rule is: group number = group ID number corresponding to the port receiving data (GAID when the port receiving data is xxxxA, and GBID when the port receiving data is xxxxB).

Start device address = 0xFF. Target device address = 0xFF.

Note: Data packets sent by other devices using LoRA can only be received by LORA-A of NLM5.

(5) No matter which digital interface, after receiving the data packet, it will judge whether the group ID in the FP is the same (matching) with one of its two group IDs. If it is different, it will be discarded. If it is the same, it will be judged first. Whether the data packet is an instruction for itself, if so, execute the instruction and then discard the data packet, if not, forward the data packet according to the forwarding rules.

The packet forwarding rule is: each digital interface can specify which (or which) digital ports to forward the data to after receiving the data, and whether to output the data with FP. Before forwarding the data, the group ID value in the FP will be automatically updated according to the data output port.

(6) When the destination address in the received data packet FP is the same as the device address, the destination device address in the FP will be modified to 0x00 before forwarding. After receiving the data packet, other devices will judge whether the destination address in the FP is 0x00, and if it is, it will immediately discard the data packet (ie: the data packet forwarding is terminated).

(7) Data mapping

The DFP device uses a parameter to enable or disable data mapping. The function of the parameter is explained as follows: When multiple digital interfaces of a DFP device are in the same data area, data packets will be received at the same time. According to the above rules, if the data mapping parameter is not When enabled, each port processes and forwards data according to preset forwarding rules and forwarding directions. If the data mapping parameter is enabled, the DFP device will perform the following processing: check whether the data packet has the correct FP leading symbol (the default is "@#@#")

Yes: Continue to check if the group code in the FP works with this device

Yes: Map the data packet to the LoRA-x corresponding to the group number.

No: Maintain the status quo (no mapping processing).

None: Map received LoRA packets to LoRA-A.

DFP data forwarding protocol application example

The data mapping received by LoRA means: no matter whether the LoRA data packet is received by LoRA-A or LoRA-B, the received data packet is forcibly updated to the receiving buffer of LoRA-A or LoRA-B according to the above rules , and then further processed according to the data forwarding rules.

The data mapping function of the DFP protocol can implement single-line, tree-branch, and cross-type data transmission networks based on the above data forwarding rules.

Leave a Reply

Your email address will not be published.