/
​AT Command cookbook

​AT Command cookbook

This chapter describes the different instructions used to control the u-blox SARA-R410M modem.

Modem configuration:

# Turn-off radio functionality, the module will deregister. > AT+CFUN=0 OK # Set MNO profile for Standard Europe > AT+UMNOPROF=100 +UMNOPROF: 100 OK # Reset the module. After a reboot, the MNO 100 profile settings are applied. > AT+CFUN=15 OK # Turn-off radio functionality, the module will deregister. > AT+CFUN=0 OK # Change RAT selection to NB-IoT. > AT+URAT=8 OK # Reset the module. After a reboot, the MNO 100 profile settings are applied. > AT+CFUN=15 OK # Turn-off radio functionality, the module will deregister. > AT+CFUN=0 OK # Set Band > AT+UBANDMASK=1,524420 OK # Reset the module. After a reboot, the MNO 100 profile settings are applied. > AT+CFUN=15 OK # Turn-off radio functionality, the module will deregister. > AT+CFUN=0 OK # Set APN name > AT+CGDCONT=1,"IP","" OK # Reset the module. After a reboot, the MNO 100 profile settings are applied. > AT+CFUN=15 OK # Set automatic operator selection > AT+COPS=0 OK

Read Available Operator Profiles

This AT-commands reads the operator profiles available on the device.

  • 19: Vodafone (used for Vodafone Germany only)

  • 197: Vodafone-global-roaming (used for roaming scenarios)



> AT+UMNOPROF=,1 OK > AT+UMNOPROF=? +UMNOPROF: 0: SW default 1: SIM ICCID select 2: ATT 7.1 6: China Telecom 7.0 31: DT 7.0 8: Sprint 7.0 100: Standard Europe 7.0 4: Telstra 7.0 21: TELUS 7.0 5: TMO 7.0 19: Vodafone 7.0 3: Verizon 7.0 197: Vodafone-global-roaming 7.2 OK

Vodafone Global Roaming Profile Activation (Before First Time Registration of the Device)

This AT-commands activate the Vodafone global roaming profile. Usually used for the initial attach of the device to a cell.

//activate the Vodafone global roaming profile > AT+UMNOPROF=197 OK //reboot the device > AT+CFUN=15 OK

Vodafone Germany Roaming Profile Activation (Before First Time Registration of the Device)

This AT-commands activate the Vodafone Germany profile. This should be used in Germany only. It results in a much faster initial attach. Usually only used for the initial attach of the device to a cell.

//Set the Vodafone profile > AT+UMNOPROF=19 OK //Module reboot for saving changed profile > AT+CFUN=15 OK

Full functional test of modem (Attach, UDP Socket, TX, RX, Detach)

This AT-commands performs a full E2E data transmission to the cloud. Please make sure that the proxy IP address (213.136.81.171) is whitelisted at the operators APN (Access Point Name).

// Start network registration > AT+CFUN=1 OK > AT+CEREG=2 OK   // Wait till registered to network > AT+CEREG? +CEREG: 2,5,"AB7D","790066",9 OK   // Open UDP socket > AT+USOCR=17 +USOCR: 0 OK   // Transmit "Test" to Exelonix UDP proxy > AT+USOST=0,"213.136.85.114",9876,4,"Test" +USOST: 0,4 OK   // Data indication (seems to be unreliable) +UUSORF=0,3   // Receive response data "400" > AT+USORF=0,3 +USORF: 0,"213.136.85.114",9876,3,"400" OK   // Close socket > AT+USOCL=0 OK   // Disable modem > AT+CFUN=0

Testing TCP connection (using ublox echo server)

// Creation of a TCP socket > AT+USOCR=6 +USOCR: 0 OK // Connects socket to ublox server (receive and return) > AT+USOCO=0,"195.34.89.241",7 OK // Reads a specified amount (in bytes) of data from socket > AT+USORD=0,32 +USORD: 0,32,"u-blox AG TCP/UDP test service " OK // Sending specified data to ublox server > AT+USOWR=0,10,"HelloUblox" +USOWR: 0,10 OK // URC indicates reception of data (in bytes) +UUSORD: 0,10 // Reads from socket specified amount of data > AT+USORD=0,10 +USORD: 0,10,"HelloUblox" OK // Close TCP socket after testing (can take a while) > AT+USOCL=0 OK

The LED can be configured

This AT-commands configures the default LED operation

The status is indicated by LED:

  • RED: Device is powered on

  • GREEN: device is registered in the network

  • GREEN/RED alternating: device is registered in the network and roaming (this will be the usual pattern)



/ GPIO2, red LED: global LED enable > AT+UGPIOC=23,0,1 OK // GPIO1, green LED: Power, Attached > AT+UGPIOC=16,2 OK // Reset the device to make setting effective > AT+CFUN=15 OK

Testing MQTT connection





 

Related content