Mailbox Gateway — remote access (ETG.8200)
Mailbox Gateway lets third-party tools that conform to the ETG.8200 standard (such as ESI debuggers and vendor configuration tools) access the mailbox channels (CoE / FoE / SoE / VoE and so on) of the slaves under the master remotely over UDP, for maintenance operations such as remote diagnostics, bulk parameter download and firmware updates.
This capability conforms to the ETG.8200 Mailbox Gateway standard and serves clients on the standard port.
The configuration tool provides only one checkbox, "Mailbox gateway" (start / stop); there is no separate Mailbox Gateway page: port settings, routing rules, client logs and statistics charts are not in the GUI. Use the SDK for the port and for statistics — see below.
Feature overview
| Capability | Description |
|---|---|
| Service start / stop | The "Mailbox gateway" checkbox on the master settings page starts and stops it; stopping the master stops the gateway as well |
| Port | UDP 34980 (0x88A4) by default; with several masters, master N uses 34980 + (N-1) |
| Statistics | Read a snapshot of the runtime statistics through the SDK's GetStatistics() |
| Routing rules / client logs / statistics charts | Not yet provided in the GUI |
| Authentication | The gateway performs no user authentication of its own; the security boundary relies on network isolation |
The slave response timeout is 10 ms; short reads return immediately.
Using it through the SDK
var master = new DarraEtherCAT().SetENI(@"C:\config.deni");
var (success, message) = master.Build();
if (!success) { Console.WriteLine(message); return; }
master.SetState(EcState.OP);
var gateway = master.MailboxGateway;
gateway.Port = 34980; // Must be set before Start
gateway.Start();
if (!gateway.IsRunning)
{
Console.WriteLine("网关未启动:端口被占用,改 Port 后重试"); // Gateway not started: the port is in use, change Port and retry
return;
}
var stats = gateway.GetStatistics();
Console.WriteLine($"请求 {stats.RxPackets} / 响应 {stats.TxPackets}, 主站 OD {stats.MasterOdRequests}, 从站邮箱 {stats.SlaveRequests}"); // Requests {stats.RxPackets} / responses {stats.TxPackets}, master OD {stats.MasterOdRequests}, slave mailbox {stats.SlaveRequests}
gateway.Stop();
master.Close();
Calling Start() repeatedly on the same master is idempotent; IsRunning reflects the real state. If the port is taken the start fails — stop the process holding it or change the port, then retry.
The switch in the configuration tool
Ticking "Mailbox gateway" on the master settings page starts it immediately; clearing the tick stops it immediately. The switch only starts and stops the service; it provides no port configuration and no routing filter.
Security recommendations
The gateway listens on 0.0.0.0 by default, so any client that can reach the master machine can send requests. Before going live:
- Use the host firewall or an isolated site subnet to limit where UDP 34980 can be reached from.
- Turn the switch on only while remote diagnostics or bulk parameter download is needed, and turn it off when you are done.
- Do not expose it to the office network or to the internet.
The gateway itself carries no user authentication; the security boundary relies on network isolation, so deploy it together with the site firewall / VPN.
This feature follows the ETG.8200 Mailbox Gateway specification, including the UDP frame format (master OD access / slave mailbox access), the session state machine and the error code mapping. Refer to the official ETG documentation for the full specification.