0% found this document useful (0 votes)
252 views67 pages

(User Manual) USR TCP232 T2 User Mannul

Uploaded by

Ankit Ghevariya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
252 views67 pages

(User Manual) USR TCP232 T2 User Mannul

Uploaded by

Ankit Ghevariya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 67

USR-TCP232-T2 user manual www.usriot.

com

USR-TCP232-T2 User Manual

File version: V1.1.1

Jinan USR IOT Technology Limited 1 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Contents

USR-TCP232-T2 User Manual......................................................................................................................................................1


1. Quick Start...............................................................................................................................................................................4
1.1. Hardware Testing Environment....................................................................................................................................4
1.2. Connection...................................................................................................................................................................4
1.3. Default parameter........................................................................................................................................................6
1.4. Data transport test....................................................................................................................................................... 7
2. Overview................................................................................................................................................................................. 8
2.1. Brief Introduction.........................................................................................................................................................8
2.2. Features........................................................................................................................................................................8
2.3. Basic parameters..........................................................................................................................................................9
3. Hardware parameter.............................................................................................................................................................10
3.1. Pin define................................................................................................................................................................... 10
3.1.1. Pin Definition.................................................................................................................................................. 10
3.1.2. Dimension.......................................................................................................................................................12
3.1.3. Evaluation Kit.................................................................................................................................................. 12
3.2. Hardware Reference Design...................................................................................................................................... 14
3.2.1. Typical Application Connection.......................................................................................................................14
3.2.2. Power Interface...............................................................................................................................................14
3.2.3. UART Interface................................................................................................................................................ 15
4. Module function................................................................................................................................................................... 15
4.1. Network basic function..............................................................................................................................................16
4.1.1. IP address/ subnet masks/gateway.................................................................................................................16
4.1.2. Web server......................................................................................................................................................17
4.1.3. Firmware upgrade in webpage....................................................................................................................... 18
4.2. Socket function.......................................................................................................................................................... 18
4.2.1. TCP Client........................................................................................................................................................19
4.2.2. TCP Server.......................................................................................................................................................21
4.2.3. UDP Client.......................................................................................................................................................22
4.2.4. UDP Server......................................................................................................................................................23
4.2.5. Httpd Client.....................................................................................................................................................24
4.2.6. TCP and UDP mechanism................................................................................................................................26
4.3. DHCP and DNS Function............................................................................................................................................ 26
4.4. VCOM.........................................................................................................................................................................28
4.4.1. Module Work as Client................................................................................................................................... 28
4.4.2. Module Work as Server.................................................................................................................................. 29
4.4.3. Create VCOM.................................................................................................................................................. 30
4.5. Serial port function.................................................................................................................................................... 31
4.5.1. Basic parameters............................................................................................................................................ 31
4.5.2. Serial port framing.......................................................................................................................................... 32
Jinan USR IOT Technology Limited 2 www.usriot.com
USR-TCP232-T2 user manual www.usriot.com
4.5.3. RFC2217..........................................................................................................................................................32
4.6. Special function......................................................................................................................................................... 33
4.6.1. Heartbeat package..........................................................................................................................................33
4.6.2. Registration package.......................................................................................................................................33
4.6.3. USR-cloud....................................................................................................................................................... 34
4.6.4. Customize webpage........................................................................................................................................36
4.6.5. Link..................................................................................................................................................................37
4.6.6. Reset............................................................................................................................................................... 37
4.6.7. Index............................................................................................................................................................... 37
4.6.8. The number of the connected client.............................................................................................................. 37
4.6.9. State................................................................................................................................................................ 38
4.6.10. Short connection.......................................................................................................................................... 38
4.6.11. Clear buffer data........................................................................................................................................... 39
4.6.12. Restore out time........................................................................................................................................... 39
5. Parameter setting..................................................................................................................................................................40
5.1. Network protocol setting parameter.........................................................................................................................40
5.1.1. Setting software setting parameter................................................................................................................40
5.1.2. Protocol configuring to setting parameters....................................................................................................46
5.2. Webpage setting parameters.....................................................................................................................................46
5.2.3. Serial port....................................................................................................................................................... 49
5.3. AT comment...............................................................................................................................................................52
5.3.1. AT command overview............................................................................................................................................52
5.3.2. AT command error code................................................................................................................................. 53
5.3.3. AT command................................................................................................................................................... 53
5.3.4. AT command................................................................................................................................................... 54
6.Contact us.............................................................................................................................................................................. 67
7.Disclaimer.............................................................................................................................................................................. 67

Jinan USR IOT Technology Limited 3 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

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 RT232 serial line
instead of USB to TTL serial line.

Diagram 1.1-1 Hardware Link

Note: The power and cable are from USR.

1.2. Connection
To prevent the thing that occur when the custom use it like can not find server, can not ping and can not open the
webpage. After connect you should check the computer before used.

1) Shut down firewall and antivirus software.

Jinan USR IOT Technology Limited 4 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Diagram 1.2-1
2) Shut down network card none-related, reserve one connect.

Diagram 1.2-2

Jinan USR IOT Technology Limited 5 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

3) If you want to connected module to PC directly, user should set static IP for computer which is in the same
network segment with module.

Diagram 1.2-3

1.3. Default parameter

Item Intro
User name admin

Password admin

IP address 192.168.0.7

Subnet masks 255.255.255.0

Default gateway 192.168.0.1

Work mode TCP client

Target port 8234

Local port 20108

Target IP 192.168.0.201

Serial port baud 115200

Serial parameter None/8/1

Diagram 1.3-1 T2 Module Default Parameter

Jinan USR IOT Technology Limited 6 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

1.4. Data transport test

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

Baud rate:115200

Serial port parameters: None/8/1

From now, we can perform the send/receive data test. The direction from serial to network is: serial port of PC_> T2
serial port _> T2 ethernet port_>PC. The direction from net work to serial is: PC network _> T2 ethernet port_> T2 serial
port _> serial port of PC

The diagram as below:

Diagram 1.4-1 Port to LAN Test

Jinan USR IOT Technology Limited 7 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

2. Overview

2.1. Brief Introduction


USR-TCP232-T2 is TTL to Ethernet module, which can realize the bi-direct data transparent transmission between RJ45
port and TTL serial port. It can be applied to interface 232 and 485 by level conversion circuit.
Equipped with Cortex-M0 core, fast speed and high efficiency. Support several function meet more need.
T2 module is easy to operate and has strong compatibility.On the basis of adding new functions, it is compatible with
the setting protocol of T24 series to provide convenience for old users.At the same time, a setting protocol similar to M4 is
added. For customers who adopt other series of products, it can be applied to T2 only by simple adjustment.

2.2. Features
 10/100Mbps can adopted to Ethernet, support AUTO-MDIX switching of network cablle crossovers.
 Work mode:TCP server, TCP client, UDP server, UDP client, Httpd client.
 Baud of the serial port can edit from 600bps to 460.8Kbps. Support five ways to check including None, Odd, Eben,
Mark, Space.
 Customize heartbeat package, keep the connection real and reliable, no crash.
 Customize registration package, check the connection status, and also customize the head of package,choose the
