
SARA-R4/N4 series - AT Commands Manual
UBX-17003787 - R09
21 HTTP
Page 217 of 307
21 HTTP
The section describes the u-blox proprietary AT commands that can be used for sending requests to a remote
HTTP server, receiving the server response and transparently storing it in the file system. The supported
methods are: HEAD, GET, DELETE, PUT, POST file and POST data. A PSD or CSD connection must be activated
before using HTTP AT commands.
When these commands report an HTTP error, the error code can be queried using the
AT command.
SARA-R4
No need to establish a PSD connection explicitly. This device automatically establishes a PSD connection
as part of the network registration and attach procedure.
21.1 HTTP cUHTTP
+UHTTP
SARA-R404M SARA-R410M-01B SARA-R410M-02B SARA-R410M-52B SARA-R412M
Modules
SARA-N4
Syntax
PIN required
Settings saved Can be aborted
Response time Error reference
Attributes
partial
No
No
No
-
21.1.1 Description
Configures, reads or resets (to the factory-programmed values) the HTTP application profile parameters. Up
to 4 different HTTP profiles can be defined. To set all the parameters in an HTTP profile a set command for
each <op_code> needs to be issued.
The configured HTTP profile parameters are not saved in the non volatile memory.
The read command has two possible usages. The functionality of the command differs with the number
of command parameters issued:
• Only the first command parameter (<profile_id>) issued: the module resets all the profile parameters
(to the factory-programmed values) for the profile specified with <profile_id>
• Only the first and second command parameters used (<profile_id>, <op_code>): the module returns
the current value of the profile parameter specified with <op_code> and related to the profile specified
with <profile_id>
21.1.2 Syntax
Type
Syntax
Response
Example
Generic syntax
Set
AT+UHTTP=<profile_id>,<op_
code>,<param_val>[,<param_val1>]
OK
AT+UHTTP=2,0,"125.24.51.133"
OK
Read
AT+UHTTP=<profile_id>,<op_code> +UHTTP: <profile_id>,<op_code>,
<param_val>[,<param_val1>]
OK
AT+UHTTP=2,0
+UHTTP: 2,0,"125.24.51.133"
OK
HTTP server IP address
Set
AT+UHTTP=<profile_id>,0,<HTTP_
server_IP_address>
OK
AT+UHTTP=2,0,"125.24.51.133"
OK
Read
AT+UHTTP=<profile_id>,0
+UHTTP: <profile_id>,0,<HTTP_
server_IP_address>
OK
AT+UHTTP=2,0
+UHTTP: 2,0,"125.24.51.133"
OK
HTTP server name
Set
AT+UHTTP=<profile_id>,1,<HTTP_
server_name>
OK
AT+UHTTP=2,1,"www.u-blox.com"
OK
Read
AT+UHTTP=<profile_id>,1
+UHTTP: <profile_id>,1,<HTTP_
server_name>
OK
AT+UHTTP=2,1
+UHTTP: 2,1,"www.u-blox.com"