Httpd Client Mode of Ethernet Module USR-TCP232-T2

 Httpd Client

1) In this mode, the user's terminal device can send request data to the specified HTTP server through Ethernet module USR-TCP232-T2, and then T2 receives from HTTP.
The server's data, parses the data and sends the results to the serial device.
2) The user does not need to pay attention to the data conversion process between the serial port data and the network data packet, and the serial port setting can be realized by simple parameter setting. A data request to the HTTP server.
3) When T2 sends data to the HTTP server through the serial port, the required URL and header, target domain name/IP, target port number, etc. can be passed.
Saved after T2 setting, only need to send request data every time data is sent, T2 will automatically add informat ion such as URL and header. Returned data, The user can choose whether to go to the header processing.
4) Specific use cases
Httpd Client web page settings
1. Set T2 to Httpd Client mode via web page and set the corresponding target port number and destination IP/domain name USRTCP23 2 T2 Software Design Manual
2. Set the Httpd request method and the URL and header information of the request packet through the web page.
3. Whether the header of the server recovery information is removed or not can be set through the web page.
4. After setting, click Save Settings, then restart T2 to take effect.
5. Open the serial port to send data, then the serial port data will be submitted to your web server, and the serial port will also receive the server back. Complex information.
6. For details on sending a request, refer to the “Httpd Client Mode Description” icon, as shown below:
 Httpd Client
Function: Set/Query Network Protocol Parameter Format
Format: Query:
<CR><LF>+OK=< protocol,
IP,port ><CR><LF>
AT+SOCK=< protocol,IP,port ><CR>
Protocol: protocol type, including
TCPS corresponds to TCP server
TCPC corresponds to TCP client
UDPS corresponds to UDP server
UDPC corresponds to UDP client
corresponds to Httpd Client
IP: IP address or domain name of the target server when the module is set to "CLIENT"
Port: Port number: local port number in Server mode, remote port number in client mode,
decimal number, less than 65535
Example: AT+SOCK=TCPC,, 8234
Function: Set/Query the HTTP request mode in HTTPD Client mode.
Format: Query:
<CR><LF>+OK=< status ><CR><LF>
AT+HTPTP =< status ><CR>
GET: The request method for http is get
POST: Represents http request method as post
Function: Set/query the URL in POST mode.
Format: Query:
<CR><LF>+OK=< URL ><CR><LF>
URL: gen
erally starts with "/" and is longer than 99 bytes.
Example: AT+HTPURL=/2.php
TCP232 T2 Software Design Manual
Jinan Personal Network Technology Co., Ltd. Page 48 of 55
Function: Set/Query Httpd Client User
defined header information
Format: Query:
<CR><LF>+OK=< data ><CR><LF>
AT+ HTPHEAD =< data ><CR>
Data: User
defined header information, the maximum length of data is 199 bytes, and the
carriage retur n " r n" in the header is used.
<<CRLF>>Translated character substitution.
Example: AT+HTPHEAD=Accept:text<<CRLF>>
Function: Set/Query whether to filter the header of the information returned by Http
Format: Query:
<CR><LF>+OK=< sta ><CR><LF>
AT+ HTPCHD =< sta ><CR>
Parameters: Sta:
ON: On
OFF: off