C Examples Of At Commands - u-blox EVK-R4 Series User Manual

Cellular evaluation kits
Table of Contents

Advertisement

C Examples of AT commands

For the complete description and syntax of the AT commands supported by SARA-R4 series cellular
modules, see the u-blox SARA-R4 series AT commands manual [1].
For detailed examples of AT commands used for common operations, see the u-blox SARA-R41 series
application development guide
C.1 Data connection using external/internal TCP/IP stack
There is no need to explicitly establish a PSD connection using SARA-R4 series modules. This
device automatically establishes a PSD connection as part of the network registration and the
attach procedure.
C.2 Opening a TCP socket
Command sent by DTE (user)
AT+CMEE=2
AT+CGATT?
AT+CEREG?
AT+COPS=0
AT+COPS?
AT+USOCR=6
AT+USOCO=0,"195.34.89.241",
7
AT+USORD=0,32
AT+USOCL=0
UBX-16029216 - R07
C1-Public
[4]
and the u-blox SARA-R42 series application development guide [5].
DCE response (module)
OK
+CGATT: 1
OK
+CEREG: 0,1
OK
OK
+COPS: 0,0,"Verizon
Wireless",7
OK
+USOCR: 0
OK
OK
+UUSORD: 0,32
+USORD: 0,32,"u-blox AG
TCP/UDP test service"
OK
OK
Appendix
Description
Enables the cellular module to report verbose error result
codes.
Verifies the SARA-R4 module is attached to the network.
Verify the network registration status.
Register the module on the network.
The cellular module automatically registers itself on the
cellular network. This command is necessary only if the
automatic registration failed (AT+CEREG? returns 0,0).
Read the operator name and radio access technology
(RAT).
Create a TCP socket.
Connect to the server.
Greeting message.
Retrieving the message.
Closing the socket.
EVK-R4 - User guide
Page 24 of 31

Advertisement

Table of Contents
loading

Table of Contents