background image

USR-TCP232-302 User Manual

h.usriot.com

Jinan USR IOT Technology Limited

www.usriot.com

17 / 53

Diagram 3.2-2 DNS

3.3. VCOM

USR-VCOM Download:

http://www.usriot.com/usr-vcom-setup-software-v3-7-1-520/

USR-VCOM Manual:

http://www.usriot.com/usr-vcom-setup-software-user-manual-v3-5-2/

If user’s upper computer and device are all connect by serial port, user can create a COM which has TCP/

IP to realize remote control by USR-VCOM software.

1) Turn off firewall and anti-virus software.
2) Install USR-VCOM.

I advise user to select “Search”or “Smart vcom” to create virtual port.

Please refer to 3.3.3

3.3.1. TCP232-302 Works as Client

1) Set module parameters. T2 work model: TCP Client.
2) Open USR-VCOM, set virtual port as follows :

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

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

Страница 2: ...nd UDP Mechanism 15 3 2 DHCP and DNS Function 16 3 3 VCOM 17 3 3 1 TCP232 302 Works as Client 17 3 3 2 TCP232 302 Works as Server 18 3 3 3 Other Ways to Create VCOM 19 3 4 Special Function 21 3 4 1 Fa...

Страница 3: ...method 38 3 8 2 Flow calculation 38 4 Parameter Setting 39 4 1 Webpage Setting 39 4 2 Log in 39 4 3 State Configuration 40 4 4 Local IP 40 4 5 Serial Port 41 4 6 Expand Function 42 4 7 Misc Configurat...

Страница 4: ...fully and operate personally it can help you know about module generally Here is application case for inference http www usriot com support application case usr tcp232 series application case You can...

Страница 5: ...USR IOT Technology Limited www usriot com 5 53 2 Shut down unrelated network card just use one local connection 3 If you want connect module to PC directly user should set static IP for computer whic...

Страница 6: ...55 255 0 Default gateway 192 168 0 1 Serial baud rate 115200 Serial parameter None 8 1 Local port 20108 Target IP 192 168 0 201 Target port 8234 Diagram 1 3 1 TCP232 302 Default Parameter 1 4 Data Tra...

Страница 7: ...so has some industry characteristic function 2 2 Features Support DHCP Dynamic Host Configuration Protocol obtain an IP address automatically Support DNS Domain Name System server address can be defin...

Страница 8: ...s of connection Under TCP Server Client number is 1 16 default value is 4 the IP connected to Client is visible Support User defined MAC address Restore factory default Across the gateway switches rou...

Страница 9: ...USR TCP232 302 User Manual h usriot com Jinan USR IOT Technology Limited www usriot com 9 53 2 4 Size Diagram 2 4 1 USR TCP232 302 Size...

Страница 10: ...rver actively establish a connection to transmit date 2 In TCP Client Mode It has function of identifying disconnected link When connected it will send keepalive package every 15s If unconnected it ca...

Страница 11: ...Client Mode 3 1 2 TCP Server Mode 1 It has to be connected before transferring data 2 In TCP Server Mode 302 monitors local port it will response and establish a connection when there is a request Up...

Страница 12: ...ited www usriot com 12 53 4 In TCP Server Mode The maximum number can be configured by user TCP Client number is from 1 to 16 default value 4 When the Client link is more than 16 the new link will rep...

Страница 13: ...e target port whose IP has been set When serial port receive data it send data to target IP and port If data doesn t come from this channel it will not be accepted by TCP232 302 3 In UDP Client Mode i...

Страница 14: ...mal UDP it doesn t validate the source of IP address Once received UDP data it convert target IP to data source IP similar to TCP Server 2 In UDP Server Mode TCP232 302 records an IP Once it receives...

Страница 15: ...end to serial port without process 3 According to demand user can define HTTP content If the request type is POST TCP232 302 will add Connection and Content Length 4 In HTTPD Client Mode it supports G...

Страница 16: ...w to set IP address or it can t connect because of the set IP is not in the same segment the function is helpful IP address obtained from DHCP can be checked but can t be modified Diagram 3 2 1 DHCP D...

Страница 17: ...e user manual v3 5 2 If user s upper computer and device are all connect by serial port user can create a COM which has TCP IP to realize remote control by USR VCOM software 1 Turn off firewall and an...

Страница 18: ...rtual Port 3 If the work mode and parameter is correct TCP232 302 will connect automatically If user want to monitor sent data please click Monitor It is used to check whether the data is correct Diag...