MAC address to be the registration package.
 In TCP Server mode, the number of client connected can be modify from 1 to 16, default is 4. The IP of connected
client can be see. Send and receive data according to connection calculation.
 In TCP Server mode, when the client number reach the max number, the new client can instead of the old one or not
can be set.
 Support webpage,AT command, serial port protocol,webpage setting parameter,setting protocol. Provide custom to
use in their own software.
 Support TCP client short connection, the time can be set.
 Support reset out time, the time can be set.
 Before the TCP connect, whether clear the data before can be set.
 Support DHCP, get IP automatically
 The unique MAC address in the world, and the address can be modify. Support the function of customize MAC.
 Support DNS, domain name resolution.
 Support customize the address of DNS server.
 Support upgrade the firmware from webpage, more convenient.
 Support v-com
 Support across the gateway, switching and router
 Support work in LAN, also can access the external.

Jinan USR IOT Technology Limited 8 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

2.3. Basic parameters


Hardware parameters
Work voltage VCC: DC 3.3V, 3.15V~3.45 V
VDD: DC 5V, 4.75V~5.5V
Run current 150mA@5V/3.3V
LAN port RJ45 with electromagnetism isolation
Serial baud rate 600-460.8K(bps)
Serial standard TTL-3.3V
Software parameters
Network protocol IP, TCP/UDP, ARP, ICMP, IPV4
Method of IP access Static IP, DHCP
Domain name solution Support

User setting Software setting, webpage setting, AT command setting


Simple transparent transport TCP server /TCP client/ UDP server / UDP client

RFC2217 Support
Httpd client Support
TCP server Max number of connected TCP is 16(can customize)
Network cache Send: 6Kbyte; receive: 4Kbyte
Serial cache Receive:800byte
Average transport delay <10ms

Set of software V-COM; USR- cloud; parameter setting


Packaging mechanism
4 byte packaging time; 400 byte packaging length

Others
Certification CE, FCC
Size 50.5*22.6*15.0 mm (L*W*H)
Working temp: -25 ~ 75 °C
Storage temp: -40 ~ 105 °C
Temperature Storage humidity: 5% ~ 95% RH

Packaging Electrostatic bubble


Diagram 2.3-1 USR-TCP232-T2 Parameters

Jinan USR IOT Technology Limited 9 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

3. Hardware parameter

3.1. Pin define

3.1.1. Pin Definition

Diagram 3.1.1-1 T2 Interface Definition

NO Pin Function Instr


1 VDD Power Power: 5V@200mA
2 VCC Power Power: 3.3V@200mA
3 GND Ground location Grounding
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 Pin for module When normal working , don’t connect the pin or
(reload) configuration and connect to high level. Under low level, the pin is
restore used for module configuration, access to power
factory default then pull down“Reload” pin
Refer to 4.4.3 Factory Reset
Form 3.1.1-1 T2 Pin Definition

Jinan USR IOT Technology Limited 10 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Diagram 3.1.1-2 3.3V to 5V voltage conversion circuit

Diagram 3.1.1-3 Reserved Pin

1 485-en Reserve pin RS485 enable pin

2 Link Reserve pin Used as indication pin for TCP connection status.
Refer to 4.4.2 Link Function
3 ISP Reserve pin Hasn’t use

Form 3.1.1-2 T2 Reserved Pin Definition

Jinan USR IOT Technology Limited 11 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

3.1.2. Dimension

Diagram 3.1.2-1 T2 Dimension

3.1.3. Evaluation Kit

USR-TCP232-EVK evaluation board can be used for TCP232-T2

Jinan USR IOT Technology Limited 12 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Diagram 3.1.3-1 Evaluation Kit

Jinan USR IOT Technology Limited 13 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

3.2. Hardware Reference Design

3.2.1. Typical Application Connection

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

Jinan USR IOT Technology Limited 14 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

3.2.3. UART Interface

UART can connect RS232 chip, UART has TXD/RXD signal wire. Take RS232 Level 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:

Diagram 3.2.3-2 UART Level Switch Design

4. Module function
Here are the function of T2, below is the overall block diagram.

Jinan USR IOT Technology Limited 15 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Diagram 4-1 Module Functions

4.1. Network basic function

4.1.1. IP address/ subnet masks/gateway

1. IP address is the identity representation of the module in the LAN, which is unique in LAN. So it can not be repeated.
There are two ways to access the network: static IP and DHCP.
 Static IP
Static IP need to be setting handy. Meanwhile write the IP, subnet masks and modbus gateway. Static IP can be used
in.
Advantage: can be searched when the device accesses the IP that can not distribute.
Disadvantage: can not communicate if the device in the different port of the different LAN

 DHCP
Main function is get the IP address, gateway address, DNS server address from the gateway holder, and no need for
the complex steps. Adopted to the situation have little requirement for IP and do not ask the IP to corresponds to module.
Advantage: access the devices that support DHCP server like router can communication directly. Reduce the trouble of
setting IP address gateway and subnet masks.
Disadvantage: directly to the computer in the net do not support the DHCP server, T2 can not work
2. Subnet masks mainly used to determine the host number and the network number, indicates the number of subnet and
determine the flag within the subnet. The subnet masks needed to set,usually we use the subnet masks: 255.255.255.0,
the network number is the former 24, the holder name is the last 8, number of subnet is 255, the module IP is in the range
of 255, and then we are sure that the module IP is in this subnet.
3. Gateway means the net number of the current IP that module in. If connect the device like router when access the
external, the gateway IP is the router IP, if there is some thing wrong with setting, can not access the external net. If no
need to connect the router, keeping default is ok.
4. Reference AT command
Jinan USR IOT Technology Limited 16 www.usriot.com
USR-TCP232-T2 user manual www.usriot.com
command name Instr

AT+WAN Setting and query the access way of T2 IP, IP/subnet


masks/gateway parameter
Form 4.1.1-1 AT command
5. Software setting:

Diagram 4.1.1-1 Software Setting

4.1.2. Web server

T2 has its own webpage server, same as the normal webpage server, which is convenient for user to setting parameter
and query the status of T2.
The port of webpage can be setting, default is 80.
Steps:
 Open the browser, fill the IP of T2, e.g.:192.168.0.7(IP address and PC in the same net.)
 Fill the user name and key word in the login webpage, default is admin, click the sure and enter.
Then there is the status webpage:

Jinan USR IOT Technology Limited 17 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Diagram 4.1.2-1 Webpage

4.1.3. Firmware upgrade in webpage

Webpage upgrade the firmware, stable and simple. Use this new function, meet the custom requirement. If you need
to upgrade, you can query us from the USR support or ask firmware from supply. The way to upgrade please refer the
5.1.1.

4.2. Socket function

The work mode for T2 divide into five: TCP Client、TCP Server、UDP Client、UDP Server、Httpd Client. You can use
webpage and setting software. The page is as fellows:

Diagram 4.2-1 Socket

