background image

USR-TCP232-T2 user manual

www.usriot.com

Jinan USR IOT Technology Limited

www.usriot.com

20

Diagram 4.2.1-1

TCP Client Setting

Diagram 4.2.1-2

TCP Client Model

Содержание USR-TCP232-T2

Страница 1: ...USR TCP232 T2 user manual www usriot com Jinan USR IOT Technology Limited www usriot com 1 USR TCP232 T2 User Manual File version V1 1 1 ...

Страница 2: ...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 ...

Страница 3: ...ber 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 ...

Страница 4: ...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 l...

Страница 5: ...USR TCP232 T2 user manual www usriot com Jinan USR IOT Technology Limited www usriot com 5 Diagram 1 2 1 2 Shut down network card none related reserve one connect Diagram 1 2 2 ...

Страница 6: ...er 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 ...

Страница 7: ...ocol 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 Diag...

Страница 8: ...ing 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...

Страница 9: ...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 ...

Страница 10: ...0ms it can reset module If unneeded don t connect the pin Power on reset means restart the module 5 TXD Send data TTL connect to 3 3v MCU For 5V refer to Diagram 3 1 1 2 6 RXD Receive data TTL connect to 3 3v MUC For 5V refer to Diagram 3 1 1 2 7 CFG reload Pin for module configuration and restore factory default When normal working don t connect the pin or connect to high level Under low level th...

Страница 11: ... 11 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 ...

Страница 12: ...232 T2 user manual www usriot com Jinan USR IOT Technology Limited www usriot com 12 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 ...

Страница 13: ...USR TCP232 T2 user manual www usriot com Jinan USR IOT Technology Limited www usriot com 13 Diagram 3 1 3 1 Evaluation Kit ...

Страница 14: ...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 ...

Страница 15: ... 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 ...

Страница 16: ...uirement 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 ind...

Страница 17: ...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...

Страница 18: ...d 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 ...

Страница 19: ... 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 wil...

Страница 20: ...USR TCP232 T2 user manual www usriot com Jinan USR IOT Technology Limited www usriot com 20 Diagram 4 2 1 1 TCP Client Setting Diagram 4 2 1 2 TCP Client Model ...

Страница 21: ...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 t...

Страница 22: ...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 U...

Страница 23: ...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 ...

Страница 24: ...e 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 ...

Страница 25: ...st 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 repl...

Страница 26: ... flexible Disadvantage Easy to block up Information Because of check and resend mechanism interval isn t accurate Under bad network condition it is high risky to losing data package 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...

Страница 27: ...ot com 27 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 ...

Страница 28: ... 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 virt...

Страница 29: ... www usriot com Jinan USR IOT Technology Limited www usriot com 29 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 ...

Страница 30: ... user manual www usriot com Jinan USR IOT Technology Limited www usriot com 30 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 ...

Страница 31: ...USR TCP232 T2 user manual www usriot com Jinan USR IOT Technology Limited www usriot com 31 Diagram 4 4 3 3 Smart VCOM 4 5 Serial port function 4 5 1 Basic parameters Diagram 4 5 1 1 software setting ...

Страница 32: ...ding 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 T...

Страница 33: ... 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 al...

Страница 34: ...e 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...

Страница 35: ...USR TCP232 T2 user manual www usriot com Jinan USR IOT Technology Limited www usriot com 35 Also can be set in the webpage as fellows ...

Страница 36: ... 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 th...

Страница 37: ...de 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 differ...

Страница 38: ...eceived 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 n...

Страница 39: ...tpd 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 restor...

Страница 40: ...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...

Страница 41: ...e 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 ...

Страница 42: ... 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 ...

Страница 43: ...n 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 ...

Страница 44: ...ustomize 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 Che...

Страница 45: ...USR TCP232 T2 user manual www usriot com Jinan USR IOT Technology Limited www usriot com 45 Diagram 5 1 1 5 Check Streams 5 Press CFG Reload and click operate via COM Diagram 5 1 1 6 Port setting ...

Страница 46: ... 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 ...

Страница 47: ...al www usriot com Jinan USR IOT Technology Limited www usriot com 47 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 ...

Страница 48: ... 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 Diagr...

Страница 49: ...s 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 ...

Страница 50: ...d 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 co...

Страница 51: ...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 ...

Страница 52: ...onfirm 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 packag...

Страница 53: ... 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 l...

Страница 54: ...g 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 rese...

Страница 55: ...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 R...

Страница 56: ...rameters 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 s...

Страница 57: ...unction 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 pa...

Страница 58: ... 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 ord...

Страница 59: ...le 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 registra...

Страница 60: ...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 settin...

Страница 61: ...y 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 HTPH...

Страница 62: ...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...

Страница 63: ...R 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 Paramet...

Страница 64: ...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...

Страница 65: ...ot 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...

Страница 66: ...tion 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 Parameter...

Страница 67: ... 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 fit...

Отзывы: