Skip to content

Y202-R Dual-Port Ethernet DTU Technical Manual

Table of Contents

  1. Introduction
  2. System Overview
  3. Hardware Interfaces
  4. Electrical Specifications
  5. Serial Configuration & Packaging
  6. Ethernet Networking & Web Console
  7. Socket Protocol Workflows
  8. Modbus Gateway & JSON Services
  9. Advanced Functions
  10. Remote Management & Diagnostics
  11. 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.

ItemDescription
MCU & OSDual-core 240 MHz MCU + RTOS, hardware watchdog
Serial Interfaces2 × RS232/RS485 (software selectable)
Ethernet10/100Base‑T RJ45, static/DHCP
ServicesTransparent sockets, HTTP Client, MQTT Client, Modbus gateway, JSON scheduler
Form Factor118 × 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

GroupDescription
Power6-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-.
SerialCOM1 and COM2 share the terminal; wiring jumpers plus firmware settings define RS232 (TX/RX/GND) or RS485 (A/B/GND).
EthernetSingle RJ45 10/100Base‑T, auto MDI/MDIX, LINK (green) / ACT (yellow) indicators.
USBMicro-USB (CDC) for local console, AT commands, and firmware flashing.
ButtonReload – press 3–10 s to reload saved parameters, >10 s for factory reset.

LED Behavior

LEDBehaviorMeaning
POWERSteady onDC supply OK
WORKFast blink (~400 ms)Booting / waiting for IP
WORKSlow blink (~2 s)IP acquired, sockets ready
DATAOffNo socket session
DATASteadySocket connected
DATABlinkSerial ↔ Ethernet traffic present

4. Electrical Specifications

ParameterValue
Supply Voltage9–36 V DC (terminal) + optional 12 V barrel
Typical Current140 mA @ 12 V with dual sockets active
Operating Temp-35 °C ~ +75 °C (extended SKU -40 °C ~ +85 °C)
Humidity5% ~ 95% RH, non-condensing
ProtectionReverse polarity, EFT/ESD IEC 61000-4-2 Level 4
Mounting35 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).

FieldOptionsDefault
Baud Rate1,200–460,800 bps115,200
Data Bits7 / 88
Stop Bits1 / 21
ParityNONE / EVEN / ODDNONE
Flow ControlNFC (RS232) / 485 auto-directionNFC

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 with AT+EXIT or reboot; sockets pause up to 3 s.

6. Ethernet Networking & Web Console

6.1 Default Profile

ParameterValue
IP ModeStatic
IP Address192.168.10.8
Gateway192.168.10.1
Netmask255.255.255.0
HTTP Loginadmin / 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

  • UDPS listens on a local port and responds to the most recent sender.
  • UDPC targets a fixed IP/port; specify localport to satisfy firewalls.

7.4 HTTP Client

  • Switch socket to HTPC, set headers via AT+HTPHDn, select GET/POST/AUTO using AT+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+HJREG for register metadata, plus AT+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

FeatureCommandDescription
Offline CacheAT+CACHEn=ON/OFFStores up to 50 frames when the network is down.
Data ConversionAT+DTCVTn=<uplink>,<downlink>HEX↔RAW conversions.
Enhanced ATAT+EXAT=<mode>,<keyword>Enables AT parsing over sockets.
No-Data RebootAT+SOCKRTO=<minutes>Reboots if no payload within the window (default 1440 min).
HTTP OTAAT+DOWNLOAD=<uri>Pulls firmware image via HTTP (host:port/path).
Backup/RestoreAT+BKCFG, AT+RSTCFG, AT+CLRCFGSnapshot, reload, or factory reset.

10. Remote Management & Diagnostics

  1. Enable registration packets (FIRST mode) so servers receive MAC/custom ID whenever sockets connect.
  2. Configure NET heartbeat (e.g., 60 s) to detect link issues; optionally enable UART heartbeat for PLC keepalive.
  3. Set AT+SOCKRTO=30 (minutes) to auto-reboot after prolonged uplink silence.
  4. Keep HTTP OTA endpoint accessible; schedule remote firmware pushes during maintenance windows.
  5. Use AT+BKCFG after commissioning, allowing instant recovery with AT+RSTCFG or 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

CommandPurpose
AT+LISTEnumerate supported commands
AT+VERFirmware version
AT+WANStatic/DHCP selection
AT+SOCKns / AT+SOCKENnsDefine/enable sockets
AT+REGTPn, AT+REGMDn, AT+REGDATnRegistration packets
AT+HEARTMDn, AT+HEARTTMnHeartbeat mode & interval
AT+MBCFGn, AT+MBCMDn, AT+MBJSn, AT+HJREGModbus/JSON scheduler
AT+MQCONFn, AT+MQAUTHn, AT+MQPUBnMQTT connection/auth/publish
AT+HTPURLn, AT+HTPHDn, AT+HTPREQnHTTP client settings
AT+DOWNLOADHTTP OTA
AT+SOCKRTOReboot-on-silence timer
AT+BKCFG, AT+RSTCFG, AT+CLRCFGBackup/restore/factory reset