USR IOT USR-TCP232-T2 User manual

USR-TCP232-T2 User Manual h.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
2 / 35
USR-TCP232-T2 User Manual................................................................................................................................ 1
1. Quick Start...............................................................................................................................................................4
1.1. Hardware Testing Environment................................................................................................................4
1.2. Connection...................................................................................................................................................4
1.3. Default Parameter...................................................................................................................................... 5
1.4. Data Transmission Testing........................................................................................................................5
2. Overview..................................................................................................................................................................6
2.1. Brief Introduction.........................................................................................................................................6
2.2. Features....................................................................................................................................................... 6
2.3. Parameters.................................................................................................................................................. 7
3. Hardware................................................................................................................................................................. 8
3.1. Hardware Information................................................................................................................................ 8
3.1.1. Pin Definition....................................................................................................................................8
3.1.2. Pin Dimension............................................................................................................................... 10
3.1.3. Evaluation Kit.................................................................................................................................10
3.2. Hardware Reference Design.................................................................................................................. 11
3.2.1. Typical Application Connection...................................................................................................11
3.2.2. Power Interface............................................................................................................................. 12
3.2.3. UART Interface..............................................................................................................................12
4. Module Function.................................................................................................................................................. 13
4.1 Work Model.................................................................................................................................................13
4.1.1. TCP Client Model..........................................................................................................................13
4.1.2. TCP Server Model........................................................................................................................ 14
4.1.3. UDP Client Model......................................................................................................................... 15
4.1.4. UDP Server Model........................................................................................................................16
4.1.5. HTTPD Client.................................................................................................................................17
4.1.6. TCP VS UDP................................................................................................................................. 17
4.2. DHCP and DNS Function....................................................................................................................... 18
4.3. VCOM.........................................................................................................................................................19
4.3.1. Module Works as Client...............................................................................................................19
4.3.2. Module Works as Server............................................................................................................. 20
4.3.3. Create VCOM................................................................................................................................ 21
4.4. Special Function....................................................................................................................................... 23
4.4.1. RS485 Function............................................................................................................................ 23
4.4.2. Link Function................................................................................................................................. 23
4.4.3. Factory Reset................................................................................................................................ 23
4.4.4. Reset Function.............................................................................................................................. 23
4.4.5. ID Function.....................................................................................................................................24
4.4.6. Index Function...............................................................................................................................24
4.4.7. Firmware Upgrade........................................................................................................................24
5. Parameter Setting................................................................................................................................................25
5.1. Webpage Setting...................................................................................................................................... 25

USR-TCP232-T2 User Manual h.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
3 / 35
5.1.1. Log in.............................................................................................................................................. 25
5.1.2. State Configuration.......................................................................................................................25
5.1.3. Local IP...........................................................................................................................................26
5.1.4. Serial Port.......................................................................................................................................27
5.1.5. Expand Function........................................................................................................................... 27
5.1.6. Misc Configuration........................................................................................................................28
5.1.7. Reboot............................................................................................................................................ 29
5.2. Software Setting....................................................................................................................................... 29
5.3. AT Command.............................................................................................................................................33
5.3.1. AT Command Model.....................................................................................................................33
5.3.2. AT Command Set..........................................................................................................................33
5.3.2.1. AT +ENTM.......................................................................................................................... 33
5.3.2.2. AT+Z.....................................................................................................................................34
5.3.2.3. AT+MAC..............................................................................................................................34
5.3.2.4. AT+CLEAR..........................................................................................................................34
5.3.2.5. AT+WANN...........................................................................................................................34
6. Contact Information............................................................................................................................................. 34
7. Disclaimer............................................................................................................................................................. 35
8. Undated History................................................................................................................................................... 35

USR-TCP232-T2 User Manual h.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
4/ 35
1. Quick Start
USR-TCP232-T2 is used for data bidirectional transparent transmission between TTL and Ethernet. T2
module itself complete protocol conversion, parameter can be set by built-in webpage or software. Once set
permanent preservation.
This chapter is quick start for using USR-TCP232-T2 module,we advice users to read it carefully and
operate personally, it can help you know about module generally.
Here is application case for inference:
http://www.usriot.com/support/application-case/usr-tcp232-series-application-case/
You can also email it to Customer Support Center:
http://h.usriot.com/
1.1. Hardware Testing Environment
To test T2 conversion function, user should connect T2 UART to computer by USB to TTL serial line, then
connect T2 LAN port to computer LAN port by internet cable. If you want to use T2 evaluation board, use USB
to RS232 serial line instead of USB to TTL serial line.
Here is schematic diagram for hardware link .
Diagram 1.2-1 Hardware Link
1.2. Connection
Computer should be set as follows:
1) Shut down firewall and anti-virus software .
2) Shut down unrelated network card, just use one local connection.
3) If you want connect module to PC directly, user should set static IP for computer which is in the
same network segment with module.