Страница 19: ...ser Manual h usriot com Jinan USR IOT Technology Limited www usriot com 19 53 Diagram 3 3 2 1 Create Client Virtual Port 3 3 3 Other Ways to Create VCOM 1 Create VCOM by search button Diagram 3 3 3 1...

Страница 20: ...USR TCP232 302 User Manual h usriot com Jinan USR IOT Technology Limited www usriot com 20 53 Diagram 3 3 3 2 Search Function 2 Automatically Create...

Страница 21: ...low level When unconnected high level When TCP232 302 is in TCP mode after connection Link pin will pull down automatically Otherwise Link pin will pull up When TCP232 302 is in DUP model Link pin wil...

Страница 22: ...baud rate of software on PC will automatically matched with the baud rate of TCP232 302 3 5 Additional Function 3 5 1 Display IP and Data On the webpage of TCP232 302 it can display the IP of device a...

Страница 23: ...pport character input By default heartbeat package turns off User can turn on it as follows 3 5 7 Defined Heartbeat Package The content of heartbeat package can be defined 40 bytes at most Time set fr...

Страница 24: ...R TCP232 302 User Manual h usriot com Jinan USR IOT Technology Limited www usriot com 24 53 3 6 Firmware Upgrade When Module T2 IP and PC IP is in the same segment click here then click firmware upgra...

Страница 25: ...tion protocol is set by UDP Broadcast Little endian In UDP communication target port number should be 1500 Local port number is random All communication protocol is UDP broadcast 3 7 1 Network setting...

Страница 26: ...ddress The last 12 byte before check bit is user name and password both is 6 byte if not write 0 the last byte of user name and password should be 0 the following name and password is the same rule Re...

Страница 27: ...2 send ID when sending data bit2 4 RS485 bit4 16 Reset bit5 32 Link state bit6 64 index function bit7 128 Similar RFC2217 function mac_addrs 6 00 00 00 00 00 00 Device Mac address only support query...

Страница 28: ...D 69 6E 00 07 Sum check 07 13 0B 6E 00 From 4th to 9th is TCP232 302 MAC address 10th to 21th is user name and password both is 6 byte if not write 0 Cloud function command send FF 13 0c 00 71 77 7c 4...

Страница 29: ...me heart_len 1 00 heartbeat package length register_len 1 00 registration package length heartbeat 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00...

Страница 30: ...ckage 130 byte 50 byte 84 byte e g 95 63 03 00 00 00 50 00 00 07 00 A8 C0 01 00 A8 C0 00 FF FF FF 55 53 52 2D 54 43 50 32 33 32 2D 33 31 30 00 00 61 64 6D 69 6E 00 61 64 6D 69 6E 00 00 01 00 A4 AC CF...

Страница 31: ...eturn result If check sum is wrong it return E right check sum Right operation FF 01 CMD K If user name and password is wrong it return FF 01 CMD P Other is wrong it returns FF 01 CMD E 3 7 3 Monitor...

Страница 32: ...fault function usLocationURLPort 2 00 00 Not enabled reserved protocol usHTTPServerPort 2 50 00 HTTP service port ucUserFlag 1 00 Not enabled reserved protocol ulStaticIP 4 07 00 A8 C0 Static IP ulGat...

Страница 33: ...4 00 00 00 00 Invalid byte arbitrary configuration ucFlags 1 00 Cloud function For 5th 0 turn off cloud 1 turn on cloud ucWorkMode 1 01 Work mode 0 UDP 1 TCP Client 2 UDP Server 3 TCP Server 4 HTTPD...

Страница 34: ..._addrs 6 00 00 00 00 00 00 Device Mac address only support query DNS Gateway IP 4 01 00 A8 C0 DNS address only support query ucReserved 4 arbitrary value Unused ulBaudRate 4 00 C2 01 00 Serial port ba...

Страница 35: ...Device ID 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Module Cloud ID CLOUD_password 8 00 00 00 00 00 00 00 00 Module Cloud password H_R_ucFlags 1 00 1th is 1 heartbeat package to...

Страница 36: ...password 6 31 31 30 34 31 35 Password for network module 110415 is initial password Target IP 4 C9 00 A8 C0 Target IP Target Port 2 2A 20 Target Port Module IP 4 07 00 A8 C0 Module IP Module Port 2 8...

