Modbus Master basic info
1.6 Communication Parameters
1.7 Modbus Function Codes Used by This Application
01
Read Coils
01 — Read/Write Coils
02
Read Discrete Inputs
02 — Read Discrete Inputs
03
Read Holding Registers
03 — Read/Write Holding Register
04
Read Input Registers
04 — Read Input Register
The application UI exposes these four query options. The Modbus specification defines 01/02/03/04 as read operations; write functions use other standard function codes. This guide does not add write configuration that the current UI does not expose.
Supported Hardware & Devices
This section separates OpenWrt gateways that can host Modbus software from field devices that can act as Modbus slaves and provide data to the AG-702.
2.1 OpenWrt Modbus Gateways
The following Atreyo gateway models have public product information explicitly listing OpenWrt and Modbus support. This is a platform capability table; the exact Modbus Master UI in the supported-device section is verified in this guide only on AG-702.
Application scope: AG-702 is the reference platform for the Modbus Master application documented in this guide. For the other gateways, verify that the same package, drivers and UI are available in the installed firmware.
2.2 Atreyo Products That Can Act as Modbus RTU Slaves
These products can be placed on the AG-702 RS-485 bus as field devices. The AG-702 acts as Modbus Master and reads the data exposed by each device according to its own Modbus documentation.
Physical connection: These RTU slave devices connect to the AG-702 RS-485 port and share the RS-485 bus. They do not connect to the AG-702 Ethernet/TCP port.
Deployment Scenarios
These diagrams show how the AG-702 can collect data from multiple RS-485 Modbus RTU slaves and multiple Modbus TCP/IP slave devices.
3.1 AG-702 Mixed TCP/IP & RS-485 Deployment
The AG-702 is the central Modbus Master. Five RTU slaves share one RS-485 daisy-chain connected directly to the AG-702 RS-485 port: three slaves are shown on the left and two on the right. Four separate TCP/IP slaves connect through the Ethernet network on the AG-702 LAN side.
Important: RTU slaves are connected to the AG-702 RS-485 port. TCP/IP slaves are connected through the AG-702 Ethernet/LAN port. These are two separate physical communication paths.
3.2 RS-485 Daisy-Chain Wiring — Multi-Slave Field Example
A single AG-702 RS-485 port can serve multiple Modbus RTU slave devices on one shared two-wire bus. Connect A (D+) to A (D+) and B (D−) to B (D−) throughout the chain, assign a unique Slave ID to every device, and install a 120 Ω termination resistor between A and B only at the two physical ends of the bus.
Important: RS-485 is a shared two-wire bus. Keep the topology physically ordered as a daisy-chain, keep drop cables short, connect A to A and B to B consistently, and place 120 Ω termination resistors only at the two physical ends of the bus.

