Appearance
Y202-R Dual-Port Ethernet DTU Technical Manual
Table of Contents
- Introduction
- System Overview
- Hardware Interfaces
- Electrical Specifications
- Serial Configuration & Packaging
- Ethernet Networking & Web Console
- Socket Protocol Workflows
- Modbus Gateway & JSON Services
- Advanced Functions
- Remote Management & Diagnostics
- AT Command Highlights
1. Introduction
Y202-R is the standard dual-port Ethernet DTU in the Yanji portfolio. It converts two independent serial channels (each selectable as RS232 or RS485) to 10/100 M Ethernet while providing dual socket contexts per port, Modbus RTU ↔ TCP gateway, registration packets, heartbeats, HTTP/MQTT clients, and browser-based provisioning. The firmware aligns with the MiniLink Y201 series, enabling mixed deployments with consistent AT commands and OTA workflows.
| Item | Description |
|---|---|
| MCU & OS | Dual-core 240 MHz MCU + RTOS, hardware watchdog |
| Serial Interfaces | 2 × RS232/RS485 (software selectable) |
| Ethernet | 10/100Base‑T RJ45, static/DHCP |
| Services | Transparent sockets, HTTP Client, MQTT Client, Modbus gateway, JSON scheduler |
| Form Factor | 118 × 89 × 30 mm DIN-rail housing |
Mechanical drawings, SKU table, and ordering information reside in the Y202-R Specification.
2. System Overview
- Architecture: Industrial MCU with RTOS, dual watchdog, configurable reboot-on-silence, and heartbeats to keep both serial buses online.
- Serial Access: COM1 and COM2 can operate as RS232 or RS485, each routed to Socket A/B with independent parameters and Modbus gateway toggles.
- Firmware Services: Transparent sockets (TCP/UDP), HTTP Client (GET/POST/AUTO), MQTT Client (with Aliyun helper), Modbus RTU ↔ TCP converter, JSON uploader, offline cache, remote AT, and HTTP OTA.
- Indicators: POWER, WORK, and DATA LEDs expose supply, link, and traffic status while optional TX/RX LEDs (per port) show serial activity.
3. Hardware Interfaces
| Group | Description |
|---|---|
| Power | 6-pin pluggable terminal providing V+, V-, COM1 A/B (or TX/RX), COM2 A/B (or TX/RX). Optional DC barrel jack (Ø5.5/2.1 mm) wired to V+/V-. |
| Serial | COM1 and COM2 share the terminal; wiring jumpers plus firmware settings define RS232 (TX/RX/GND) or RS485 (A/B/GND). |
| Ethernet | Single RJ45 10/100Base‑T, auto MDI/MDIX, LINK (green) / ACT (yellow) indicators. |
| USB | Micro-USB (CDC) for local console, AT commands, and firmware flashing. |
| Button | Reload – press 3–10 s to reload saved parameters, >10 s for factory reset. |
LED Behavior
| LED | Behavior | Meaning |
|---|---|---|
| POWER | Steady on | DC supply OK |
| WORK | Fast blink (~400 ms) | Booting / waiting for IP |
| WORK | Slow blink (~2 s) | IP acquired, sockets ready |
| DATA | Off | No socket session |
| DATA | Steady | Socket connected |
| DATA | Blink | Serial ↔ Ethernet traffic present |
4. Electrical Specifications
| Parameter | Value |
|---|---|
| Supply Voltage | 9–36 V DC (terminal) + optional 12 V barrel |
| Typical Current | 140 mA @ 12 V with dual sockets active |
| Operating Temp | -35 °C ~ +75 °C (extended SKU -40 °C ~ +85 °C) |
| Humidity | 5% ~ 95% RH, non-condensing |
| Protection | Reverse polarity, EFT/ESD IEC 61000-4-2 Level 4 |
| Mounting | 35 mm DIN rail clip or M3 ears |
Maintain ≥15 mm clearance for airflow and use shielded twisted pair for RS485 runs with 120 Ω terminations.
5. Serial Configuration & Packaging
5.1 UART Parameters
Per-port command: AT+UARTn=<baud>,<databits>,<stopbits>,<parity>,<fc> (n = 1/2).
| Field | Options | Default |
|---|---|---|
| Baud Rate | 1,200–460,800 bps | 115,200 |
| Data Bits | 7 / 8 | 8 |
| Stop Bits | 1 / 2 | 1 |
| Parity | NONE / EVEN / ODD | NONE |
| Flow Control | NFC (RS232) / 485 auto-direction | NFC |
5.2 Packaging (AT+UARTTLn)
- Length trigger: 64–1024 bytes (default 1024).
- Gap trigger: 1–300 ms (default 5 ms).
Either condition flushes the buffer toward sockets.
5.3 Modes
- Transparent Mode – Default data tunnel.
- AT Command Mode – Enter
++++ guard time +a, exit withAT+EXITor reboot; sockets pause up to 3 s.
6. Ethernet Networking & Web Console
6.1 Default Profile
| Parameter | Value |
|---|---|
| IP Mode | Static |
| IP Address | 192.168.10.8 |
| Gateway | 192.168.10.1 |
| Netmask | 255.255.255.0 |
| HTTP Login | admin / admin |
Set your PC to the same subnet, browse to http://192.168.10.8, and configure IP, serial, sockets, Modbus gateway, and heartbeats via the Status/System/Port tabs.
6.2 LAN Commands
- DHCP:
AT+WAN=DHCP - Static:
AT+WAN=STATIC,<ip>,<gw>,<mask> - DNS backup:
AT+DNS=<addr>(default 114.114.114.114) - Broadcast discovery:
AT+SEARCH=<port>,<keyword>(default 8168/HuayunIOT)
Reboot (AT+REBOOT or web UI) after modifying LAN settings.
7. Socket Protocol Workflows
Each COM port offers Socket A and Socket B. Enable with AT+SOCKENns=ON (n=1/2, s=A/B) and configure via AT+SOCKns=<type>,<addr>,<port>[,localport].
7.1 TCP Server
- Default port 8010; accepts up to eight clients per socket. Example:
AT+SOCKEN1A=ON AT+SOCK1A=TCPS,0.0.0.0,8010 AT+REBOOT
7.2 TCP Client
- Auto-reconnect every second; ideal for upstream SCADA. Example:
AT+SOCKEN2B=ON AT+SOCK2B=TCPC,10.10.10.50,9000 AT+REBOOT
7.3 UDP Server/Client
UDPSlistens on a local port and responds to the most recent sender.UDPCtargets a fixed IP/port; specifylocalportto satisfy firewalls.
7.4 HTTP Client
- Switch socket to
HTPC, set headers viaAT+HTPHDn, select GET/POST/AUTO usingAT+HTPREQn, and optionally define URL (AT+HTPURLn). AUTO mode lets you send complete URI + payload separated by\r\n.
7.5 MQTT Client
- Configure connection (
AT+MQCONFn), authentication (AT+MQAUTHn), publish/subscribe topics, and optional Aliyun shortcut. Supports QoS 0/1/2 and keepalive up to 65,535 s.
7.6 Registration Packets & Heartbeats
- Registration:
AT+REGTPn(MAC/CUS),AT+REGMDn(OFF/FIRST/EVERY/ALL),AT+REGDATn(custom payload). - Heartbeats:
AT+HEARTMDn(OFF/NET/UART),AT+HEARTTMn(seconds),AT+HEARTDATn.
8. Modbus Gateway & JSON Services
- Toggle gateway per port using Port tab or
AT+MBMDn=ON. Ethernet Modbus TCP frames convert to RTU and return responses automatically. - Scheduler + JSON uploader:
AT+MBCFGn=<enable>,<interval_ms>,<period_s>AT+MBCMDn=<hex frames>AT+MBJSn=<mode>,<interval_s>AT+HJREGfor register metadata, plusAT+JSIMEIn,AT+JSTMn, etc.
Example JSON:
json
{
"mac": "00-11-22-33-44-55",
"time": 1733367000,
"data": {
"loop_voltage": 228.7,
"loop_current": 11.9
}
}9. Advanced Functions
| Feature | Command | Description |
|---|---|---|
| Offline Cache | AT+CACHEn=ON/OFF | Stores up to 50 frames when the network is down. |
| Data Conversion | AT+DTCVTn=<uplink>,<downlink> | HEX↔RAW conversions. |
| Enhanced AT | AT+EXAT=<mode>,<keyword> | Enables AT parsing over sockets. |
| No-Data Reboot | AT+SOCKRTO=<minutes> | Reboots if no payload within the window (default 1440 min). |
| HTTP OTA | AT+DOWNLOAD=<uri> | Pulls firmware image via HTTP (host:port/path). |
| Backup/Restore | AT+BKCFG, AT+RSTCFG, AT+CLRCFG | Snapshot, reload, or factory reset. |
10. Remote Management & Diagnostics
- Enable registration packets (FIRST mode) so servers receive MAC/custom ID whenever sockets connect.
- Configure NET heartbeat (e.g., 60 s) to detect link issues; optionally enable UART heartbeat for PLC keepalive.
- Set
AT+SOCKRTO=30(minutes) to auto-reboot after prolonged uplink silence. - Keep HTTP OTA endpoint accessible; schedule remote firmware pushes during maintenance windows.
- Use
AT+BKCFGafter commissioning, allowing instant recovery withAT+RSTCFGor Reload button.
Diagnostic commands:
AT+DEVINFO– Model, firmware, MAC, SN.AT+SOCKLK– Socket status for TCP Clients.AT+PING=<host>– Network reachability test.AT+BOOTINFO=<text>– Custom boot banner (1–16 chars).
11. AT Command Highlights
| Command | Purpose |
|---|---|
AT+LIST | Enumerate supported commands |
AT+VER | Firmware version |
AT+WAN | Static/DHCP selection |
AT+SOCKns / AT+SOCKENns | Define/enable sockets |
AT+REGTPn, AT+REGMDn, AT+REGDATn | Registration packets |
AT+HEARTMDn, AT+HEARTTMn | Heartbeat mode & interval |
AT+MBCFGn, AT+MBCMDn, AT+MBJSn, AT+HJREG | Modbus/JSON scheduler |
AT+MQCONFn, AT+MQAUTHn, AT+MQPUBn | MQTT connection/auth/publish |
AT+HTPURLn, AT+HTPHDn, AT+HTPREQn | HTTP client settings |
AT+DOWNLOAD | HTTP OTA |
AT+SOCKRTO | Reboot-on-silence timer |
AT+BKCFG, AT+RSTCFG, AT+CLRCFG | Backup/restore/factory reset |
- Linked Documents: Y202-R Specification · DTU Overview
- Manufacturer: Hunan Yanji Tech Co.,Ltd · Email: hi@yanjiiot.com
