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 gene
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.
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.
2) Shut down network card none-related, reserve one connect.
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.
1.3.Default parameter
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:
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.
2.3. Basic parameters
3. Hardware parameter
3.1. Pin define
3.1.1. Pin Definition
3.1.2.Dimension
3.1.3.Evaluation Kit
USR-TCP232-EVK evaluation board can be used for TCP232-T2
3.2. Hardware Reference Design
3.2.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 asindication 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 Level for example.
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:
4. Module function
Here are the function of T2, below is the overall block diagram.
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
5. 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:
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:
Related 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.
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.
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
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
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.
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。
4.2.6. TCP and UDP mechanism
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.
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.
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 :
4.4.2. Module Work as Server
1) Set T2 work model: TCP Server.
2) Set virtual port as follows:
4.4.3. Create VCOM
1) Create VCOM by “search” button.
2) Automatically Create
4.5. Serial port function
4.5.1. Basic parameters
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.
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
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
4.6.3. 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
Also can be set in the webpage as fellows:
4.6.4. Customize webpage
T2 support customize webpage. The user can upgrade their webpage into T2 via customize webpage.
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.
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 follow.
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.
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:
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.
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 follow:
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.
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.
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
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
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
5. Press CFG (Reload) and click “operate via 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.
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.
Click the English or Chinese on the right upper to switch the language.
5.2.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.
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
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
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
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
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
Save all the data and restore, then the T2 work
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.
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:
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
5.3.3.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
+OK=< on/off >
Setting:
A+E=< on/off >
+OK
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
+OK
Parameters: none
: 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
+OK=< ver >
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
+OK
Parameters: none
: 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
+OK
Parameters: none.
5.3.4.6. AT+MAC
Function: query module MAC
Format: query:
AT+MAC
+OK=< MAC >
Parameters: mac: MAC address of the module( e.g.00020K2050A )
5.3.4.7. AT+USERMAC
Function: setting module customize MAC
Format: setting:
AT+ USERMAC =< MAC >
+OK
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
+OK=< username,password >
setting:
AT+WEBU=< username,password >
+OK
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
+OK=< mode,address,mask,gateway >
setting:
AT+WANN=< mode,address,mask,gateway >
+OK
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
+OK=< address >
setting:
AT+DNS=< address >
+OK
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
+OK=< port >
setting:
AT+WEBPORT=< port >
+OK
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
+OK=< baudrate,data_bits,stop_bit,parity,flowctrl >
setting:
AT+UART=< baudrate,data_bits,stop_bit,parity,flowctrl >
+OK
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
+OK=< protocol,IP,port >
setting:
AT+SOCK=< protocol,IP,port >
+OK
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
+OK=< status >
setting:
AT+TCPSE=< status >
+OK
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
+OK=< sta >
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
Format: query:
AT+SOCKPORT
+OK=< sta >
setting:
AT+ SOCKPORT =< sta >
+OK
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
+OK=< status >
setting:
AT+RFCEN =< status >
+OK
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
+OK=< time >
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
+OK=< status >
setting:
AT+REGEN =< status >
+OK
Parameters:
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
+OK=< status >
setting:
AT+REGTCP =< status >
+OK
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
+OK=< name, password >
setting:
AT+REGCLOUD=< name, password >
+OK
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
+OK=< data >
setting:
AT+ REGUSR =< data >
+OK
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
+OK=< status >
setting:
AT+HTPTP =< status >
+OK
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
+OK=< URL >
setting:
AT+HTPURL =< URL >
+OK
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
+OK=< data >
setting:
AT+ HTPHEAD =< data >
+OK
Parameters:
data: customize package message, less than 199 bytes. And using <> translating
the characters in stead of the enter.
E.g.: AT+HTPHEAD=Accept:text<>
5.3.4.26. AT+HTPCHD
Function: setting /query filter the package head of the return information of Http
Format: query:
AT+ HTPCHD
+OK=< sta >
setting:
AT+ HTPCHD =< sta >
+OK
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
+OK=< status >
setting:
AT+ HEARTEN =< status >
+OK
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
+OK=< type >
setting:
AT+ HEARTTP =< type >
+OK
Parameters:
Status:
NET: send heartbeat package to server
COM: send heartbeat package to serial port
E.g.: AT+HEARTTP=NET
5.3.4.29. AT+HEARTTM
Function: setting /query time of heartbeat package
Format: query:
AT+ HEARTTM
+OK=< time >
setting:
AT+ HEARTTM =< time >
+OK
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
+OK=< data >
setting:
AT+ HEARTDT =< data >
+OK
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
+OK=< sta >
setting:
AT+ SCSLINK =< sta >
+OK
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:
AT+ CLIENTRST
+OK=< sta >
setting:
AT+ CLIENTRST =< sta >
+OK
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
+OK=< sta >
setting:
AT+ INDEXEN =< sta >
+OK
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
+OK=< sta >
setting:
AT+ SOCKSL =< sta >
+OK
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
+OK=< time >
setting:
AT+ SHORTO =< time >
+OK
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
+OK=< sta >
setting:
AT+ UARTCLBUF =< sta >
+OK
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
+OK=< time >
setting:
AT+ RSTIM =< time >
+OK
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
+OK=< num >
setting:
AT+ MAXSK =< num >
+OK
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
+OK=< name >
setting:
AT+ MID =< name >
+OK
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
+OK=< sta >
Parameters: sta: help information
5.3.4.41. AT+CFGTF
Function: save the current parameters as the default parameters
Format: query:
AT+ CFGTF
+OK=< sta >
Parameters: sta: saved: saved
5.3.4.42. AT+PING
Function: ping automatically.
Format: ping successful
AT+ PING=< IP >
+OK=SUCCESS
Ping out time
AT+ PING=< IP >
+ERR=TIMEOUT
Parameters: IP: remote IP or the domain name
E.g.: AT+PING=www.baidu.com
6.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.