Jinan USR IOT Technology Limited 18 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Related AT command
command name Instr
AT+sock Setting the work mode/target IP/ target port
Form 4.2-1 socket AT command

4.2.1. TCP Client

It has to be connected before transferring data.


1) In TCP Client Mode,TCP232-T2 connects TCP Server actively, establish a connection to transmit date. According to
the TCP protocol related rule, there difference for TCP client between connect and disconnect, to make sure the data
exchange more stable. Usually used in the data interaction between device and server, which is the most common form of
network communication.
2) In TCP Client Mode, support the function of identifying disconnected link. When connected, it will send keepalive
package every 15s. If unconnected, it can be detected timely and enforce T2 to disconnect the former link to establish a
new one.
3) When TCP232-T2 try to connect remote server, if the local port number is not “0" ,it will establish a connection
with the same source port every time.
4) Support synchronizing baud rate, USR-cloud and short connection function.
5) In a LAN, if the T2 is static IP, please keep T2 IP stay in the same network segment with gateway, and setting the
gateway IP, otherwise can not work as normal.
6) Note: keepalive, synchronizing baud rate and USR-cloud are more on the below.

Jinan USR IOT Technology Limited 19 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Diagram 4.2.1-1 TCP Client Setting

Diagram 4.2.1-2 TCP Client Model

Jinan USR IOT Technology Limited 20 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

4.2.2. TCP Server

1) In TCP Server Mode, T2 monitors local port, it will response and establish a connection when there is a request. When
the T2 receive the data, it will send it to all the client connected to T2, meanwhile, this mode can monitor the connect
timely with keepalive function.
2) Usually it is used in the LAN communicating with TCP client. Adopt the case that more than one PC or phone asking data
without server. Same as the TCP client ,there are different between connect and disconnect.
3) Support synchronizing baud rate.
TCP Client number is from 1 to 16, default value 4. the port is fixed., can not be set to 0.

Diagram 4.2.2-1 TCP Server Setting

Jinan USR IOT Technology Limited 21 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Diagram 4.2.2-2 TCP Server Model

4.2.3. UDP Client

1) The Model belongs to UDP Protocol.


2) In UDP Client Mode, TCP232-T2 won’t establish the connection actively.
3) It can communicate with the target port whose IP has been set. If data doesn’t come from this channel, it will not be
accepted by TCP232-T2.
4) In UDP Client Mode, if target IP is set as 255.255.255.255, it can realize function of entire network broadcast, also can
receive broadcast data. 4015and the later vision support broadcast. e.g.xxx.xxx.xxx.255

Diagram 4.2.3-1 UDP Client Model

Jinan USR IOT Technology Limited 22 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

4.2.4. UDP Server

1) UDP server is a IP address do not verify the resource in the normal UDP. After receive every UDP package, change the
target IP into data resource IP and port. When sending data, sending to the least IP and port.
2) Usually this mode, several net device communicate with module and do not want to use TCP for high frequency.

Diagram 4.2.4-1 UDP Server Setting

Jinan USR IOT Technology Limited 23 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Diagram 4.2.4-2 UDP Server Model

4.2.5. Httpd Client

In this mode , users’ terminal device can send required data to assigned HTTPD server via USR-TCP232-T2, and when
TCP232-T2 receives the data from HTTP server, analyzes the data and sends the result back to the serial port.
No need for paying attention to the process of data conversion between the serial data and net data package. Simple
parameter setting can realize the requirement serial device sent to HTTP server.

Jinan USR IOT Technology Limited 24 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Diagram 4.2.5-1HTTPD client Webpage


1.Setting USR-TCp232-T2 as Httpd Client mode via webpage, and setting corresponded remote port and remote IP.
2.Configure HTTPD request method ( Httpd chose such as Get or Post), Httpd URL(request packet URL) and Httpd
header ( packet header information) by webpage
3.The return data whether drop the package header can be set by webpage: remove HTTPD head
4.Click save, then restart the module to work.
5.Open serial port to send data, then the data of the serial port will submit to your webpage, meanwhile the serial
port will receive the reply.
6. Please refer to the following diagram on sending requests

Jinan USR IOT Technology Limited 25 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Diagram 4.2.5-1HTTPD client

4.2.6. TCP and UDP mechanism

TCP UDP
Stable; Transmission interval is accurate; No
Advantages Not easy to lose data package;
connection mechanism;
Reliable connection mechanism;
Easy and flexible;
Disadvantage Easy to block up Information; Under bad network condition, it is
Because of check and resend high risky to losing data package
mechanism, interval isn’t accurate

4.3. 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.
Jinan USR IOT Technology Limited 26 www.usriot.com
USR-TCP232-T2 user manual www.usriot.com

Diagram 4.3-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.

Diagram 4.3-2 DNS

Jinan USR IOT Technology Limited 27 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

4.4. 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.4.3

4.4.1. Module Work as Client

1) Set module parameters. T2 work model: TCP Client.


2) Open USR-VCOM, set virtual port as follows :

Diagram 4.4.1-1 Create Server Virtual Port

Jinan USR IOT Technology Limited 28 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Diagram 4.4.1-2 Monitor Date

4.4.2. Module Work as Server

1) Set T2 work model: TCP Server.


2) Set virtual port as follows:

Diagram 4.4.2-1 Create Client Virtual Port

Jinan USR IOT Technology Limited 29 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

4.4.3. Create VCOM

1) Create VCOM by “search” button.

Diagram 4.4.3-1 Search Function

Diagram 4.4.3-2 Search Function

2) Automatically Create

Jinan USR IOT Technology Limited 30 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Diagram 4.4.3-3 Smart VCOM

4.5. Serial port function

4.5.1. Basic parameters

Diagram 4.5.1-1 software setting

Jinan USR IOT Technology Limited 31 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Serial port basic parameters including: baud rate; data bits; stop bits; parity.
1. Baud rate: communicating speed of serial port, can be set from 600~460.8Kbps, support random baud rate.
2. Data bits:the range of it from 5 to 8.
3. Stop bits:can set from 1 to 2.
4. Parity: support none, odd, even, mark and space

4.5.2. Serial port framing

Since the data on the network is transmitted in the unit of data frames, it is necessary to send the frame data via serial
port to the network, so as to transmit data more efficiently and quickly.T2 packages serial port data according to fixed
packaging length and packaging time during data transmission.The default T2 packaging time is 4 bytes of packaging time
and 400 bytes of packaging length.
The frame mechanism of serial port is based on the packaging time and the packaging length.
Serial port packaging time: the default is 4 bytes of send time.
Serial port package length: default package length is 400 bytes

4.5.3. RFC2217

This function is used to change USR-TCP232-T2 serial port parameter through network. E.g: change baud rate from
115200bps to 9600bps. It can be set by software or webpage.
By default ,it is in open state.
When using VCOM software, this function also works, the baud rate of software in PC will match Autonomic with the
baud rate of USR-TCP232-T2, don’t need to focus on serial port baud rate.
After restart, it is default parameter.

Diagram 4.5.3-1 RFC2217


Jinan USR IOT Technology Limited 32 www.usriot.com
USR-TCP232-T2 user manual www.usriot.com