Страница 37: ...ion Head of data package 2 55 BC Head of data package Target IP 4 C9 00 A8 C0 Target IP Target Port 2 2A 20 Target Port Module IP 4 07 00 A8 C0 Module IP Module Port 2 8C 4E Module Port Gateway 4 C9 0...

Страница 38: ...RT Framing mechanism 3 8 1 packing method TCP232 302 accepts time packing method 1 packing time standard more than 4 byte packing time 2 Calculation method TCP232 302 Port parameter data bit 8 byte st...

Страница 39: ...r Under this situation one PC can connect several TCP232 302 or one TCP232 302 can connect several devices 4 1 Webpage Setting Parameters need to be set 1 Work Mode TCP Client TCP Server UDP Client UD...

Страница 40: ...X Count RX Count Diagram 4 3 1 State Configuration 4 4 Local IP IP type Static IP TCP232 302 Fixed IP and DHCP obtain an IP address automatically Static IP don t set it the same as local network IP Su...

Страница 41: ...ate 600bps 230 4Kbps 2 Stop bit 1 2 3 Data bit 5 6 7 8 4 Check bit NONE ODD EVEN MARK SPACE 5 Local Port Number Fixed port number by default It can be set 0 when router is connecting Extranet 6 Remote...

Страница 42: ...SR TCP232 302 User Manual h usriot com Jinan USR IOT Technology Limited www usriot com 42 53 Diagram 4 5 1 Serial Port 4 6 Expand Function Defined registration package and Defined registration package...

Страница 43: ...232 302 User Manual h usriot com Jinan USR IOT Technology Limited www usriot com 43 53 Diagram 4 6 1 Expand Function 4 7 Misc Configuration Set module name user name pass word MAC Diagram 4 7 1 Misc S...

Страница 44: ...USR TCP232 302 User Manual h usriot com Jinan USR IOT Technology Limited www usriot com 44 53 4 8 Reboot Diagram 4 8 1 Reboot Setting 4 9 Software Setting 1 Search device...

Страница 45: ...ot com Jinan USR IOT Technology Limited www usriot com 45 53 Diagram 4 9 1 Search 2 Set parameters Diagram 4 9 2 Parameter setting 3 Check data Click Hex Stream it s helpful to understand the protocol...

Страница 46: ...ual h usriot com Jinan USR IOT Technology Limited www usriot com 46 53 Diagram 4 9 3 Check Streams 4 Press CFG Reload and click operate via COM select serial port Read Configuration user can also set...

Страница 47: ...rt parameter bit Bit number Instruction Value Description 1 0 Data bit choice 00 5 bit data bit 01 6 bit data bit 10 7 bit data bit 11 8 bit data bit 2 Stop bit 00 1 bit stop bit 01 2 bit stop bit 3 C...

Страница 48: ...FC2217 set 1 turn on function value is 0x84 Appendix Upper computer Socket programming example Server Socket code 1 include stdio h 2 include string h 3 include sys socket h 4 include netinet in h 5 i...

Страница 49: ...log LOG_ERR s d bind socket failed __FILE__ __LINE__ 40 exit 1 41 42 if listen listen_sock MAX_LISTEN_NUM 0 43 44 syslog LOG_ERR s d listen failed __FILE__ __LINE__ 45 exit 1 46 47 while 1 48 49 app_s...

Страница 50: ...6 else 87 exit 1 88 89 recvlen retlen 90 leftlen retlen 91 ptr retlen 92 93 while recvlen leftlen 94 printf receive data is s recvbuf 95 close app_sock 96 97 close listen_sock 98 99 return 0 100 Clien...

Страница 51: ...R_PORT 26 sock_fd socket AF_INET SOCK_STREAM 0 27 if sock_fd 0 28 29 syslog LOG_ERR s d create socket failed __FILE__ __LINE__ 30 exit 1 31 32 if connect sock_fd struct sockaddr ser_addr sizeof ser_ad...

Страница 52: ...andong 250101 China Tel 86 531 55507297 86 531 88826739 803 Web http www usriot com Support http h usriot com Email sales usr cn 7 Disclaimer The document provides information about USR TCP232 T2 modu...

Страница 53: ...USR TCP232 302 User Manual h usriot com Jinan USR IOT Technology Limited www usriot com 53 53 8 Undated History V 1 0 2016 5 13 First Version V 1 1 2016 6 27 update...

Отзывы: