User Manual

Table Of Contents
SARA-R4 series-AT commands manual
UBX-17003787 - R16
22HTTP
Page 267 of 401
Parameter Type Description
<data> String It represents the data to be sent to the HTTP server with the POST request. The
maximum length is 128 bytes. The data must be formatted according to the Content-
Type specified in <HTTP_content_type> parameter.
<param1> String Content depends on the related <http_command> (see above).
<param2> Number Content depends on the related <http_command> (see above).
<param3> String Content depends on the related <http_command> (see above).
<http_result> Number
0: fail
1: success
<http_status_code> Number HTTP status code reported in the server response header after a GET FOTA update
file request. This parameter is issued only for AT+UHTTPC=<profile_id>,100,<path>
AT command.
<md5_sum> String MD5 checksum of the FOTA update file. This parameter is issued only for AT
+UHTTPC=<profile_id>,100,<path> AT command.
22.3.4Notes
The +UHTTPC command has a default timeout setting set to 180 s. The timeout is counted from the last
successful network read or send operation performed by the HTTP application, so in a real timeout case
the application might be executing a command more than 180 s.
The data string must not exceed the maximum length of 128 bytes.
If <http_command>=4 (POST a file) and the <HTTP_content_type>=3 (multipart/form-data), then the
module automatically encapsulates the file content in the following multipart/form-data HTTP request:
--U1Blox2Http3Unique4Boundary5\r\n
Content-Disposition: form-data; name="file_post"; filename="<user_defined_content_type>"\r\n
Content-Length: <length of file specified with <user_defined_content_type>>\r\n
Content-Type: application/octet-stream\r\n
\r\n
<content of file specified with <user_defined_content_type>>\r\n
--U1Blox2Http3Unique4Boundary5--\r\n
\r\n
The response headers string (headers received in the HTTP response) must not exceed the maximum
length of 256 bytes.
SARA-R4 / SARA-N4
<http_command> = 100 is not supported.
22.4HTTP protocol error +UHTTPER
+UHTTPER
Modules All products
Syntax PIN required Settings saved Can be aborted Response time Error referenceAttributes
full No No No - +CME Error
Appendix A.6
22.4.1Description
Retrieves the error class and code of the latest HTTP operation on the specified HTTP profile.
22.4.2Syntax
Type Syntax Response Example
Set AT+UHTTPER=<profile_id> +UHTTPER: <profile_id>,<error_
class>,<error_code>
OK
AT+UHTTPER=1
+UHTTPER: 1,0,0
OK