4.6. Special function

4.6.1. Heartbeat package

In the transparent transport mode, user can choose T2 to send heartbeat package. Heartbeat package can be sent to
net server, also can send to serial port, but can not send in the same time.
Sending to the net aimed at connecting with server, effect only in TCP client and UDP client.
In the application of the server sending fixed query command to device, to reduce the communication flow. The user
can choose using the serial port to send the heartbeat package instead of the heartbeat from server.
The content of heartbeat package can be defined. The longest content is 40 bite. Time set from 1s to 255s.
It can ensure connection is reliable, put an end to connect feign death.

Diagram 4.6.1-1 heartbeat package

4.6.2. Registration package

In the transparent transport mode, user can choose T2 to send registration package. Registration package is used to
identify data sources or do as the code to get the server authorization.
Registration package can be sent when the T2 built connection with server, also can installed in the head of the data
package, as a data package. Registration package data can be MAC address or customize registration package data, where
the custom registry setting content is up to 40 bytes.
The connection setting and sending registration package is mainly used to connect the server that needs to be
registered. By default, this function is not checked.
Data carries the registration package: sending data in the front of the data access to the registration package,mainly
for protocol transmission application.

Jinan USR IOT Technology Limited 33 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Diagram 4.6.2-1 registration package

4.6.3. USR-cloud

Diagram 4.4.3-1 USR-cloud


USR-Cloud software is a platform for communication between devices and PC software. The cloud software is mainly used
for data transmission or monitoring remotely. This function only works in TCP client mode.
 Login link of USRIOT Cloud: http://console.usriot.com
 Remote server address: console.usriot.com
 Local port: The port of device, Remote port: Cloud software’s port
 Device ID: It is assigned to device by cloud software
 Communications Code: Pass word generated after adding the device to cloud software
The following is test account of USR-Cloud:
Account: jin321_
Password: 1987322

Jinan USR IOT Technology Limited 34 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Also can be set in the webpage as fellows:

Jinan USR IOT Technology Limited 35 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

4.6.4. Customize webpage

T2 support customize webpage. The user can upgrade their webpage into T2 via customize webpage. To be more
convenient for user, we have prepared upgrade webpage package in our website:
https://www.usriot.com/support/downloads/customized-webpage-usr-tcp232-t2-s2-customized-webpage-v4017.html
including webpage code, webpage tools can be download.

Diagram 4.6.4-1 webpage package

Upgrade webpage need to note that, destination IP set to be the IP address of T2, the final name of file is “fs”,product
choose the”M0”, then click the upgrade.

Diagram 4.6.4-2 upgrade

Jinan USR IOT Technology Limited 36 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

4.6.5. Link

Link pin is the status indicator pin for T2 to built communication. Link pin can be used as indication pin for TCP
connection status.
When connected, it output low level; When unconnected, high level.
When T2 is under TCP model, Link pin will pull down. otherwise, it stays in high level.
When T2 is under DUP model, Link pin will always pull down. By default, it is not checked.

4.6.6. Reset

Reset used when the T2 fly or crash and can not built the normal connection,so can not work. Reset to initialize the
module to resume normal operation.
When T2 works as TCP Client, T2 connects to TCP Server actively. When start Reset function, T2 try to connect to TCP
Server for 30 times. If failed, T2 will restart automatically. By default, it won’t be chose.

4.6.7. Index

Index is to resolve the problem that in TCP server mode, T2 can not divide the data sources or send data to special
client when user have more than 2 client to connect the T2.
At most there can be 16 links when the T2 in the TCP server mode. The max number can set from 1to 16 as you want.
Here we take the default number is 16 as example. Server send data to 16 clients, or the server receive the data from 16
clients, open the Index, mark to divide the different clients and user can recognize the data sources according to the mark,
meanwhile send different data to special clients.
Index function can be set by software or web-page.

4.6.8. The number of the connected client

Then the USR-TCP232-T2 work in the TCP server mode, the max number of client to connect is 16, default is 4,the max
number can be configuring as you want, which is be convenient for use. When the the number connecting clients more
than 4, we should control the total data flow in 2.5KB/s if we need to send and receive meanwhile(not more than 200
bite/s).
If the number is 16 now, default use the new link instead of the older one, also you can set to use the older one. The
webpage are as fellow.

Jinan USR IOT Technology Limited 37 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com
Diagram 4.6.8-1 max client connect to TCP server

4.6.9. State

In the webpage of the USR-TCP232-T2, there is the state config page, which can show the current IP and the each
connection sends data and the number of bytes of connection data, along with the total number of bytes sent and
received by the T2 server on the page.
Now,under the TCP client mode, T2 can statistic the former 5 IP of devices and the number of the sent and received
data. Refresh every ten seconds automatically. Under the TCP server mode, the T2 only static the number of the sent and
received data, no connected IP.

Diagram 4.6.9-1 State Configuration

4.6.10. Short connection

The aim to use this function is to save the resource of the server,usually used in the points to one point. Using the
short connection can sure the current connection is the useful one, no extra control tools to screening.
TCP short connection can used in the TCP client, open it and send message. The connection will be broken
automatically.
This function default to be off, the interval of disconnect can be configured after this function is open, the range from
2 to 255s, default is 3s, the diagram is as fellow:

Jinan USR IOT Technology Limited 38 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Diagram 4.6.10-1 impersistent connection Configuration

4.6.11. Clear buffer data

If the TCP have not built, the data that serial received will be placed in the cache, and the T2 serial port can receive
2Kbyte, after the TCP built, you can select is clear the cached data.
The default is not. Under the Httpd client mode or the TCP client mode, open the short connection and this function
has no power.

Diagram 4.6.11-1 clear buffer data Configuration

4.6.12. Restore out time

Restore out time is to make sure the long and stable work of T2, when the net port or network can not receive data
for long time, T2 will restore out the setting time to avoid abnormal conditions affect the connection. Time for restore can
set in the webpage. The normal work time of this function set 60~65535s, default is 3600s. if setting time less than 60s,
default to be 0 and turn off this function. The setting is as fellow:

Jinan USR IOT Technology Limited 39 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Diagram 4.6.12-1 reset timeout Configuration

5. Parameter setting
This character mainly to introduce how to setting the T2 parameters. Achieve their own personalized application
through parameter settings
Including setting software setting parameter, webpage setting parameter and serial setting parameter.
User setting steps:
Modify the user name and password→ setting the access way to the IP address→ serial parameter→ the related
parameter for work method.
To ensure the normal use of software, the following steps are necessary
1. When using setting software to setting parameter, T2 and the PC of the setting software are in a LAN.
2. Close the antivirus software and firewall software.
3. Close the irrelevant network card.

5.1. Network protocol setting parameter

5.1.1. Setting software setting parameter

