Skip to content

Y212-G / Y212-GWR Technical Manual

Y212-GY212-GWR
Y212-GY212-GWR

Contents

  1. Overview
  2. Default Settings
  3. AT Command Conventions
  4. Server Connection and Online Strategy
  5. Serial Transparent Transmission and Packetization
  6. Serial Parameters and Online Control
  7. I/O and Analog Functions
  8. Status Query and Maintenance
  9. GNSS / LBS Positioning, Optional
  10. Wi-Fi / RJ45 Router Extension, Y212-GWR Only
  11. Troubleshooting

1. Overview

This manual applies to the Y212-G 4G DTU and the Y212-GWR 4G plus Wi-Fi plus RJ45 industrial router. Both products use the same AT command system and can be configured directly through the serial port, SMS, or remote API, without a graphical configuration tool.

ModelUplinkPhysical InterfacesTypical Application
Y212-GQualcomm Cat.4 global 4GRS232, RS485, 2 x IO, ADCTransparent DTU transmission and remote sensor data collection
Y212-GWRQualcomm Cat.4 global 4G + Wi-Fi STA / AP + dual RJ45RS232, RS485, TTL secondary UART, RJ45, Wi-Fi, 2 x IO, ADCWired / wireless multi-link backup, edge routing, remote maintenance

Frame format: All serial commands use 9600-8-N-1 by default, plain ASCII text, and end with \r\n.


2. Default Settings

ParameterDefault
Serial Baud Rate9600 bps
Data Bits / Parity / Stop Bits8 / None / 1
4G ModeQualcomm Cat.4, Cat.1 compatible, global 7-mode / 15-band support, with 2G / 3G fallback
4G BandsLTE-FDD B1/B2/B3/B4/B5/B7/B8/B12/B13/B17/B20/B25/B26/B28; LTE-TDD B34/B38/B39/B40/B41; WCDMA B1/B2/B5/B8; CDMA2000 BC0; GSM EGSM900/DCS1800/PCS1900
Heartbeat60 s, header $$$, AT*HBTIME=60, AT*HBHEAD=$$$
Registration PacketEnabled, format @@@ + DTUID, AT*REGPKG=1
DTUIDRead from module IMEI by default

3. AT Command Conventions

  • Set command: AT*CMD=param1,...,paramN\r\n, returns OK on success and ERROR on failure
  • Query command: AT*CMD?\r\n, returns +CMD:... followed by OK
  • Multiple commands can be sent in one batch, but a single command must not be split
  • Operations protected by the system password require AT*SYSPWD=<curr_pwd> first

4. Server Connection and Online Strategy

4.1 Server Configuration, Required

CommandDescriptionExample
AT*SERVERn=protocol,ip,portConfigure server channel n, 0 to 5. Protocol 0=TCP, 1=UDP, 8=HTTP, 9=MQTT, 10=Alibaba IoT, 14=MQTTS, 19=WebSocket, and moreAT*SERVER0=9,47.94.253.148,1883
AT*SERVERn?Query the selected server channelAT*SERVER1?

4.2 Online Mode, AT*GPRSMODE

ValueModeDescription
0OfflineNo automatic connection
1Always online, defaultAuto reconnect on disconnect, heartbeat keepalive
2Wake-up onlineGoes online after a wake-up command or SMS and disconnects after idle timeout
3On-demand onlineGoes online when serial data arrives and disconnects after idle timeout
4Scheduled onlineGoes online periodically according to AT*SCHTIME

4.3 Multi-Center Connection, AT*CHMODE

  • 0: Primary center only
  • 1: Primary / backup switchover, default
  • 2: Primary and backup connected at the same time, dual send
  • 3: Independent primary and backup channels, use SNDPORTn and RCVPORTn to distinguish them

4.4 Access Point Name, APN

Use AT*APN=apn,username,password. For standard IoT SIM cards in China, cmnet or cmiot may be used. Private SIM cards should follow carrier requirements.

4.5 Heartbeat and Registration Packet

CommandFunctionNotes
AT*HBHEAD=<pattern>Set heartbeat header, supports HEX, NID, FIX, and wildcards such as {DTUID} or {IMEI}
AT*HBTIME=<seconds>Heartbeat interval, 0 to 3600 s, 0 disables it
AT*REGHEAD=<text>Registration packet header, often used for backend identification
AT*REGPKG=<mode>0=off, 1=header+DTUID, default, 2=header only, 3=hex, 5=send registration packet to MQTT as well

5. Serial Transparent Transmission and Packetization

FunctionCommandDescription
Inter-frame intervalAT*DFI=<10~5000>Maximum inter-frame interval; when exceeded, the current frame is sent
Fixed frame lengthAT*DFLEN=<n>Send when received serial data reaches n bytes
Data modeAT*DATAMD=<0~3>0=stream, 1=frame, 2=JSON packet, 3=custom
Append IDAT*DATAID=<0~4>Controls whether DTUID or time is attached to the report
HEX / string conversionAT*HEX2STR, AT*STR2HEX0=off, 1=on
Header filterAT*DATAFLAG=...Transparently forwards only data matching specific headers; supports multiple headers with &
Data compareAT*CMPDATA=<0~2>1=drop duplicates, 2=polling comparison
Receive windowAT*RXDTIME=schedule,time_longPeriodically opens a receive window to reduce traffic
Hourly traffic limitAT*URFC=<KB>0 to 1000 KB/h
Buffer policyAT*BUFMODE=<0~2>Controls offline buffer retention policy
Buffer queryAT*BUFLEN?, AT*BUFCLNCheck or clear the buffer

