You are on page 1of 20

AT Commands & Logging

Chin Gang Wu, Application Engineer locate, communicate, accelerate


29 September, 2016 Rev. A
Confidential
Always Check the AT Command Characteristic

- Which are the modules that can use this command?


- Can the settings be saved? If yes, can it be saved as Profile or NVM?
.
- Is it possible to abort the command?
- What is the recommended response time?
- Any Error references?

Slide 2
Understand the AT Command Naming Conventions
In AT command manual the following naming conventions are used:
• MT (Mobile Terminal) or DCE (Data Communications Equipment):
u-blox cellular module

• TE (Terminal Equipment) or DTE (Data Terminal Equipment):


terminal that issues the command to the module

• TA (Terminal Adaptor): the function, integrated in the MT, of


supporting AT command interface according to the applicable
standards

• ME (Mobile Equipment):. equivalent to MT, it is used to refer to the


device itself regardless of the inserted SIM card

Slide 3
Understand the Available Operation Modes
The DCE/MT interface can operate in these modes:
• Command mode:
The DCE interprets all the characters received as commands to execute. The DCE may send
responses back to the DTE indicating the outcome of the command or further information
without having received any commands by the DTE (e.g. unsolicited response code - URC).
• Data mode:
The DCE transfers data after having sent the "CONNECT" string; all the characters sent to
the DCE are intended to be transmitted to the remote party. Any further characters received
over the serial link are deemed to be from the remote party, and any characters sent are
transmitted to the remote party. The DCE enters data mode immediately after it makes a
Circuit Switched Data (CSD) or Packet Switched Data
(PSD) connection.
• Online command mode:
The DCE has a data connection established
. with a remote party, but treats signals
from the DTE as command lines and sends back responses and unsolicited indications to the
DTE.

Slide 4
Read the Manual Properly and Thoroughly

There are 4 sections for each AT command:


#1. Description
#2. Syntax
#3. Defined values
#4. Notes

Please READ it THOROUGHLY

Slide 5
Exercise #1: Default <cid> Profile for Internal PDP Context Activation

Internal PDP Context Activation (Using Internal TCP/IP Stack)

LISA-U200

Application Internal AT+UPSD=0,1,”<APN>”


Processor TCP/IP AT+UPSDA=0,3
Stack

External PDP Context Activation (Using External TCP/IP Stack)

Application LISA-U200
Processor AT+CGDCONT=1,”IP’,”<APN>”
External
AT+CGACT=1,1
TCP/IP
Stack

For TOBY-L210-02S, what is the default <cid> when the PSD profile is configured
through the +UPSD AT command?

Slide 6
Waiting Time After Final Result Code

The DTE should wait some time (the recommended value is at least 20 ms) after
the reception of an AT command final result code or URC, before issuing a new
AT command to give the DCE the opportunity to transmit the buffered URCs.
Otherwise the collision of the URCs with the subsequent AT command is still
possible.
Example:
The following example shows that between the final response command and the
next AT command, the 20ms interval recommendation is not respected:
| 07h:35m:57s:947ms Jan-01-2000 | SCC: T:1 C: at&f
| 07h:35m:57s:949ms Jan-01-2000 | SCC: T:1 L:6 R: OK
9ms
| 07h:35m:57s:958ms Jan-01-2000 | SCC: T:1 C: at+cnmi=1,2
| 07h:35m:57s:959ms Jan-01-2000 | SCC: T:1 L:6 R: OK
5ms
| 07h:35m:57s:964ms Jan-01-2000
. | SCC: T:1 C: ate0

Slide 7
Estimated Response Time is a Guideline, not a Standard

Slide 8
Report mobile termination error +CMEE and Extended error
report +CEER
[10:42:02.773] tx: AT+CMEE?
[10:42:02.786] rx: Always enable result code (AT+CMEE=2) if
[10:42:02.786] rx: +CMEE: 0
you need more information on the error
[10:42:02.786] rx:
[10:42:02.786] rx: OK encountered.
[10:42:08.203] tx: ATD90880455;
[10:42:08.239] rx:
[10:42:08.240] rx: ERROR
[10:42:11.128] tx: AT+CMEE=2
[10:42:11.150] rx:
[10:42:11.150] rx: OK
[10:42:15.976] tx: ATD90880455;
[10:42:15.994] rx:
[10:42:15.994] rx: +CME ERROR: Network can only be used for emergency calls
[10:42:21.165] tx: AT+UPSDA=0,3
[10:42:21.265] rx:
[10:42:21.265] rx: +CME ERROR: SIM failure
[10:42:35.943] tx: AT+CEER
[10:42:35.968] rx:
[10:42:35.968] rx: +CEER: "SM activation error", 148, "Unspecified GPRS error"
[10:42:35.968] rx:
[10:42:35.968] rx: OK Extended error report can help you to resolve
[10:42:47.264] tx: AT+CMEE=0
.
error
[10:42:47.284] rx:
[10:42:47.284] rx: OK
[10:42:52.999] tx: AT+UPSDA=0,3
[10:42:53.069] rx:
[10:42:53.069] rx: ERROR

Slide 9
Provide timing information when AT log is captured
[11:43:00.981] tx: AT+COPS?
[11:43:01.030] rx:
[11:43:01.030] rx: +COPS: 0,0,"Singtel",7
[11:43:01.030] rx:
[11:43:01.030] rx: OK
From the timing information, we know that the
[11:43:05.023] tx: AT+COPS=2 time needed for network registration is
[11:43:06.248] rx: approximately 7 seconds
[11:43:06.248] rx: OK
[11:43:11.321] tx: AT+COPS=0
[11:43:16.991] rx:
[11:43:16.991] rx: OK
[11:43:25.657] tx: AT+COPS?
[11:43:25.701] rx:
[11:43:25.702] rx: +COPS: 0,0,"Singtel",7
[11:43:25.702] rx: .
[11:43:25.702] rx: OK

Slide 10
Trace Logging

#1. Select Trace Port

Slide 11
Trace Logging

#2. Select AT Port

Slide 12
Trace Logging

#3. Enable Tracing:

AT+TRACE=1,921600
AT+CFUN=16 -> save to profile

Slide 13
Trace Logging
#4. Start Trace

Save trace to a file in .bin format

Slide 14
Trace Logging

#5. Trace Log Valid

- File size increases


- Speed changes

Slide 15
Trace Logging

#6. Stop trace when issue


is reproduced and
captured

Slide 16
Exercise #2 – Trace Logging
Repeat the trace logging procedure on EVK-L21 (TOBY-L210)

To enable trace for TOBY-L210, please take note of the following:

Slide 17
Exercise #2 – Trace Logging - Hints

Trace Socket:

Remember to enable the following trace:


AT+TRACE=1,115200,,,,,"NETWORK"

Slide 18
Exercise #2 - Trace Logging - Hints

Trace Port:

The correct trace port needs to be set (i.e. u-


blox AG Mobile Diagnostics Virtual Port
Device)

Remember to enable the following trace:


AT+TRACE=1,115200,,,,,“CDC-ACM"

Slide 19
Thank you!

locate, communicate, accelerate

02/27/2021

You might also like