Appearance
Y202-W Standard WiFi DTU Technical Manual
Table of Contents
- Introduction
- System Overview
- Hardware Interfaces
- Electrical Specifications
- Serial Configuration & Packaging
- WiFi & Ethernet Networking
- Socket Protocol Workflows
- Modbus Gateway & JSON Services
- Advanced Functions
- Remote Management & Diagnostics
- AT Command Highlights
1. Introduction
Y202-W is the WiFi-enabled member of the Yanji standard DTU family. It converts two independent RS232/RS485 channels to WiFi or 10/100 M Ethernet with dual sockets per port, Modbus RTU ↔ TCP gateway, JSON uploader, HTTP/MQTT clients, registration packets, heartbeats, OTA, and remote AT workflows inherited from the MiniLink Y201/Y202 series. The compact 84 × 70 × 25 mm enclosure uses a DB9 plus pluggable terminal and supports 5–36 V DC, making it ideal for retrofitting panels where only wireless uplinks are available.
| Item | Description |
|---|---|
| MCU & OS | Dual-core 240 MHz MCU + RTOS, dual watchdog |
| Serial Interfaces | 2 × RS232/RS485 (COM1 DB9, COM2 3-pin terminal) |
| Wireless | 802.11 b/g/n @ 2.4 GHz, AP / STA / AP+STA |
| Ethernet | 10/100Base‑T RJ45, static/DHCP |
| Services | Transparent sockets, HTTP client, MQTT client, Modbus gateway, JSON uploader, OTA |
| Power | 5–36 V DC via terminal or DC barrel (Ø5.0 mm) |
Dimensional drawings, SKU matrix, and ordering information reside in the Y202-W Specification.
2. System Overview
- Dual Serial Engine – COM1 and COM2 are isolated from each other, each exposing Socket A/B plus packaging and heartbeat parameters.
- Flexible Uplink – WiFi can run AP, STA, or AP+STA concurrently, while an RJ45 port provides wired fallback;
AT+NETIFselects the active interface. - Firmware Parity – Shares the same feature set as Y202-R (TCP/UDP, HTTP, MQTT, Modbus gateway, JSON uploader, EDP peer-to-peer, remote AT, OTA, watchdog).
- Built-In UI – Web console (
192.168.4.1in AP mode) mirrors AT commands and provides Status/System/Port tabs. - Industrial Protections – 5–36 V input, reverse polarity guard, EFT/ESD hardening, dual watchdog, programmable reboot-on-silence, and offline cache.
3. Hardware Interfaces
| Group | Description |
|---|---|
| Power | 5.08 mm 2-pin terminal (V+/V-) and Ø5.0 mm DC barrel (center positive). |
| Serial | COM1 DB9 male (factory RS232, switchable to RS485); COM2 3-pin terminal (A/B/GND or TX/RX/GND). |
| WiFi | SMA female connector for external 2.4 GHz antenna. |
| Ethernet | RJ45 10/100Base‑T with LINK/ACT LEDs, auto MDI/MDIX. |
| USB | Micro-USB (CDC) for local AT commands and firmware download. |
| Button | Reload – hold ≥3 s to revert to default parameters (equivalent to AT+RSTCFG). |
LED Behavior
| LED | Behavior | Meaning |
|---|---|---|
| POWER | Steady on | DC supply OK |
| WORK (WiFi) | Slow blink (~1 s) | WiFi connected (STA) or AP broadcasting |
| WORK (WiFi) | Fast blink (~300 ms) | WiFi disconnected / searching |
| LINK | On | Ethernet link established |
| ACT | Blink | Ethernet activity |
| TX1/RX1 | Blink | COM1 traffic |
| TX2/RX2 | Blink | COM2 traffic |
4. Electrical Specifications
| Parameter | Value |
|---|---|
| Supply Voltage | 5–36 V DC |
| Typical Current | 55 mA @ 12 V (WiFi idle) |
| Operating Temp | -40 °C ~ +85 °C |
| Humidity | 5% ~ 95% RH, non-condensing |
| Power Protection | Reverse polarity, surge clamp, user-fused recommended |
| Watchdog | Hardware + software; programmable reboot timer (AT+SOCKRTO) |
Ensure shielding for RS485 pairs and provide ≥15 mm clearance for antenna rotation and airflow. Keep WiFi antennas outside metal cabinets or use an extension pigtail.
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 | 2,400–460,800 bps | 115,200 |
| Data Bits | 7 / 8 | 8 |
| Stop Bits | 1 / 2 | 1 |
| Parity | NONE / EVEN / ODD | NONE |
| Flow Control | NFC (RS232) / auto-direction (RS485) | NFC |
5.2 Packaging (AT+UARTTLn)
- Length trigger: 64–1024 bytes (default 1024).
- Gap trigger: 0–300 ms (0 = auto based on baud, default 0).
- Flush occurs when either threshold is met. Example:
AT+UARTTL1=30,512.
5.3 Modes
- Transparent Mode – Default serial tunnel.
- AT Command Mode – Send
+++, wait ≥500 ms, senda, then issue commands; exit withAT+EXIT. - Broadcast AT / Remote AT – Enable via
AT+EXATfor socket-side management; protected by keyword.
6. WiFi & Ethernet Networking
6.1 WiFi AP Mode (Default)
| Parameter | Value |
|---|---|
| SSID | HY-W502 |
| Security | WPA2-PSK |
| Password | admin123 (example, change immediately) |
| IP | 192.168.4.1 |
| DHCP | Enabled (1–6 STA) |
| HTTP Login | admin / admin |
Steps:
- Power on and connect a PC/phone to SSID
HY-W502. - Browse to
http://192.168.4.1, enter credentials. - Configure WiFi STA, Ethernet, serial, sockets, Modbus, heartbeats.
- Save and reboot.
6.2 WiFi STA / AP+STA
AT+NETIF=STAto join an external AP; set credentials viaAT+STA=<ssid>,<password>.AT+NETIF=APSTAkeeps the device discoverable while connected upstream (AP radio follows STA channel).- Channel selection for AP mode:
AT+WCH=<1-13>. - STA status query:
AT+STALK.
6.3 Ethernet Mode
AT+NETIF=ETHenables RJ45 and disables WiFi radio.- Static IP:
AT+WAN=STATIC,192.168.10.8,192.168.10.1,255.255.255.0. - DHCP:
AT+WAN=DHCP. - DNS backup:
AT+DNS=114.114.114.114. - LAN discovery broadcasts UDP on port 8168 with keyword
HuayunIOT(AT+SEARCH=<port>,<key>).
7. Socket Protocol Workflows
Each COM port exposes Socket A and Socket B. Enable with AT+SOCKENns=ON and configure type/address/port via AT+SOCKns=....
7.1 TCP Client / Server
TCP Client example (COM1 SocketA):
AT+SOCKEN1A=ON
AT+SOCK1A=TCPC,10.10.10.50,9000
AT+REBOOTAuto-reconnect occurs every second.
TCP Server example (COM2 SocketB):
AT+SOCKEN2B=ON
AT+SOCK2B=TCPS,0.0.0.0,8010
AT+REBOOTUp to eight TCP clients per socket; data is broadcast to all connected clients.
7.2 UDP Client / Server
UDPCrequires target IP/port; optionallocalportensures firewall pinholes.UDPSlistens on a local port and replies to the most recent sender—ideal for mobile maintenance tools.
7.3 HTTP Client
- Switch socket to
HTPC. - Configure headers (
AT+HTPHDn=Connection:keep-alive|Content-Type:application/json). - Select request type (
AT+HTPREQn=GET/POST/AUTO). - For POST, set URL via
AT+HTPURLn=/api/v1/upload. - In AUTO mode, include the full URI in the payload (e.g.,
http://example.com/path\r\nPAYLOAD).
7.4 MQTT Client
AT+MQCONFn=<n>,<type>,<addr>,<port>defines broker endpoint;typecan beTCPorTLS(via external gateway).AT+MQAUTHn=<user>,<password>sets credentials.AT+MQPUBn=<topic>,<qos>andAT+MQSUBn=<topic>,<qos>control data flow.- Aliyun/Baidu/OneNET helpers:
AT+MQALI,AT+MQBAI,AT+MQONE.
7.5 Registration Packets & Heartbeats
- Registration type:
AT+REGTPn=MAC/CUS. - Mode:
AT+REGMDn=OFF/FIRST/EVERY/ALL. - Payload:
AT+REGDATn=<hex>. - Heartbeat mode:
AT+HEARTMDn=OFF/NET/UART, interval viaAT+HEARTTMn(1–86,400 s), payload viaAT+HEARTDATn.
7.6 Peer-to-Peer (EDP)
- Acquire EDP IDs from Yanji, configure via
AT+SOCK1A=EDP,huayuniot,888andAT+EDP1=<target_id>,OFF. - Supports one-to-one, one-to-many, many-to-one tunnels while still allowing HTTP/MQTT on other sockets.
8. Modbus Gateway & JSON Services
- Enable per port:
AT+MBMDn=ON. Modbus TCP frames on sockets convert to RTU on the associated COM, preserving timing. - Scheduler:
AT+MBCFGn=<enable>,<interval_ms>,<period_s>defines poll timing;AT+MBCMDn=<hex>holds RTU frames. - JSON uploader:Data can be delivered via HTTP (HTPC sockets) or MQTT topics.
AT+HJREG=loop_voltage,0,1000,0.1,V AT+MBJSn=ON,30
9. Advanced Functions
| Feature | Command | Description |
|---|---|---|
| Offline Cache | AT+CACHEn=ON/OFF | Buffers up to 50 frames when uplink fails; auto-flush on recovery. |
| No-Data Reboot | AT+SOCKRTO=<minutes> | Reboots device if no data arrives within the window (default 1,440 min). |
| Remote AT | AT+EXAT=<mode>,<keyword> | Enables password-protected AT control via sockets after LAN discovery. |
| HTTP OTA | AT+DOWNLOAD=<uri> | Pulls firmware from HTTP server, verifies, then swaps after reboot. |
| Parameter Backup | AT+BKCFG, AT+RSTCFG, AT+CLRCFG | Backup, restore, or factory reset configuration partitions. |
| WiFi Scan | AT+SCAN | Lists surrounding AP SSID/RSSI/auth for site surveys. |
| STA List | AT+APLK | Shows clients connected to the AP radio. |
10. Remote Management & Diagnostics
- After commissioning, run
AT+BKCFGand store the backup file in your CMDB for rapid field recovery. - Enable registration packets (FIRST) so head-ends receive MAC/SN whenever sockets connect.
- Configure NET heartbeats (e.g., 60 s) to detect uplink issues; optionally enable UART heartbeats for PLC keepalive.
- Set
AT+SOCKRTO=30(minutes) when unattended installations must auto-recover from silent networks. - Schedule OTA windows and keep firmware hosted on accessible HTTP servers; use
AT+DOWNLOADfor remote upgrades. - Use LAN discovery (
AT+SEARCH=8168,HuayunIOT) plus remote AT to audit fleets without local access. - For WiFi STA deployments, monitor
AT+STALKRSSI values (> -65 dBm recommended).
Diagnostic commands:
AT+DEVINFO– Model, firmware, MAC, SN, build time.AT+SOCKLK– Socket connection states.AT+PING=<host>– Reachability tests (returns latency or error).AT+NETSTAT– Interface statistics (WiFi/Ethernet).AT+LOG=<level>– Sets temporary debug verbosity.- Reload button – Restores last saved configuration without host.
11. AT Command Highlights
| Command | Purpose |
|---|---|
AT+LIST | Enumerate supported commands |
AT+VER | Firmware version |
AT+NETIF | Select AP / STA / AP+STA / Ethernet |
AT+AP, AT+STA, AT+WCH, AT+NUMSTA | WiFi SSID/password/channel/STA limit |
AT+WAN, AT+DNS, AT+SEARCH | Ethernet IP/DNS/discovery |
AT+UARTn, AT+UARTTLn | Serial parameters and packaging |
AT+SOCKns, AT+SOCKENns | Socket definition and enablement |
AT+REGTPn, AT+REGMDn, AT+REGDATn | Registration packets |
AT+HEARTMDn, AT+HEARTTMn, AT+HEARTDATn | Heartbeat settings |
AT+MBCFGn, AT+MBCMDn, AT+MBJSn, AT+HJREG | Modbus scheduler & JSON mapping |
AT+MQCONFn, AT+MQAUTHn, AT+MQPUBn, AT+MQSUBn | MQTT workflows |
AT+HTPURLn, AT+HTPHDn, AT+HTPREQn | HTTP client settings |
AT+EDPn | Peer-to-peer configuration |
AT+DOWNLOAD | HTTP OTA |
AT+CACHEn, AT+SOCKRTO | Offline cache & auto-reboot |
AT+BKCFG, AT+RSTCFG, AT+CLRCFG | Backup/restore/factory reset |
- Linked Documents: Y202-W Specification · DTU Overview
- Manufacturer: Hunan Yanji Tech Co.,Ltd · Email: hi@yanjiiot.com