Open the software and click search, searching all the T2 in the LAN. The information you need to search including
current IP, device name, MAC address and the vision of T2.
(download: https://www.usriot.com/support/downloads/usr-m0-setup-software-v224287.html).

Jinan USR IOT Technology Limited 40 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Diagram 5.1.1-1 Search

1. Click the searching content, check the password of the T2 at first, if the password is right, the information for T2
will be shown. If the password is wrong, the software will pop-up a window for username and password. Fill in the right
one and click enter. The default name and password are admin), so if all thing are default, the setting software will not
pop-out the widow of username and password.

Jinan USR IOT Technology Limited 41 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Diagram 5.1.1-2 Search

2. Basic parameter setting


Click the searching device and you can see the basic parameters needed to set, combined with the function
introduction of the third chapter, setting the parameter you need, then click the save. All the parameters you need have
been set successfully, others keep default, no modify.

Jinan USR IOT Technology Limited 42 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Diagram 5.1.1-3 Basic parameters

 HTTP port: the port default is 80


 Username: the login username of T2, the authentication code for modify the parameter, can prevent other users
modify the parameters of T2 in LAN.
 Password: the password of the T2, correspond with username.
 Device name: the T2 name can be customize.
 IP type: static IP and DHCP
 Module Static IP: the static IP of T2, please put it in the same LAN when setting it.
 Subnet masks: default is 255.255.255.0
 Gateway: usually is the router IP, after correct setting you can communicate across the LAN and do the domain name
resolution.

3. Serial parameter

Jinan USR IOT Technology Limited 43 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Diagram 5.1.1-4 Serial parameters

 Serial baud rate: the baud rate for serial port communication, both standard and customize baud rate are ok.
 Parity/data/stop: serial port parameters
 Work mode: TCP Server /TCP Client/Httpd Client/UDP Client/UDP Server
 Remote IP: when T2 works in TCP client, UDP client and HTTPD client mode as a client, the IP or domain name of the
server that it connected.
 Similar RFC2217: ussed if need to change the serial port in transport. Use with V-COM or you can reference the
software manual.

4. Check data

Jinan USR IOT Technology Limited 44 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Diagram 5.1.1-5 Check Streams

5. Press CFG (Reload) and click “operate via COM”

Diagram 5.1.1-6 Port setting

Jinan USR IOT Technology Limited 45 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

6. Firmware upgrade
If the module firmware need to upgrade to the high vision,user can consult with sales to get the upgraded firmware
and click the device, upgrade the vision. When you upgrade it,connect directly the device and PC and notice that PC
upgrading module is forbidden.
Select the device and right click, then upgrade the firmware.

Diagram 5.1.1-5 Serial parameters

5.1.2. Protocol configuring to setting parameters

Achieve it: searching→ setting→ save→ restore using protocol, which is convenient for user to make their setting
software, details you can find the “USR-TCP232-T2 software manual”.

5.2. Webpage setting parameters

Open the browser and enter the IP of T2, default is 192.168.0.7 or you can click right on the T2 and open web,
filled the user name: admin and password: admin, then login and you can enter the login page.

Jinan USR IOT Technology Limited 46 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Diagram 5.2-1 Open Web

Diagram 5.2-2 Username and pass word

Click the English or Chinese on the right upper to switch the language.

5.2.1. State Configuration

Jinan USR IOT Technology Limited 47 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Diagram 5.2.1-1 State Configuration

This page show some information of the T2


 Module name: default is USR-TCP232-T2
 Current IP address: default is 192.168.0.7
 MAC address: the unique in the world
 Remote IP /TX/RX: the device has connected and the data number of receive and send. TX means send and RX means
received
 TX count/RX count: Total number of connection send or received.

5.2.2. Local IP
Modify the parameters and save, then modify the parameter in next page. If the parameter need not to modify, click
the restore and work.

Diagram 5.2.2-1 Local IP

Jinan USR IOT Technology Limited 48 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Diagram 5.2.2-2 Local IP


 IP type: including static IP and DHCP, default is static IP.
 Static IP: default is 192.168.0.7 and can be modify as you want
 Subnet masks: 255.255.255.0
 Gateway:
 DNS Gateway:DNS server

5.2.3. Serial port

Diagram 5.2.3-1 Serial Port

 Baud rate: default is 115200 bps


 Data: default is 8 bit
 Parity: including: including None, Odd, Even, Mark and Space. Default none
 Stop bits
 Local port: can be change from 0 to 65535. Default is 20108
 Remote port: can be change from 0 to 65535.Default is 8234

Jinan USR IOT Technology Limited 49 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com
 Work mode: default is TCP client
 Remote server address
 Special functions including RS485( no RS232 in T2) reset(introduce in above) link, index, RFC2217 similar, send device
ID where connected and send data with device ID
5.2.4. Expand function

Diagram5.2.4-1 Expand function


 Customize heartbeat package: open with webpage, content customize and the max number is 40bite
 Customize registration package: open with webpage, content customize and the max number is 40bite, the method to
use can be customize
 Short connection: enable under the TCP client and the time can be customize
 Clear buffer data: whether or not
 TCP server-kick off old connection
 Serial port parameter setting: open with webpage and setting with serial port parameter
5.2.5. Misc configuration

Jinan USR IOT Technology Limited 50 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

Diagram 5.2.5-1 Misc Setting

 Module name: default is USR-TCP232-T2 and can be modify here


 Webserver port number: default is 80
 Module ID: use for identify module
 USR-cloud number and password: default is admin
 MAC address: the unique one in the word
 Max clients connect to TCP server: can modify from 1 to 16.
 Reset timeout

5.2.6. Reboot

Diagram 5.2.6-1 Misc Setting

Save all the data and restore, then the T2 work

Jinan USR IOT Technology Limited 51 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

5.3. AT comment

5.3.1. AT command overview


AT+ command is the command collection that perform the command transport using UART and module under the
order mode. Later we will interpret the type in detail.
Powered successfully, we can setting the module with UART.
The default UART port parameters of the module are: baud rate1152000, no parity, data 8 and stop 1.

Instr
AT command test tools. UART interface command to use secureCRT software tool or USR pro APP. Below are using the
secureCRT with UART to perform.
From transparent transport to AT command need two step as below:
 Fill “+++”in the UART. After the module receive the “+++”,it will send a “a” to confirm;
 Fill the confirming “a” in the UART, after the module receive and send “+ok”, enter the AT command mode.

Instr: if no feedback after fill “+++”and “a”, as the above.


Fill “+++”and “a” need to achieve in the time to reduce the chance of entering command mode while working
normally accidentally. Detail requirement are as fellows.

Diagram5.3.1-1 AT command time tree

Time requirement:
T1>the interval of serial port package
T2<300ms
T3<300ms
T5<3s
The order change into temporary command mode from transparent transport mode:
1. Serial mode device send “+++”to module continuously. The module receive and send “a” back. Before
sending“+++”is the packaging time and can not send any data.
2. After receive “a” feedback a “a”in 3s.
3. After the module receive “a, send “ok”to the device, and enter “AT”command
4. After the device receive “+ok” and know the module enter the AT command mode, then send AT command.

The order change into transparent transport mode from AT command mode:
Jinan USR IOT Technology Limited 52 www.usriot.com
USR-TCP232-T2 user manual www.usriot.com
1. Serial device send “AT+ENTM”to module.
2. After the module receive the command, feedback “+ok”, then back to the previous working mode.

