USR-TCP232-ED2 is a module that can realize data transmission between the Network and TTL serial port, which is
equipped with ARM cortex-M4 processor. No need to care of the details, the module realize the protocol
converse.parameters can be set in the software and webpage, configure one time and save forever.
This character aimed at get start and the user are advised to operation one time according to the instr to
understand USR-TCP232-ED2 completely.
Questions occur in the testing, you can refer to our application case and answers:
Related software:
M4 setting software: https://www.usriot.com/support/downloads/usr-m4-setup-software-v234102.html
(also, it can be used in the industrial serial to Ethernet Converter:USR-N668,USR-N510, USR-N520, USR-N540,
USR-TCP232-410S, USR-TCP232-419 and industrial ethernet modules: USR-K7, USR-TCP232-E2.)
Testing software: https://www.usriot.com/support/downloads/usr-tcp-test-testing-software.html
To test the communication converse from serial port to net, connect the USR-TCP232-ED2 with evaluation board,
and connected with the PC using serial cable, then connect the net port of USR-TCP232-ED2 and PC. Power on the it.
The diagram is as fellow:
Multifucntion serial to Ethernet module USR-TCP232-ED2, which supports three TTL serial ports, can realize data
transmission between the network and TTL serial port. This module is equipped with ARM cortex- M4 processor, which
has the advantages of low power consumption, fast speed and high stability.
Equipped with the net transform, serial communication baud rate can reach at 1024Kbps, USR-TCP232-ED2
supports several work mode such as:TCP Server, TCP Client, UDP, Httpd Client and WEB to Serial(Websocket), can be
figured in the webpage or the upset software. The internal integration of TCP/IP protocol stack, user can use it to
complete the embedded device networking function easily,saving the development process of human, material and
development cycle, so that products can be faster into the market, enhance competitiveness.
Passed the strict testing, USR-TCP232-ED2 has successful case in Banks, highways, large corporate networks, busy
webcam networks and complex network environments such as fiber-optic to Ethernet.
2.2. Features
Equipped with ARM cortex-M4, industrial width of temperature,TCP/IP protocol stack, more stable and reliable.
Equipped with network transformer, supports 1.5KV electromagnetic isolation
Supports TCP server, TCP client, UDP server, UDP client and HTTPD client work mode
Build-in webpage where can set the parameters, also can customize webpage. The port of the webpage can be
defined
Supports two TTL serial ports, can work in same time independently
Supports RTS/CTS hardware flow control and Xon/Xoff software flow control
Supports USR-VCOM
Baud rate:600bps~1Mbps; and five parity way:none, odd, even, mark, space
Supports modbus gateway
Supports Reload button, hardware restore to factory setting
RJ45 have Link/Data indicator, in the net port, there is Isolating transformer,1.5KB ESD
The unique MAC in the world(begin with D8-B0-4C), and the user can self-defined
Supports net upgrade firmware,DDNS, DHCP
Supports static IP and DHCP, query the device in LAN with UDP
Supports keepalive, check dead connection and abnormal and reconnection
Supports password and username, more safety
Supports two websockets to realize the bi-direction transparent transmission between serial port and webpage.
Hardware restore to factory setting. Put down the reload before
power on, after 5s, put up and can restore the factory setting
I
3.0-3.6V
10
RST
RST pin is the pin for module to restore, please connect to the IO port
of the MCU. Restore the module when there is abnormal occurring.
Restore the module when this pin receive 200ms low level power.
Powering on and restoring the module, is normal operate for module
This character instruct all the function of the USR-TCP232-ED2, below is the details.
Diagram 4-1 USR-TCP232-ED2 Function
4.1. Net 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 the LAN, so please be sure
there is no another device same as it in the LAN.
Static IP
Handle to setting. Note fill the IP, subnet masks and gateway.
Static IP adopted to the environment that required to statistics the IP and the device and makes them correspond
one to one.
Advantage: accessing the device that can not distribute IP address can be searched via UDP broadcast.
Disadvantage: different net segment in the different LAN can not communicate normally.
Setting and query the access way,IP, subnet masks and gateway
parameters for USR-TCP232-ED2
DHCP
Get IP address , gateway address, DNS server and other information from the gateway server to easy the step for
setting IP address, DHCP adopted to the environment that have no special requirement to IP.
Advantage: accessing the device equipment with the DHCP server such as router can communicate directly.
Reduce the hassle of setting IP address and subnet masks.
Disadvantage: accessing the device with no DHCP server such as computer directly, USR-TCP232-ED2 can not work.
2. Subnet masks is a 32 address, used to determine the host number and the network number by shielding some
IP address, indicates the number of subnet and determine the flag within the subnet. Using combine with the IP
address. The subnet masks needed to set, usually we use the subnet masks: 255.255.255.0. The number of IP addresses
in the subnet is 2 to the eighth power minus 2, that is, 256-2=254, and the general host addresses are all 0 or 1 (binary)
has its special role.
3. Gateway is the net port of the LAN. If you connect the router to access the internet, the gateway is the router IP
address, setting wrong and can not access into the net. No device such as router and no setting, keep the default.
DNS address of the USR-TCP232-ED2 can be set. When USR-TCP232-ED2 need DNS, it will quest for the address
that you set.(3010 and above version support self-define DNS address.)
The default DNS server address is the gateway. In DHCP, default DNS address is acquired automatically.
DNS address can be set, which means that if the domain name server are imperfect, user also can realize the
domain name analyze referred to AT command.
form 4.1.2-1 DNS AT Command
4.1.3. Hardware Restore the Factory Function
Module supports hardware restore factory function.
Powered off and put down the reload. Then power on and keep the reload down for 5s. After put up, restore to
factory setting successfully.
Steps:
Put down the reload →power on →reload keep for 5s→ put up
When there are wronged parameters or forget the password, you can use hardware restore.
Form 4.1.3-1 Hardware Restore Factory AT Command
4.1.4. Web Server
The build-in webpage of the USR-TCP232-ED2 same as the common webpage. User can check the related status of
the module via webpage. Default port of the web server:80(can be modify, after modify, you can access the webpage
via other port.
Check the running status of the USR-TCP232-ED2
1) Running time: determine the running time and whether restart.
2) TX count(eth): determine how many data USR-TCP232-ED2 send to internet.
3) RX count(eth): determine how many data send to module from net
4) Conn status(eth)A: connection status of the A to determine which status that USR-TCP232-ED2 stay.
Connection status: IDLE, LISTEN, CONNECTING, CONNECTED, ERROR
IDLE: initial status, no connection and no listening. e.g. waiting connection of the short connection or original
status.
LISTEN: under TCP server mode, listening and wait being connected.
CONNECTING: under TCP client, USR-TCP232-ED2 building the connection to TCP server
CONNECTED: have built
CONNECTED(n):under TCP server, the number of the client connected.
ERROR: USR-TCP232-ED2 stayed in abnormal disconnection.
5) Conn status (ETH)B:connection status of socket B
to realize the data transmit between serial port and server port. According to related rule of TCP, TCP client has
difference between connecting and disconnecting, to confirm the data transport reliable. Usually used in the data
interaction between device and server, which is the commonest communication way.
2.Under TCP client mode, USR-TCP232-ED2 supports recognize the abnormal connection automatically. About
15s internal to send Keep Alive to keep active after build. If there is abnormal disconnection, USR-TCP232-ED2 will find
it and reconnection.USR-TCP232-ED2 connects the server as a TCP, remote port is 0, connecting with random port
every time.
3.connecting the remote IP automatically, but do not receive any other connecting quest.
4.Supporting the similar RFC2217, USR-cloud and modbus TCP. In LAN, if the USR-TCP232-ED2 is static IP, please
be sure that set the IP of USR-TCP232-ED2 in the same LAN and set gateway correctly, or USR-TCP232-ED2 is can not
communication.
5.Note: keep alive, similar RFC2217, USR-cloud and modbus TCP are instructed in the bellow.
6.TCP client communication case:
① USR-TCP232-ED2 work in TCP client mode, remote IP:172.16.11.8, remote port:8234, click to save then search
the USR-TCP232-ED2 again and check the parameters.
Also you can set in the webpage, remote IP and port are as above, then save and restart.
② connecting the TCP server, the IP of my computer:172.16.11.8, local host port:8234(can be modify), testing
software show the connection information:172.16.11.68:24( if the local port of USR-TCP232-ED2 is 0, here will
distribute a port randomly for USR-TCP232-ED2, e.g.172.16.11.68:49155).
③ setting the correct serial port parameters, click the serial port and the sent, receive the bi-direction data
1.Under TCP server mode ,module monitoring the local port, receive and build connection when there is
connecting quest, receive the data and sent all to the client connected. If access the TCP server of USR-TCP232-ED2
across the public net, user should build termination mapping on the router. (mapping way:
http://www.usr.cn/Download/155.html) also TCP server supports Keepalive to monitoring connection timely.
2.Used in communicating with the TCP client in LAN. Adopt to the situation where is no server and several PC
and phone sending quest. And same as TCP client , TCP server has different between connecting and disconnecting to
confirm data transport stable.
3.TCP server supports similar RFC2217 and modbus TCP
4.At most USR-TCP232-ED2 can receive 8 client to connect when work as TCP server. The max number of the
client can be connected can be set.
5.Under TCP server,USR-TCP232-ED2 listens the local port and do not monitoring, if the questing number more
than max number you set, kick off the oldest one.
6.communication case:
USR-TCP232-ED2 work in CP server mode, local port 23. Open the testing software and have the mode to be TCP
client, writing the remote IP and remote local port, the click connection and testing data transporting.
2.UDP client is a wireless transport protocol, provide the transmission service that easy and not reliable. No
difference between the disconnecting and connecting, make the IP and port then send data to it. No requirement for
drop package. Small data package and fast frequency, send data to point IP.
3.Under UDP client mode ,USR-TCP232-ED2 communicate with the remote port of the remote IP, if the data
comes from other tunnel, it will not be received by USR-TCP232-ED2.
4.Under the UDP client, USR-TCP232-ED2 can realize the UDP broadcast if the remote address is
255.255.255.255; meanwhile, it also can receive the broadcast data. 3010 and above firmware supports broadcast in
LAN, like
xxx.xxx.xxx.255.
5.Communication case:
1 Build a UDP, the IP of the PC: 172.16.11.8, port:20108
2 USR-TCP232-ED2 work in UDP client mode, remote port is 20108
1. Do not check the original IP address basic on the common UDP, under UDP server mode, USR-TCP232-ED2
received the UDP data package and change the remote IP change into data original IP and port, the turn back to the last
IP and port.
2. Used in communicating with several device and do not want to use the TCP for the high speed.
3. Application case:
1
set USR-TCP232-ED2 into UDP server mode, local port is 23
2
Click two testing software, work mode:UDP; remote IP and port is the IP and port of USR-TCP232-ED2. then
click send, the serial port will receive the data , click serial port send, the testing software will display the data that
received by the recent one communicating with USR-TCP232-ED2.
1. Under the HTTPD client mode, user’s device send questing data to appointed HTTP server via USR-TCP232-ED2,
then USR-TCP232-ED2 received the data from HTTP serve and analyze it and send to serial device.
2. No need to care of the data converse between the serial port data and net data package, easy parameters
configuring and can realize the serial device send questing data to HTTP server.
3. When sending data to HTTP server, the URL, header, remote IP, remote port and other information can be set
via USR-TCP232-ED2, then save them. Every time send data, USR-TCP232-ED2 will add URL and header. In terms of the
returned data, user can choose whether to drop the header.
1. Set into HTTPD client mode via webpage, and set correspond remote IP and port.
2. Setting the HTTPD type, HTTPD URL and httpd client header
3. Hook whether remove HTTPD head when the data send back.
4. Then save them, and restart.
5. Open the serial port to send data and the serial data will submit to your webpage, meanwhile the serial device
also received the information that server return.
6.Detailed information can refer to the below diagram.
2. Enter webpage, click the web to serial, bond out “connect success” and means that you can receive and send.
Open the Testing software, configuring the serial parameters then open the serial port.
3. Click to send ASCII code, serial receive the data. Click send in testing software, the webpage receive the data.
Diagram 4.2.6-2 Web to Serial Webpage
Webpage to serial port, user should possess of some web program, design the webpage, asking their device data
and deal with the data. Then the result will display on the web. After design the webpage, download the webpage to
USR-TCP232-ED2 according to the defined webpage to realize the development.
1. Build a connection and connect to USR-TCP232-ED2
function connectx(){
try{
socket=new WebSocket('ws://'+window.location.host+':6432');
socket.binaryType = "arraybuffer";
Receive the data assigned VCOM data, and send it in the data of net data using VCOM to solve the PC as a serial
port and can not connect with device,which is convenient for users.
E.g.
1. Take USR-TCP232-ED2 in TCP Server mode as a server, which is convenient for user to change the computer and
connected.
2. Setting the way to connect the VCOM and USR-TCP232-ED2 manually:
① Open the VCOM and add the serial port, choose the port: COM2(avoid the exist COM port) protocol use the TCP
client, remote IP set to the IP of the USR-TCP232-ED2, remote port is the port of the USR-TCP232-ED2. note fill the
device name.
② Click sure, observe if the connection is established, if the connection has established, and you can test the data
Flow control: the way for serial port flow control, users can choose to enable 485 or not, control the receive and
send for 485, 3010 and later default enable 485 control mode, under the condition that no hardware flow control,
enable 485.
1. NONE: default serial port mode, under this mode, 3010 and later version enable 485
2. RTS/CTS: hardware flow control. The hardware flow control for USR-TCP232-ED2 supports RTS/CTS.
3. Xon/Xoff: software flow control. 3010 and later version enable the software flow control.
Hardware or software flow control deal the serial port data for better. When the serial port received buffer data
out than the threshold value, inform the remote port stop sending data until complete buffering, then inform to deal
with data.
The serial packing time and length of USR-TCP232-ED2 can be set. Packing the serial port data according to the
packing time and packing length under the transparent transmission mode .
The frame mechanism of serial port is based on the packaging time and the packaging length. The case are as
fellow.
1. Packing time set as 10ms and the length as 512.
If the internal time for serial received the data more than 10ms, or the length more than 512, USR-TCP232-ED2
send packing to net when the serial port receive data.
2. If the packing time is 0 and the packing length is not 0, only the packing length work; and if the packing length is
0 and he packing time is not 0, only the packing time work.
3. Set the packing time is 0 ms and the packing length is 0
When the packing time is 0ms, USR-TCP232-ED2 works the default packing time: if the interval that serial port received
data more than packing time for send 4 byte, USR-TCP232-ED2 send packing. E.g. baud rate 115200, 4 bytes packing
time is:
T=0.4ms, (if the value less than 0.1ms. Packing time calculates as 0.1ms.
T=1/baud rate*10*4
4. For the limit of the serial port speed, users should control the flow when USR-TCP232-ED2 receive the data
from net and send to serial, or there will be data over flow in serial. So when send net data to serial, user should
calculate the data flow. E.g.
Calculate way: if sending M bytes need N s. the way to check for possible overflow methods (if the net situation is
ok, the time can be ignored ). The time for M bytes:
T=1/baud rate*10*m
If there is no overflow, M bytes of data must be transmit within Ns,
N>2T is require for USR-TCP232-ED2 to work properly. If the baud rate is less than 9600, keep n>T.
Serial packing time: default is 4 bytes time, can be set from0~255.
Serial packing length:default 1460, can be set from the 0~1460.
1) When using RFC2217, click setting software RFC2217 to enable this function.
2) When the serial port parameters change, send the RFC2217 package, after USR-TCP232-ED2 received the RFC2217
command, modify the serial parameters and can not transparent transmission.
4.4. Special Function
4.4.1. Heartbeat Package Function
Under Transparent transmission mode, have the USR-TCP232-ED2 sent heartbeat package to net server or the
serial port。
Heartbeat package send to the net to keep connecting with server and works in TCP client and UDP client mode.
Send heartbeat package to serial port and instead of the query command from net to reduce the communication
flow.
3010 and above version supports heartbeat function which can send to serial and net.
Modbus polling:supports more than one master PC query the data of slave PC, the timeout can be set. 3010 and
above version supports this function.
4.4.3. Registration Package
Under the net transparent transmission mode, user can have the module sent registration package to server to
recognize the original of the data or work as the authorization code for server function.
Registration can be sent when the connection build between the module and server, also it can inset a registration
package data in front of the data package. The data registered can be MAC address or the definition registration
package(at most the definition registration can be 40 byte.)
3010 and above version supports the registration package.
Send registration package when building connection usually used in the situation that connecting the server
needed to register.
Diagram 4.4.3-1 Building send Registration Package
Carrying the registration package:insert the package in front of the registration and used in the protocol
transmission.
USR-cloud aim to solve the problem of the communication between device and device, device and upper
machine( android, IOS,PC).USR-cloud used to transparent transport the data, the device connected can access remote
data without modify.USR-cloud can used in remote monitor, the internet of things, the internet of cars and intelligent
house, so the USR-TCP232-ED2 installed USR-cloud. More information can be scan http://console.usriot.com
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 and supports the
devices with firmware 3009 and later versions.
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: Password generated after adding the device to cloud software
USR-TCP232-ED2 can connect with the serial printing, operating the printing via net, and change the serial printer
into net printer, 3010 and above version supports this function.
Testing way:
1. Configuring module parameters:work mode:TCP server, local port:9100
USR-TCP232-ED2 supports customize webpage. The user can upgrade their webpage into USR-TCP232-ED2 via
customize webpage. To be more convenient for user, we have prepared upgrade webpage package
Including webpage code(USR-TCP232-ED2 default webpage code and medium webpage code), webpage tools can
be download.
1. If you will customize webpage, please contact with the USR supports or the sale.
Modify the webpage code, open “UpgradeHtml.exe”, destination IP is the IP of USR-TCP232-ED2, the final name of
file is “fs”, product choose the”M4”, then click the upgrade.
Diagram 4.4.6-2 Webpage Upgrade
4.4.7. Customize MAC
The unique MAC in the world for USR-TCP232-ED2, begin with D8B04, checked in the webpage. If the user have
special demand, can set instant MAC via webpage. Please do not all F. restore to the factory setting and the MAC will be
back to the factory MAC.
Restart timeout( no data restore) used to keep USR-TCP232-ED2 long time stable work. When net port can not
receive the data, or have note receive data for long time, USR-TCP232-ED2 will restart in the time to prevent the
communication from the abnormal. The time can be set via webpage and AT command, range from 60~65535s, default
value is 3600s. When the time less than 60s, default is 0 which means that disable this function.
Diagram 4.4.8-1 Reset timeout
4.4.9. Clear Buffer Data
Before data connection, the data already received by serial port will be put in the buffer zone. The received buffer
of serial is 2Kbyte. After connecting the TCP connection, clear the buffer data or not can be choose in the webpage,.
The default value is not clear. If user enable the short connection, this function will do not work.
This function is used to save the server resource and also used in the situation that several point to one. Short
connection make sure all the connection can work, do not need any extra way to filtrate.
TCP short connection can used under the TCP client mode. Enable the short connection and send data, if there is
no data received any data in serial port or the net port, it will disconnect.
Default disable, the interval time can be set, range from 2~255s, default 3s. setting diagram are as fellow:
Diagram 4.4.10-1 Short Connection
5. Parameters Setting
This character shows how to set USR-TCP232-ED2 parameters to realize the application.
The way to set USR-TCP232-ED2 including setup software, webpage setting and serial port setting.
there will show the information for USR-TCP232-ED2, if the password is error, software will bond out the window that
you should enter the username and password, the click enter. Both default username and password are admin. All the
default parameters setting and there will not bond out username and password.
Diagram 5.1.1-2 Username and Password
2. Basic Parameters setting
Click Tidy Show and you will see all the basic parameters we can set, setting the parameters you need, and then
base save, and you can save the parameters you set, keep others in default.
Websocket port: refer to the character “ webpage to serial”, this port is the webpage to serial port
Web port: the default port to access the webpage is 80.
Username: the username for USR-TCP232-ED2 to log in, the certification code to modify the parameters which can
prevent other user in the same LAN from changing USR-TCP232-ED2 parameters.
Password: as the username, the password for USR-TCP232-ED2.
Device name:defaultUSR-TCP232-ED2 and can be modify
User MAC: the MAC address of the USR-TCP232-ED2
IP address type: static IP and DHCP
Module static IP: the static IP for USR-TCP232-ED2, keep it in the same LAN with your router.
Subnet mask: default is 255.255.255.0
Gateway: usually is the IP for router, setting correctly and user can communicating across the LAN and DDNS.
3. Port setting
Modify the parameters you need to setting then save them.
Baud rate: serial port communication baud rate, can be the standard baud rate or customize.
Parity/ data/ stop:serial parameters: parity:none, odd, even, mark, space; data:5,6,7,8; stop:1,2.
Flow control: None/RS485/Hardware, Hardware means hardware flow control, none or RS485 means no flow
control.
Work mode: TCP Server /TCP Client/ Httpd Client/UDP Client/UDP Server
Remote IP/remote port:the IP and port of server connected when USR-TCP232-ED2 work as a client including TCP
Client/ Httpd Client/UDP Client
Local port: the port that USR-TCP232-ED2 build connection, recommend set to be 0 when USR-TCP232-ED2 work
as TCP client, which means build in random connection.
TCP server style: none
Modbus TCP: setting when using the modbus TCP to modbus RTU
Pack time and packlen: used in the serial port mapping
Synchronize baud rate(RFC2217)
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, then choose upgrade the firmware.
Diagram 5.1.1-5 Firmware Upgrade
5.1.2. Setting Protocol Setting Parameters
Via the protocol, you can complete: search, set, save parameters, restore. For user to make their own setup parameters.
1. Net setting parameters steps
1Built socket:
Build a UDP socket, remote IP :255.255.255.255, remote port:1901.
Send searching order on the internet.
USR-TCP232-ED2 return the IP address and MAC.
Net port read the parameters of USR-TCP232-ED2.
Combine the MAC address the username, password and the parameter that need setting to be a setting
D0 07 : Firmware version( lower in front)
12 34: encryption version, others are not encrypted
version; encrypted version can upgrade the encrypt
program and no encrypted one should analyze the
encryption then send.
Application_title
19~34
55 53 52 2D 54 43
50 32 33 32 2D 35
30 30 00 00
device name
checksum
35
F0
(this value can be ignore)
Check sum initial value is 0x00, reduce every bits of
TAG_STATUS in order,till the last bit, and the result is
checksum.
Form 5.1.2-7 Return Command
e.g.
search command returned result(36 bytes):
FF 24 01 00 00 C0 A8 01 6B D8 B0 4C C0 0D 65 C3 0B 01 00 55 53 52 2D 4B 33 00 00 00 00 00 00 00 00 00 00 8E
Parity is minus the sum parity, original value is 0x00, then minus every bytes one by one as below:
0x8E = 00 - FF - 24 - 01 - 00 - 4B - ... - 31 - 00 - 00
2Restart command return result
Respond (4 bits): FF 01 02 4B if the password right 4B = 'K'
FF 01 02 45 username password wrong 45 ='E'
3Read order command return result
Return all the parameters of USR-TCP232-ED2 net, totally 180 bytes without parity
No protocol and return directly
Returned content:180 bytes(basic parameters + serial parameters+ USR-cloud)
4Storage setting command return result
Correct:
FF 01 04 4B
5Other return
Parity and return: return 'E' + right value:
Correct perform: FF 01 CMD‘K’:
Username password wrong return: FF 01 CMD‘P‘:
Other wrong return: FF 01 CMD‘E’.
5.2. Webpage Setting Parameters
Open the browse and enter the IP of USR-TCP232-ED2,( default is 192.168.0.7) and user can open the
USR-TCP232-ED2 login windows. Enter username:admin, password:admin, then click enter and enter the webpage.
Click the English on the right up, change the language.
Diagram 5.2-2 Language
Note: default is English.
1. Current status webpage
Module name: default is USR-TCP232-ED2
Firmware revision: the current version is 3016
Current IP address: default is static IP(192.168.0.7),here using DHCP to connect the PC.
NAC address
Run time: count time from power on.
TX count(ETH): the send number of the data from power on.
RX count(ETH):the received number of the data from power on.
Module name:default:USR-TCP232-ED2 and can be change
Websocket port
Net port
MAC address( can be modify)
Username
Password
Buffer data before connected: whether to clear the buffer data.
Reset timeout: after set time interval, serial or net have not receive the data, USR-TCP232-ED2 will reset, and 0
means this function disable.
6. Reboot
Diagram 5.2-7 Reboot
Save all the parameters and click restart module to work.
Net AT command, the command collection that delivery via net port and module under the command mode,
details are like the serial port command.
Net AT command mode: keep the module and PC in the same LAN, and the user can setting via AT command.
Send www.usr.cn via UDP, if the module and PC in the same LAN, PC will receive the return data from
USR-TCP232-ED2, which means module have enter the net AT command and can configure it.
Under AT command mode, if there is no command for 30s, USR-TCP232-ED2 will exit the AT command.
5.3.2. Serial AT Command
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 commend to use secureCRT software tool or USR pro APP. Below are using
the secureCRT with UART to perform.
From transparent transport to order mode 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 command mode.
Diagram 5.3.1-1 Enter the AT Command
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 net transparent transport 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.
9600,19200,38400,57600,115200,230400,380400,460800(details according to module
customize, module can supports random baud rate. )
data_bits:data: 5、6、7、8
stop_bits:stop 1、2( details refer to the module supporting
parity:parity
NONE
EVEN
ODD
MARK
SPACE
flowctrl:hardware flow control(CTS RTS)
NFC:no hardware flow control
FCH:hardware flow control
FCR:software flow control
E.g. : AT+UART=115200,8,1,NONE,NFC
USR-TCP232-ED2 User Manualwww.usriot.com
14. AT+UARTTLN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Function: setting/query the customize Packaging mechanism
Format:
query
setting
Parameters:
time:bytes interval:0~255 ms;.
length:longest bytes for data package:0~1460 byte.
E.g. : AT+UARTTL1=0,0
15. AT+SOCKMN
(M: the port number of the socket, A~H. N:serial port number, 1~8. single socket please ignore the MN)
Function: setting/query web protocol parameters
Format:
USR:user defined registration package, at most for 20 bytes
MAC:MAC do as a registration package
CLOUD:disable registration function
OFF: disable registration function
(N:the number of the port, 1~8. for single port socket, ignore the N)
Function: setting query under TCP client mode, registration package perform mechanism
Format:
query
setting
Parameters:
status:
E.g. : AT+REGTCP1=all
20. AT+REGUSRN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Function: setting/query content of the defined registration package
Format:
query
setting
AT+REGTCPN<CR>
<CR><LF>+OK=< status><CR><LF>
AT+REGTCPN =< status><CR>
<CR><LF>+OK<CR><LF>
First:send registration st first time
Every:data carry registration package
ALL: both
URL:under the HTTPD Client, URL of the GET or POST
E.g. : AT+HTPURL1=1/PHP
24. AT+HTPHEADN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Function: setting/query the header of the HTTP protocol
Format:
query
AT+HTPHEADN<CR>
<CR><LF>+OK =<string><CR><LF>
setting
AT+HTPHEADN =<string><CR>
<CR><LF>+OK<CR><LF>
Parameters:
string:the defined header information, at most for 180 bytes
Note: every enter using the <<CRLR>> to instead
There is a <<CRLF>> fellow the HTTPD, how many HTTPD and how many <<CRLF>>.
E.g. : AT+HTPHEAD=Accept:text<<CRLF>>
USR-TCP232-ED2 User Manualwww.usriot.com
25. AT+HTPCHDN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Function: setting/query filter the header of the HTTP return information.
Format:
data:defined registration package content,ASCII can be 40 bytes and HEX can be 80 bytes at most
type:registration package content enter format: ASCII or HEX
Add AT command, restart timeout and short time connection
2017-05-03
V1.1.2
Modify the serial port instr in the function feature, change
into 3 TTL work independently
2019-06-03
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.