USR-TCP232-T2 User Manual h.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
5/ 35
1.3. Default Parameter
Item
Content
User name
admin
Password
admin
IP address
192.168.0.7
Subnet mask
255.255.255.0
Default gateway
192.168.0.1
Serial baud rate
115200
Serial parameter
None, 8 ,1
Local port
20108
Target IP
192.168.0.201
Target port
8234
Diagram 1.4-1 T2 Module Default Parameter
1.4. Data Transmission Testing
Steps for network communication parameters:
1) Install USR-TCP232-Test.exe .
2) Connect UART to PC, LAN to PC.
3) Protocol: TCP Server
Server IP: 192.168.201 ( PC Static IP )
Server Port No: 8234

USR-TCP232-T2 User Manual h.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
6/ 35
Diagram 1.4-1 Port to LAN Test
2. Overview
2.1. Brief Introduction
TCP232-T2 is a new and tiny size serial to Ethernet module which realizes data bidirectional transparent
transmission between TTL Port and RJ45 Port, it can also used in RS232/ RS485 by level shift circuit.
T2 is equipped with Cortex-M0 core. It has characters of low power, fast speed, high efficiency, strong
compatibility, it is easy to use.
2.2. Features
●Support DHCP (Dynamic Host Configuration Protocol);
●Support DNS (Domain Name System);
●Web-set: Setting parameters through web;
●Upgrade firmware via network;
●Support AUTO MDI/MDIX, can use a crossover cable or parallel cable connection;
●Serial port baud rate 600 bps ~460.8Kbps, and None, Odd, Even, Mark, Space, five check bits;
●Work mode: TCP Server, TCP Client, UDP Client, UDP Server, HTTPD Client;
●Working model related parameters can be set via a serial port or network;

USR-TCP232-T2 User Manual h.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
7/ 35
●Support virtual serial port, self-developed USR-VCOM software;
●Heartbeat package mechanism to ensure connection is reliable, put an end to connect feign death;
●User-defined registration package mechanism, check the status of connection;
●Under TCP Server model, Client number rangefrom1 to 16, default value is 4;
●Support User-defined MAC address;
●Restore factory default;
●Across the gateway, switches, routers;
●Across the gateway, across switches, routers;
●Provide(socket), VB, C++, Delphi, Android, IOS;
●Download application cases;
●Support customization;
2.3. Parameters
Parameter
Parameter Value
Voltage
VCC: DC 3.3V, 3.15V~3.45 V
VDD: DC 5V, 4.75V~5.5V
Current
130mA
Consumption
<1W
Serial Level
TTL
LAN Port
RJ45 with electromagnetism isolation
Packing
DIP
Size
PCB: 50.5*22.6mm(L*W)
Module: 55.0*22.6*23.1mm (L*W*H)
Temperature
Working temp: -25 ~ 75 °C
Storage temp: -40 ~ 105 °C
Storage humidity: 5% ~ 95% RH
Diagram 2.3-1 USR-TCP232-T2 Parameters

USR-TCP232-T2 User Manual h.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
8/ 35
3. Hardware
3.1. Hardware Information
3.1.1. Pin Definition
Diagram 3.1.1-1 T2 Interface Definition
NO
Pin
Function
Description
1
VDD
Power supply
Typical value 5V @ 200mA
2
VCC
Power supply
Typical value 3.3V @ 200mA
3
GND
Ground signal
Connect to ground
4
RST
Reset
Pin receive current below 200ms ,it can reset module.
If unneeded, don’t connect the pin .
(Power on , reset means restart the module)
5
TXD
Send data
TTL connect to 3.3v MCU
(For 5V, refer to Diagram 3.1.1-2)
6
RXD
Receive data
TTL connect to 3.3v MUC
(For 5V, refer to Diagram 3.1.1-2)
7
CFG
(Reload)
Pin for module
configuration
and restore
factory default
When normal working , don’t connect the pin or connect to
high level. Under low level, the pin is used for module
configuration, access to power then pull down“Reload” pin
Refer to 4.4.3 Factory Reset
Form 3.1.1-1 T2 Pin Definition

USR-TCP232-T2 User Manual h.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
9/ 35
Diagram 3.1.1-2 3.3V to 5V voltage conversion circuit
Diagram 3.1.1-3 Reserved Pin
1
485_en
Reserved
RS485 reserved pin
2
Link
Reserved
Used as indication pin for TCP connection status.
Refer to 4.4.2 Link Function
3
ISP
Reserved
Hasn’t use
Form 3.1.1-2 T2 Reserved Pin Definition