5.3.2. AT command error code

Error code Instr


-1 Invalid format
-2 Invalid order
-3 Invalid operator
-4 Invalid parameter
-5 Not allow
Form5.3.2-1 Error code

5.3.3. AT command

NO command Instr
1 E Enable/disable the echo function
2 Z Restore module
3 VER Query the vision
4 ENTM Exit AT command mode
5 RELD Reset default settings
6 MAC Query module MAC address
7 USERMAC Setting customize MAC
8 WEBU Setting/ query username and password
9 WANN Setting/ query WAN port parameters
10 DNS Setting/ query DNS server address
11 WEBPORT Setting/ query webpage port
12 UART Setting/ query serial parameters
13 SOCK Setting/ query SOCK parameters
14 TCPSE Setting/ query whether kick off order connection
15 SOCKLK Query TCP connect status
16 SOCKPORT Setting/ query local port number
17 RECEN Setting/ query RFC2217 enable
18 PDTIME Query the product time
Registration package function
19 REGEN Setting/ query registration package mechanism
20 REGTCP Setting/ query registration package perform mechanism
21 REGCLOUD Setting/ query USR-cloud username and password
22 REGUSR Setting/ query the content of registration package that
customized
Jinan USR IOT Technology Limited 53 www.usriot.com
USR-TCP232-T2 user manual www.usriot.com
Httpd client function
23 HTPTP Setting/ query in httpd client mode, the asking way of the
http
24 HTPURL Setting/ query the URL in httpd client mode
25 HTPHEAD Setting/ query the package head in httpd client
26 HTPCHD Setting/ query HTP remove the package head
Heartbeat package
27 HEARTEN Setting/ query heartbeat package enable
28 HEARTTP Setting/ query method of the heartbeat package send
29 HEARTTM Setting/ query the heartbeat package time
30 HEARTDT Setting/ query customize heartbeat package
Expand function command
31 SCSLINK Setting/ query the indicating function of the status of socket
connection
32 CLIENTRST Setting/ query the TCP client mode reset function
enable/disable
33 INDEXEN Setting/ query index function
34 SOCKSL Setting/ query short connection function
35 SHORTO Setting/ query short connection time
36 UARTCLBUF Setting/ query clear serial port cache before module build
connection function enable/disable
37 RSTIM Setting/ query timeout reset time
38 MAXSK Setting/ query maximum client connections in TCP server
mode
39 MID Setting/ query module name
40 H Query help message
(V4017 supporting command)
41 AT+CFGTF Save the current parameters as the default parameters
42 AT+PING Ping automatically
Form5.3.3-1 AT Command

5.3.4. AT command

5.3.4.1. AT+E

Function: query/ setting module echo of the AT command setting

Format: query:
A+E<CR>
<CR><LF>+OK=< on/off ><CR><LF>
Setting:
A+E=< on/off ><CR>
<CR><LF>+OK<CR><LF>
Jinan USR IOT Technology Limited 54 www.usriot.com
USR-TCP232-T2 user manual www.usriot.com
Parameters: ON: enable the echo, echo the command entered by the AT command.
OFF: under AT command mode, the entered command do not echo.
E.g.: AT+E=on

5.3.4.2. AT+Z

Function: restart module


Format: setting:
AT+Z<CR>
<CR><LF>+OK<CR><LF>
Parameters: none
<note>: after perform this command correctly, module restart and exit the AT command mode.

5.3.4.3. AT+VER

Function: query module firmware version.


Format: query:
AT+VER<CR>
<CR><LF>+OK=< ver ><CR><LF>
Parameters: ver: query module firmware version.

5.3.4.4. AT+ENTM

Function: exit the AT command mode and enter the transparent transmission:
Format: setting:
AT+ENTM<CR>
<CR><LF>+OK<CR><LF>
Parameters: none
<note>: after perform this command correctly, module change into command mode from transparent transmission
mode.

5.3.4.5. AT+RELD

Function: module reset


Format: setting
AT+RELD<CR>
<CR><LF>+OK<CR><LF>
Parameters: none.

5.3.4.6. AT+MAC

Function: query module MAC


Format: query:
AT+MAC<CR>
<CR><LF>+OK=< MAC ><CR><LF>
Parameters: mac: MAC address of the module( e.g.00020K2050A )

Jinan USR IOT Technology Limited 55 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

5.3.4.7. AT+USERMAC

Function: setting module customize MAC


Format: setting:
AT+ USERMAC =< MAC ><CR>
<CR><LF>+OK<CR><LF>
Parameters: mac: MAC address of the module, the first byte should be even, e.g. 002233445566
E.g.: AT+USERMAC=002233445566

5.3.4.8. AT+WEBU

Function: setting /query module username and password


Format: query:
AT+WEBU<CR>
<CR><LF>+OK=< username,password ><CR><LF>
setting:
AT+WEBU=< username,password ><CR>
<CR><LF>+OK<CR><LF>
Parameters: username: username, support 5 bytes at longest and can not be none:
password: password, support 5 bytes at longest.
E.g.: AT+WEBU=admin,admin

5.3.4.9. AT+WANN

Function: setting /query the IP of WAN( DHCP/STATIC ) that module access


Format: query:
AT+WANN<CR>
<CR><LF>+OK=< mode,address,mask,gateway ><CR><LF>
setting:
AT+WANN=< mode,address,mask,gateway ><CR>
<CR><LF>+OK<CR><LF>
Parameters: mode: web IP mode ( static/DHCP )
static: static IP/
DHCP: dynamic IP( address,mask,gateway parameters ignore )
Address: IP address
Mask: subnet masks
Gateway: gateway address
E.g.: AT+WANN=static,192.168.0.7,255.255.255.0,192.168.0.1

5.3.4.10. AT+DNS

Function: setting /query DNS server address:


Format: query:
AT+DNS<CR>
<CR><LF>+OK=< address ><CR><LF>
setting:
Jinan USR IOT Technology Limited 56 www.usriot.com
USR-TCP232-T2 user manual www.usriot.com
AT+DNS=< address ><CR>
<CR><LF>+OK<CR><LF>
Parameters: address: DNS server address( default value is 208.67.222.222 ).
E.g.: AT+DNS=208.67.222.222

5.3.4.11. AT+WEBPORT

Function: setting /query webpage port


Format: query:
AT+WEBPORT<CR>
<CR><LF>+OK=< port ><CR><LF>
setting:
AT+WEBPORT=< port ><CR>
<CR><LF>+OK<CR><LF>
Parameters: port: module the port of the web server that built in of module. default 80:
E.g.: AT+WEBPORT=80

5.3.4.12. AT+UART

Function: setting /query UART interface parameters


Format: query:
AT+UART<CR>
<CR><LF>+OK=< baudrate,data_bits,stop_bit,parity,flowctrl ><CR><LF>
setting:
AT+UART=< baudrate,data_bits,stop_bit,parity,flowctrl ><CR><LF>
<CR><LF>+OK<CR><LF>
Parameters: baudrate: baud rate600~460800bps,can be customized .
data_bits: data 5/6/7/8
stop_bits: stop 1/2
parity: parity
 NONE( no parity )
 EVEN(even parity )
 ODD( odd parity )
 MASK(1 parity)
 SPACE( 0 parity )
