S erial to Ethernet module USR-TCP232-T24 series http://en.usr.cn
Jinan USR IOT Technology Limited Page 39 of 53 tec@usr.cn
4.
4.
4.
4. Configure
Configure
Configure
Configure
Module's working mode can be set as needed, we try my best to let the user work become simple, all did
not open advanced parameters, if you have special requirements, please contact us .
You
can set the work mode, the module IP and port, subnet mask, gateway, serial port baud rate, module
port, destination IP and port , c an be set through the serial port or network port are two ways to setup software
(USR-TCP232-Setup) .
4.1
4.1
4.1
4.1 C
C
C
C onfigure
onfigure
onfigure
onfigure command
command
command
command format
format
format
format
Configure mode UART interface: 9600bps,n,8,1
part bytes description example hex
prefix 2 0x55 0xAA 0x55 0xAA 0x55 0xAA
destination IP 4
destination IP 192.168.0.2
01
0xC9 0x00 0xA8 0xC0
destination
port
2
Destination port 8234 0x2A 0x20
Host IP 4 The IP module hold 192.168.0.7 0x07 0x00 0xA8 0xC0
Host port 2 TCP/UDP source port 20108 0x8C 0x4E
Gateway 4
Gateway IP 192.168.0.2
01
0xC9 0x00 0xA8 0xC0
Work mode 1
0x01: TCP Client
0x00: UDP
0x02: UDP Server
TCP mode 0x01
baud rate 3 UART baud rate 115200 0x00 0xC2 0x01
Reserved 1 Reserved 00 0x00
checksum 1
Sum(destination
IP,
destination port, host
IP,
host port, gateway, work
mode, baud rate,
reserved)
0xB9 0xB9
Full example : 00 A8 C0 2A 20 07 00 A8 C0 8C 4E C9 00 A8 C0 01 00 C2 01 00 B9
O nce in configure mode, the UART parameter change to 9600bps,n,8,1, and a ‘ U
’
ascii character is
send out to ensure the control MCU that in the configure mode. If the 24byte command has effect , a ‘ K
’
ascii
character is send back to control MCU. If configure command format error, an ‘ E
’
character will be send back
to control MCU. If the error is the checksum not match , the 1byte right checksum will be send back to control
MCU also.