EVK-R4 - User guide
UBX-16029216 - R07
Appendix
Page 24 of 31
C1-Public
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
For detailed examples of AT commands used for common operations, see the u-blox SARA-R41 series
application development guide
and the u-blox SARA-R42 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)
DCE response (module)
Description
AT+CMEE=2
OK
Enables the cellular module to report verbose error result
codes.
AT+CGATT?
+CGATT: 1
OK
Verifies the SARA-R4 module is attached to the network.
AT+CEREG?
+CEREG: 0,1
OK
Verify the network registration status.
AT+COPS=0
OK
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).
AT+COPS?
+COPS: 0,0,"Verizon
Wireless",7
OK
Read the operator name and radio access technology
(RAT).
AT+USOCR=6
+USOCR: 0
OK
Create a TCP socket.
AT+USOCO=0,"195.34.89.241",
7
OK
Connect to the server.
+UUSORD: 0,32
Greeting message.
AT+USORD=0,32
+USORD: 0,32,"u-blox AG
TCP/UDP test service"
OK
Retrieving the message.
AT+USOCL=0
OK
Closing the socket.