flowctrl: flow control( none flow control, can not setting , default setting to be the NFC )
 NFC: none: hardware flow control
E.g.: AT+UART=115200,8,1,NONE,NFC

5.3.4.13. AT+SOCK

Function: setting /query web protocol parameters format


Format: query:
AT+SOCK<CR>
<CR><LF>+OK=< protocol,IP,port ><CR><LF>
setting:
Jinan USR IOT Technology Limited 57 www.usriot.com
USR-TCP232-T2 user manual www.usriot.com
AT+SOCK=< protocol,IP,port ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
Protocol: protocol type, including
 TCPS is TCP server
 TCPC is TCP client
 UDPS is UDP server
 UDPC is UDP client
 HTPC is Httpd Client
IP: when the module setting into “CLIENT”mode, the IP address and domain name of the
remote server.
Port: local port under Server mode and remote port under Client mode,decimal number and
less than 65535.
E.g.: AT+SOCK=TCPC,192.168.0.201,8234

5.3.4.14. AT+TCPSE

Function: module is TCP Server, the processing mechanism after the connection reaches the maximum number of
connections.
Format: query:
AT+TCPSE<CR>
<CR><LF>+OK=< status ><CR><LF>
setting:
AT+TCPSE=< status ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
Status: setting status keep/kick
 keep: after reach the maximum number of connection, do not receive new one.
 kick: after reach the maximum number of connection, delete the order one and
connect the new one.
E.g.: AT+TCPSE=keep

5.3.4.15. AT+SOCKLK

Function: query whether the TCP has connected


Format: query:
AT+ SOCKLK<CR>
<CR><LF>+OK=< sta ><CR><LF>
Parameters:
Sta: built the TCP connection or not
 Connect: TCP connected
 Disconnect: TCP not connected

5.3.4.16. AT+SOCKPORT

Function: setting /query local socket port


Jinan USR IOT Technology Limited 58 www.usriot.com
USR-TCP232-T2 user manual www.usriot.com
Format: query:
AT+SOCKPORT<CR>
<CR><LF>+OK=< sta ><CR><LF>
setting:
AT+ SOCKPORT =< sta ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
 Sta: 0 is using port randomly. 1-65535 is using the local port of the socket.
E.g.: AT+SOCKPORT=20108:

5.3.4.17. AT+RFCEN

Function: enable/ disable RFC221 7function


Format: query:
AT+RFCEN<CR>
<CR><LF>+OK=< status ><CR><LF>
setting:
AT+RFCEN =< status ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
Status:
 ON: enable RFC2217function
 OFF: disable RFC2217function
E.g.: AT+RFCEN=ON

5.3.4.18. AT+PDTIME

Function: query produce time


Format: query:
AT+PDTIME<CR>
<CR><LF>+OK=< time ><CR><LF>
Parameters:
time: produce time,
E.g.: 2016-10-18 11:20:02

5.3.4.19. AT+REGEN

Function: setting query registration package mechanism


Format: query:
AT+REGEN<CR>
<CR><LF>+OK=< status ><CR><LF>
setting:
AT+REGEN =< status ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
Jinan USR IOT Technology Limited 59 www.usriot.com
USR-TCP232-T2 user manual www.usriot.com
Status:
 MAC: enable registration package mechanism, registration package is 6 bites MAC
 Usr: customize registration package
 Off: disable registration package mechanism
E.g.: AT+REGEN=MAC

5.3.4.20. AT+REGTCP

Function: setting query tcp client mode registration package perform mechanism
Format: query:
AT+REGTCP<CR>
<CR><LF>+OK=< status ><CR><LF>
setting:
AT+REGTCP =< status ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
Status:
 first: send a registration package when connected the server at first time
 every: add a registration package in front of the every data package sent to server.
 all: send registration package when first connected to the server and add registration
package in front of the data package.
E.g.: AT+REGTCP=first

5.3.4.21. AT+REGCLOUD

Function: setting /query USR-cloud username and password


Format: query:
AT+REGCLOUD<CR>
<CR><LF>+OK=< name, password ><CR><LF>
setting:
AT+REGCLOUD=< name, password ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
Status:
 name: USR-cloud device port:
 password: USR-cloud password .
E.g.: AT+REGCLOUD=0000000000000000000000, 00000000

5.3.4.22. AT+REGUSR

Function: setting query customize registration package content


Format: query:
AT+REGUSR<CR>
<CR><LF>+OK=< data ><CR><LF>
setting:
AT+ REGUSR =< data ><CR>
Jinan USR IOT Technology Limited 60 www.usriot.com
USR-TCP232-T2 user manual www.usriot.com
<CR><LF>+OK<CR><LF>
Parameters:
data: ASCII code in 40 bytes
E.g.: AT+REGUSR=www.usr.cn

5.3.4.23. AT+HTPTP

Function: setting /query the asking way under HTTPD Client mode.
Format: query:
AT+HTPTP<CR>
<CR><LF>+OK=< status ><CR><LF>
setting:
AT+HTPTP =< status ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
Status:
 GET: is the http asking way
 POST: is the http asking way
E.g.: AT+HTPTP=GET

5.3.4.24. AT+HTPURL

Function: setting /query Httpd 的 URL.


Format: query:
AT+HTPURL<CR>
<CR><LF>+OK=< URL ><CR><LF>
setting:
AT+HTPURL =< URL ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
URL: start with “/”, less than 99 bytes .
E.g.: AT+HTPURL=/2.php

5.3.4.25. AT+HTPHEAD

Function: setting /query Httpd Client customize package head message


Format: query:
AT+HTPHEAD<CR>
<CR><LF>+OK=< data ><CR><LF>
setting:
AT+ HTPHEAD =< data ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
 data: customize package message, less than 199 bytes. And using <<CRLF>> translating
the characters in stead of the enter.
E.g.: AT+HTPHEAD=Accept:text<<CRLF>>
Jinan USR IOT Technology Limited 61 www.usriot.com
USR-TCP232-T2 user manual www.usriot.com

5.3.4.26. AT+HTPCHD

Function: setting /query filter the package head of the return information of Http
Format: query:
AT+ HTPCHD <CR>
<CR><LF>+OK=< sta ><CR><LF>
setting:
AT+ HTPCHD =< sta ><CR>
<CR><LF>+OK<CR><LF>
Parameters: Sta:
 ON: enable
 OFF: disable
E.g.: AT+HTPCHD=ON

5.3.4.27. AT+HEARTEN

Function: setting /query enable or not heartbeat package


Format: query:
AT+ HEARTEN <CR>
<CR><LF>+OK=< status ><CR><LF>
setting:
AT+ HEARTEN =< status ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
Status:
 ON:enable heartbeat package
 Off: disable heartbeat package
E.g.: AT+HEARTEN=ON