6. Serial Parameters and Online Control

CommandFunction
AT*UART=baud,dataBits,parity,stopBitsSet main serial port; use AT*UARTB for the secondary UART
AT*WAKEUPTrigger online state in wake-up mode
AT*OFFLINEManually disconnect in on-demand or wake-up mode
AT*IDLTIME=<5~3600>Auto-disconnect timeout with no data, valid for modes 2 / 3 / 4
AT*SCHTIME=<minutes>Online interval for scheduled mode

7. I/O and Analog Functions

FunctionCommandDescription
GPO outputAT*GPO=no,modemode: 0=low, 1=high, 3/4=pulse, 5 to 8=indicator functions
GPI inputAT*GPI=mode,schedule,en1,en21=periodic report, 2=change report; use AT*GPI# to query state
ADC samplingAT*ADC?Returns millivolt value, 0 to 8000 mV, depending on model

8. Status Query and Maintenance

CommandDescription
AT*VERSION?Returns hardware and software version
AT*LIST?Lists all current settings
AT*CSQ?Queries cellular or Wi-Fi signal strength
AT*GSTATE?Checks online state for each center channel
AT*DSTATE?Checks runtime state such as no SIM, not registered, or low signal
AT*DTUIP?Queries the current dial-up IP
AT*REG?Returns registration status, LAC, and Cell ID
AT*ICCID?, AT*IMEI?Query SIM and device identifiers
AT*TIME?, AT*UTC?Query local and UTC time
AT*SYSPWD=curr,newChange system password, 6 digits
AT*RESET=<pwd>Restore default parameters and reboot
AT*RESTARTSoft reboot

9. GNSS / LBS Positioning, Optional

CommandDescription
AT*GPSCFG=mode,period,lbs_enable0=off, 1=server only, 2=serial only, 3=both, 4=on demand; period in seconds; lbs_enable=1 enables hybrid positioning
AT*GPSINFO=<n>0=GPRMC, 1=GPGGA, 2=both
AT*GMODE=<n>0=multi-constellation, 1=GPS, 2=BeiDou
AT*GPSID=<0/1>Controls whether DTUID is added to the location message
AT*GPSINFO?Returns the latest NMEA or LBRMC message
AT*GSQ?Queries satellite count
AT*LBS?Queries base-station positioning only
Modbus ReadUse 50 03 00 3D 00 04 D8 44 to read longitude and latitude as big-endian float values

GNSS messages update every 5 s by default. When send_period=0, the device reports once after the first position fix and then stops automatically.


10. Wi-Fi / RJ45 Router Extension, Y212-GWR Only

FunctionCommandDescription
Router / bridge modeAT*RMODE=<0/1>0=router, default; 1=bridge
Network environmentAT*RNWK=<0/1/2>0=local only, 1=LAN, 2=public, default
Wi-Fi STA / APAT*WSET=ssid,password,modemode=0 STA, 1 AP; AT*WSET1/2 configures backup SSIDs
Current uplinkAT*CNWK?Returns 0=offline, 1=WAN, 2=Wi-Fi, 3=4G
Client listAT*CLIST?Lists connected clients
Hotspot scanAT*WSCAN?Returns available SSIDs
Port 2 modeAT*WLAN=<0/1>0=LAN, 1=WAN, default
LAN subnetAT*LANIP=ipSets the internal gateway, default 192.168.77.1
WAN static IPAT*WANIP=ip,mask[,gw] or DHCPUsed for switch or fixed public network access
Wi-Fi STA static IPAT*WIFIIP=ip,mask,gw or DHCP
MAC queryAT*WMAC? for WAN, AT*WFMAC? for Wi-Fi, AT*LMAC? for LAN
Port forwardingAT*DNAT=index,sock_type,src_port,dest_ip,dest_portsock_type=tcp / udp / none

Reconnect the terminal after a subnet change. In AP mode, the password must be at least 8 characters long.


11. Troubleshooting

SymptomPossible CauseSuggested Command or Action
Cannot go onlineWrong server address or port, APN not configured, SIM not activatedAT*SERVERn?, AT*APN?, AT*REG?, AT*CSQ?
Serial port does not respondBaud rate mismatch or system password not verifiedAT*UART?, then send AT*SYSPWD=<pwd> before configuration
Data frames are malformedInter-frame interval or frame length not configured properlyAdjust AT*DFI, AT*DFLEN, and AT*DATAMD
Heartbeat or registration packet is not recognized by the cloudHeader format does not matchCheck AT*HBHEAD, AT*REGHEAD, and AT*REGPKG
GNSS cannot get a fixAntenna blocked or GNSS not enabledConfirm AT*GPSCFG and check whether AT*GPSINFO? returns status V
Wi-Fi cannot connect, GWR onlyWrong mode or password, or subnet conflictAT*WSET?, AT*LANIP?, AT*CNWK?

LED reference, Y212-GWR

LEDStatusMeaning
DATABlinkingSerial data activity
ServerOnConnected to center server
4GOn / 1 s blinkOnline / searching
Wi-FiOn in STA / 1 s on, 2 s off in APConnection status
NetworkBlinkingWAN active; blinking together with 4G or Wi-Fi means the device is searching

  • Manufacturer: Hunan YenGear Tech Co., Ltd.
  • Address: Room 21014, Building 1, Fudi Xingguang Tiandi, Yingxin Road, Yuhua District, Changsha, Hunan, China
  • Email: [email protected]
  • Website: www.yengear.com