USR-TCP232-T2 User Manual h.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
12 / 35
Diagram 3.2.1-1 Typical Application Connection
Note:
1) RST: Restart button. It works at low level, 3.3V, 10K pull-up resistor inside. When it access to power or
breakdown, pull down 300ms then high level.
2) Link: connection indication.Can be used as indication pin for net connection, when connected, it outputs
low level; When unconnected, it output high level.
3) CFG(Reload): connect to external button or configuration pin. 3.3V, 10K pull-up resistor inside. Press
it and pull to low level, then release hands after 3 seconds, module restores factory default and restart.
4) UART_TXD/RXD: data rend/ receive signal(10K pull-up resistor inside)
3.2.2. Power Interface
USR-TCP232-T2 has dual power supply interface, 5.5 v and 3.3 v (only choose one)
Working current 150 mA, max current 200mA .
VCC: typical value DC 3.3V, 3.15V~3.45 V. It is used for 3.3 V MCU.
VDD: typical value DC 5V, 4.75V~5.5V. When connect to 5V MUC, refer to Diagram 3.2.3 -2 3.3V to 5V
voltage conversion circuit
3.2.3. UART Interface
UART can connect RS232 chip, UART has TXD/RXD signal wire. Take RS232 for example.
Diagram 3.2.3-1 UART Interface Design
If communicated with MCU (3.3V TTL), connect module’s TXD to MCU’S RXD, modules’ RXD to MCU’S
TXD. If MCU 5V TTL, need voltage conversion circuit, as follows:

USR-TCP232-T2 User Manual h.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
13 / 35
Diagram 3.2.3-2 UART Level Switch Design
4. Module Function
4.1 Work Model
4.1.1. TCP Client Model
1) Under TCP Client Model, T2 connects TCP Server actively, establish a long connection to data
transparent transmission.
Diagram 4.1.1-1 TCP Client Setting

USR-TCP232-T2 User Manual h.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
14 / 35
Diagram 4.1.1-2 TCP Client Model
4.1.2. TCP Server Model
1 ) Under TCP Server Model, T2 monitors local port, it will response and establish a connection when
there is a request. Up to 4 links at the same time. Once received data, T2 serial port will send data to all the
devices which connect to the link.
2) Under TCP Server Model, TCP Client number: 1-16, default value 4.
Diagram 4.1.2-1 TCP Server Setting

USR-TCP232-T2 User Manual h.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
15 / 35
Diagram 4.1.2-2 TCP Server Model
4.1.3. UDP Client Model
1) Under UDP Client, Module T2 won’t establish the connection actively. It can only communicate with the
target port whose IP has been set. When serial port receive data, it send data to target IP and port. If data
doesn’t come from this channel, it will not be accepted by T2.
2) Under UDP Client, if target IP is set as 255.255.255.255, it can realize function of broadcast, also can
receive broadcast data.
3) Under UDP Client, maximum data length is 1460 (MCU to T2)

USR-TCP232-T2 User Manual h.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
16 / 35
Diagram 4.1.3-1 UDP Client Model
4.1.4. UDP Server Model
1) UDP Server is based on normal UDP, it doesn’t validate the source of IP address. Once received UDP
data, it convert target IP to data source IP, similar to TCP Server.
2) Under UDP Server, T2 module record an IP, when T2 receives data, it send to record IP. T2 also works
as a server, can receive data from Ethernet, convert target IP to data source IP.
Diagram 4.1.4-1 UDP Server Setting

USR-TCP232-T2 User Manual h.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
17 / 35
Diagram 4.1.4-2 UDP Server Model
4.1.5. HTTPD Client
This function is used for developer.
1) Module T2 send data to HTTP Server or receive from HTTP Server, complex HTTP protocol will be
done by T2, it is convenient for user to programming.
2) T2 received data from HTTP Server will send to serial port without process.
3) According to demand, user can define HTTP content.
4.1.6. TCP VS UDP
TCP
UDP
Advantages
Stable;
Not easy to lose data package;
Reliable connection mechanism;
Transmission interval is accurate;
No connection mechanism;
Easy and flexible;
Disadvantage
Easy to block up Information;
Because of check and resend
mechanism, interval isn’t accurate
Under bad network condition, it is
high risky to losing data package

USR-TCP232-T2 User Manual h.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
18 / 35
4.2. DHCP and DNS Function
DHCP: Dynamic Host Configuration Protocol
When T2 connects to remote server, it can obtain an IP address automatically which router or gateway
distributed. If you don’t know how to set IP address or it can’t connect because of the set IP is not in the same
segment, the function is helpful for you.
Diagram 4.2-1 DHCP
DNS: Domain Name System
e.g. domain name sever is cloud usr.cn, when we don’t know Server IP or Server IP changed, this function
plays an important role.
Note: when use NDS function, T2 gateway must be same as router IP or choose DHCP function.

USR-TCP232-T2 User Manual h.usriot.com
Jinan USR IOT Technology Limited www.usriot.com
19 / 35
Diagram 4.2-2 DNS
4.3. VCOM
USR-VCOM Download: http://www.usriot.com/usr-vcom-setup-software-v3-7-1-520/
USR-VCOM Manual: http://www.usriot.com/usr-vcom-setup-software-user-manual-v3-5-2/
If user’s upper computer and device are all connect by serial port, user can create a COM which has TCP/
IP to realize remote control by USR-VCOM software.
1) Turn off firewall and anti-virus software.
2) Install USR-VCOM.
I advise user to choose “Search”or “Smart vcom” to create virtual port. Please refer to 4.3.3
4.3.1. Module Works as Client
1) Set module parameters. T2 work model: TCP Client.
2) Open USR-VCOM, set virtual port as follows :
Other manuals for USR-TCP232-T2
1
Table of contents