5.3.4.28. AT+HEARTTP

Function: setting /query heartbeat package send way


Format: query:
AT+ HEARTTP <CR>
<CR><LF>+OK=< type ><CR><LF>
setting:
AT+ HEARTTP =< type ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
Status:
 NET: send heartbeat package to server
 COM: send heartbeat package to serial port
E.g.: AT+HEARTTP=NET

Jinan USR IOT Technology Limited 62 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

5.3.4.29. AT+HEARTTM

Function: setting /query time of heartbeat package


Format: query:
AT+ HEARTTM <CR>
<CR><LF>+OK=< time ><CR><LF>
setting:
AT+ HEARTTM =< time ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
Time: heartbeat time ,default is 30s, range from 1 to 65535s.
E.g.: AT+HEARTTM=30

5.3.4.30. AT+HEARTDT

Function: setting query customize heartbeat package content


Format: query:
AT+ HEARTDT <CR>
<CR><LF>+OK=< data ><CR><LF>
setting:
AT+ HEARTDT =< data ><CR>
<CR><LF>+OK<CR><LF>
Parameters:
data: less than 40 bytes ASCII code.
E.g.: AT+HEARTDT=www.usr.cn.

5.3.4.31. AT+ SCSLINK

Function: setting /query Socket connected status instructions function (connection status instructions pin change or
not according to the connection status)
Format: query:
AT+ SCSLINK <CR>
<CR><LF>+OK=< sta ><CR><LF>
setting:
AT+ SCSLINK =< sta ><CR>
<CR><LF>+OK<CR><LF>
Parameters: sta: status
ON: enable link function
OFF: disable link function
E.g.: AT+ SCSLINK=ON

5.3.4.32. AT+ CLIENTRST

Function: setting /query TCP Client mode filed to connect several time and reset ( repeat 30 times connection failed,
module restart )
Format: query:
Jinan USR IOT Technology Limited 63 www.usriot.com
USR-TCP232-T2 user manual www.usriot.com
AT+ CLIENTRST <CR>
<CR><LF>+OK=< sta ><CR><LF>
setting:
AT+ CLIENTRST =< sta ><CR>
<CR><LF>+OK<CR><LF>
Parameters: sta: status
ON: enable TCP Client reset function
OFF: disable TCP Client reset function
E.g.: AT+CLIENTRST =ON

5.3.4.33. AT+ INDEXEN

Function: setting /query index function


Format: query:
AT+ INDEXEN <CR>
<CR><LF>+OK=< sta ><CR><LF>
setting:
AT+ INDEXEN =< sta ><CR>
<CR><LF>+OK<CR><LF>
Parameters: sta: status
ON: enable index function
OFF: disable index function
E.g.: AT+INDEX=ON

5.3.4.34. AT+ SOCKSL

Function: setting /query short connection function


Format: query:
AT+ SOCKSL <CR>
<CR><LF>+OK=< sta ><CR><LF>
setting:
AT+ SOCKSL =< sta ><CR>
<CR><LF>+OK<CR><LF>
Parameters: sta: status
ON: enable short connection function
OFF: disable short connection function
E.g.: AT+SOCKSL =ON

5.3.4.35. AT+ SHORTO

Function: setting /query short connection time


Format: query:
AT+ SHORTO <CR>
<CR><LF>+OK=< time ><CR><LF>
setting:
AT+ SHORTO =< time ><CR>
Jinan USR IOT Technology Limited 64 www.usriot.com
USR-TCP232-T2 user manual www.usriot.com
<CR><LF>+OK<CR><LF>
Parameters: time: short connection time, 2-255s
E.g.: AT+SHORTO =3

5.3.4.36. AT+ UARTCLBUF

Function: setting /query if the module clear the serial port cache before connected
Format: query:
AT+ UARTCLBUF <CR>
<CR><LF>+OK=< sta ><CR><LF>
setting:
AT+ UARTCLBUF =< sta ><CR>
<CR><LF>+OK<CR><LF>
Parameters: sta: status
ON: clear the serial port cache before connected
OFF: do not clear the serial port cache before connected
E.g.: AT+UARTCLBUF =ON

5.3.4.37. AT+ RSTIM

Function: setting /query restart out time


Format: query:
AT+ RSTIM <CR>
<CR><LF>+OK=< time ><CR><LF>
setting:
AT+ RSTIM =< time ><CR>
<CR><LF>+OK<CR><LF>
Parameters: time: short connection time: 0, 60-65535s
E.g.: AT+RSTIM =3600

5.3.4.38. AT+ MAXSK

Function: setting /query the maximum number of the client that TCP Server connected Format: query:
AT+ MAXSK <CR>
<CR><LF>+OK=< num ><CR><LF>
setting:
AT+ MAXSK =< num ><CR>
<CR><LF>+OK<CR><LF>
Parameters: num: the maximum number of the client that TCP Server connected, range from 1 to 16
E.g.: AT+MAXSK =4

5.3.4.39. AT+ MID

Function: setting /query module name


Format: query:
AT+ MID <CR>

Jinan USR IOT Technology Limited 65 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com
<CR><LF>+OK=< name ><CR><LF>
setting:
AT+ MID =< name ><CR>
<CR><LF>+OK<CR><LF>
Parameters: name: module name, maximum 15 bytes and can not be none.
E.g.: AT+MID =USR-TCP232-T2

5.3.4.40. AT+ H

Function: help
Format: query:
AT+ H <CR>
<CR><LF>+OK=< sta ><CR><LF>
Parameters: sta: help information

5.3.4.41. AT+CFGTF

Function: save the current parameters as the default parameters


Format: query:
AT+ CFGTF <CR>
<CR><LF>+OK=< sta ><CR><LF>
Parameters: sta: saved: saved

5.3.4.42. AT+PING

Function: ping automatically.


Format: ping successful
AT+ PING=< IP ><CR>
<CR><LF>+OK=SUCCESS<CR><LF>
Ping out time
AT+ PING=< IP ><CR>
<CR><LF>+ERR=TIMEOUT<CR><LF>
Parameters: IP: remote IP or the domain name
E.g.: AT+PING=www.baidu.com

Jinan USR IOT Technology Limited 66 www.usriot.com


USR-TCP232-T2 user manual www.usriot.com

6.Contact us
Company: Jinan USR IOT Technology Co., Ltd

Address: Floor 11,Building1,No.1166 Xinluo Street,Gaoxin Distric,Jinan,Shandong,250101 China

Tel: 86-531-88826739 ext 829

Web: www.usriot.com

Support: https://h.usriot.com

Email: [email protected]

7.Disclaimer
The document provides information about USR-TCP232-T2 module, it doesn’t grant any license to the intellectual
property rights. Except the responsibility declared in the product sale clause, USR does not assure any other responsibilities.
In addition, USR does not make any warranties for the sale and use of this product, including the suitability of products for
a particular purpose, merchant ability or fitness for any patent, copyright or other intellectual property infringement. USR
may make changes to specifications and products description without notice.

Jinan USR IOT Technology Limited 67 www.usriot.com

You might also like