12 AT commands

07.603GPPGeneral Packet Radio Service (GPRS)Mobile Station (MS) supporting GPRSTS

GSM 07.07 defines commands that a TE may use to control a GPRS MT via a non-multiplexed character-stream interface. This places certain limitations on the functionality of the interface. For example, it is not possible for the MT to send control information to the TE or for the TE to send commands to the MT whilst the interface is in the V.250 online data state unless the layer 2 protocol itself supports this feature. However, a manufacturer-specific escape mechanism may be provided to enable the TE to switch the MT into the V.250 online command state. The use of a multiplexed interface, for example that specified in GSM 07.10, is not considered here.

It is anticipated that GPRS MTs will vary widely in functionality. At one extreme, a class A MT might support multiple PDP types as well as circuit switched data, and use multiple external networks and QoS profiles. At the other extreme a class C MT might support only a single PDP type using a single external network, and rely on the HLR to contain the context definition.

A comprehensive set of GPRS-specific AT commands is defined in GSM 07.07 to provide the flexibility needed by the more complex MT. The commands are designed to be expandable to accommodate new PDP types and interface protocols, merely by defining new values for many of the parameters. Multiple contexts may be activated if the interface link-layer protocol is able to support them. The commands use the extended information and error message capabilities described in GSM 07.07.

For MTs of intermediate complexity, most commands have simplified forms where certain parameters may be omitted.

For the simplest MTs, and for backwards compatibility with existing communications software, it is possible to control access to the GPRS using existing modem-compatible commands. A special dial-string syntax is defined for use with the D command. This "modem compatible" mode of operation is described in GSM 07.07.

Subclause 10.2 contains examples of command sequences for a number of applications.

Annex A of this document lists the AT commands for GPRS. They are fully defined in GSM 07.07,

12.1 General on AT commands

The following sections describe how the AT commands are used for GPRS. The AT commands themselves are fully described in GSM 07.07. Reference to the particular AT command names are shown only for clarity. In all case refer to GSM 07.07 for the latest descriptions.

12.1.1 Interaction of AT commands, GPRS management and PDPs

State machines may be used to describe the behaviour of –

AT commands (ITU-T V.250).

GPRS PDP context management (GSM 03.60).

PDP startup, data transfer and termination (Packet Data Protocol specifications).

The layer 2 protocol (if any) used across the TE-MT interface (layer 2 protocol specifications).

This subclause does not attempt to describe in detail how these state machines interact but rather to give some general guidance on their relationships.

12.1.1.1 AT commands and responses

AT commands may be issued and responses received by the TE only when the TE and MT are in V.250 command state.

The possibility of suspending the PDP and/or layer 2 protocol and entering V.250 online command state is not considered here; neither is the use of a multiplexed interface where the PDP and the AT commands use separate logical channels.

12.1.1.2 PDP and layer 2 protocol operation

The PDP (across the TE-MT interface) may startup, transfer data and terminate only when the TE and MT are in V.250 online data state. It may be necessary to startup a layer 2 protocol across the interface before starting the PDP. The PDP startup procedure may provide information needed for the PDP context activation procedure (see 10.1.1.3.2).

12.1.1.3 GPRS management

A particular PDP may be used to transfer data only when a context is active for that PDP. Before a context can be activated, the MT must be attached to the GPRS network.

In order to provide flexibility and support a variety of types of GPRS MT and PDP, AT commands are provided which give the TE explicit control over attachment and detachment (+CGATT), and context activation and deactivation (+CGACT) procedures. These commands allow the TE to retain control of the MT, and receive status information from the MT, after these actions have been performed.

12.1.1.3.1 GPRS attachment

The MT may be attached and detached using the +CGATT command. However, it may not be necessary to use the command since attachment may occur –

on power up or reset;

when an attempt is made to activate a context either explicitly (+CGACT) or as a result of a PDP startup procedure;

when the mobile class is changed (+CGCLASS).

Similarly, detachment may occur –

as a result of a PDP termination procedure (if no other GPRS services are active);

when the mobile class is changed (+CGCLASS).

12.1.1.3.2 PDP context activation

Certain information must be provided to the network in order for a context activation attempt to be successful. The TE may provide some of this information to the MT during the PDP startup procedure rather than through AT command procedures. In this case the context activation cannot be initiated by the +CGACT command but rather on receipt of the appropriate information during the PDP startup.

12.1.2 Use of default context parameter values

The activate context request message sent by the MT to the network contains a number of parameters whose values can usefully be set by the TE. Under certain circumstances the values for some or all of the parameters need not be provided by the TE, either via AT commands or the PDP startup procedure. The storage of context information in the SIM is not considered in this specification. Rules concerning what values shall be sent by the MT to the network under various circumstances are given in 03.60.

One particular rule that is designed to simplify operation in modem compatibility mode is that if there is only one PDP context subscription in the HLR then all of PDP type, PDP address and APN may be omitted.

12.1.2.1 PDP type

This may be omitted:

when the MT supports only one PDP type (it will be provided by the MT);

or according to the rules given in 03.60.

12.1.2.2 PDP address (of the MS)

This shall be omitted when:

a dynamic address is required;

or according to the rules given in 03.60.

12.1.2.3 Access Point Name

This may be omitted:

according to the rules given in 03.60.

12.1.2.4 QoS Requested

This may be omitted when:

the default subscribed QoS is acceptable.

12.1.2.5 PDP Configuration Options

These shall be omitted:

when none are required for the PDP concerned;

or according to the rules given for the PDP.

12.2 Example command sequences for dial-compatibility mode

12.2.1 PPP in dial compatibility mode

12.2.1.1 Mobile initiated IP context activation

In this mode of operation, the MT behaves like an originating modem and accepts the normal V.250 commands associated with placing and clearing a call to a dial-up PPP server. Although the procedures for setting up the IP context are initiated from the mobile end, IP-based sessions, for example the File Transfer Protocol (FTP), may be initiated from either end once the context is active.

For this example it is assumed that

– the user has subscribed to only one PDP context (of type IP) and therefore no context parameter values are needed,

– the MT supports only PPP at the MT-TE interface and therefore no layer 2 protocol need be specified.

A possible sequence of events is –

The MT begins in V.250 command state.

TE -> MT: AT<GPRS-specific configuration commands, if required>

MT -> TE: OK

The TE sends a dial command requesting the GPRS.

TE -> MT: ATD*99#

MT -> TE CONNECT

The MT enters V.250 online data state.

TE starts up PPP (LCP exchange) –

TE -> MT: LCP Configure-request

MT -> TE: LCP Configure-ack

PPP Authentication may take place (optional)

TE starts up IP (NCP for IP exchange) –

TE -> MT: NCP(IP) Configure-request

MT <-> network: MT performs the GPRS-attach procedure if the MT is not currently attached.

MT <-> network: MT performs the IP context activation procedure.

MT -> TE: NCP(IP) Configure-ack

TE <-> MT< – > network: IP packets may now be transferred

TE stops IP (optional) –

TE-> MT: NCP(IP) Terminate-Request ) this

MT<-> network: MT performs the IP context deactivation procedure ) is

MT -> TE: NCP(IP) Terminate-Ack ) optional

TE stops PPP –

TE-> MT: LCP Terminate-Request

MT <-> network: MT performs the IP context deactivation procedure if it has not already done so.

MT <-> network: MT may perform the GPRS-detach procedure if no other GPRS services are active.

MT -> TE: LCP Terminate-Ack

The MT returns to V.250 command state and issues the final result code –

MT -> TE NO CARRIER

The TE may recognise this as a return to V.250 command state. However, if it is using procedures intended for controlling modems, it may attempt to force a disconnect since in the modem case it cannot rely on the remote modem dropping the carrier. It will use some combination of –

TE -> MT: TE drops circuit 108/2 (Data Terminal Ready)

TE -> MT: escape sequence (e.g. +++)

TE -> MT: ATH

The MT should respond according to V.250 even if it is already in command state.

If the connection is lost at any time, the MT shuts down PPP, returns to V.250 command state and issues the final result code –

MT -> TE NO CARRIER

12.2.1.2 Network requested IP context activation

In this mode of operation, the MT behaves like an answering modem and accepts the normal V.250 commands associated with answering a call to a PPP server. Although the procedures for setting up the IP context are initiated from the network end, IP-based sessions, for example the File Transfer Protocol (FTP), may be initiated from either end once the context is active.

Two example sequences of events are given, for the cases of automatic and manual answering –

Case 1: automatic answering

The MT begins in V.250 command state.

TE -> MT: AT<GPRS-specific configuration commands, if required >

The TE sets automatic answering mode –

TE -> MT: ATS0=1

MT <- > network: MT performs the GPRS-attach procedure if the MT is not currently attached.

Subsequently –

network -> MT: Request PDP Context Activation message

MT -> TE: RING

The MT returns the intermediate result code –

MT -> TE CONNECT

– and enters V.250 online data state.

The TE and MT perform the PPP and IP startup procedures which include the MT requesting the network to activate the IP context.

Case 2: manual answering

The MT begins in V.250 command state.

TE -> MT: AT<GPRS-specific configuration commands, if required >

The TE sets manual answering mode and requests a GPRS-attach (if necessary) –

TE -> MT: ATS0=0

TE -> MT: AT+CGATT=1

MT <- > network: MT performs the GPRS-attach procedure if the MT is not currently attached.

network -> MT: Request PDP Context Activation message

MT -> TE: RING

The TE answers manually, –

TE -> MT: ATA

MT -> TE CONNECT

– and enters V.250 online data state.

The TE and MT perform the PPP and IP startup procedures which include the MT requesting the network to activate the IP context.

or the TE rejects the connection –

TE -> MT: ATH

– and remains in V.250 command state

12.2.2 MO X.25 virtual call using a triple-X PAD in modem compatibility mode

This example shows how the <called_address> string may be used in the D command to make an X.25 call to a specified X.121 address.

The MT begins in V.250 command state.

TE -> MT: AT<GPRS-specific configuration commands, if required>

MT -> TE: OK

The TE sends a dial command requesting the GPRS to X.121 address 1234567890.

TE -> MT: ATD*99*1234567890#

MT -> TE CONNECT

The MT enters V.250 online data state, performs a GPRS attach if necessary and activates the X.25 context. It then automatically makes an X.25 call to the specified address, bypassing the PAD prompt. If the call is successful the MT responds with the PAD connect message –

1234567890 COM

12.2.3 Selection and activation of an IP PDP context in modem compatibility mode

This example shows how IP PDP contexts may be selected and activated in modem compatibility mode.

The PDP contexts are defined in the modem initialisation AT command string. (In this example, APN = "internet" gives access to the Internet and APN = "abc.com" gives access to a private IP network.)

TE -> MT: AT +CGDCONT=1, "IP", "internet"; +GCDCONT=2, "IP", "abc.com"

MT -> TE: OK

The TE sends a dial (D) command requesting access to the Internet.

TE -> MT: ATD*99***1#

MT -> TE CONNECT

The MT enters V.250 online data state, performs a GPRS attach if necessary and activates an IP context to the Internet.

After the context has been deactivated the MT returns

MT -> TE NO CARRIER

The TE sends a dial (D) command requesting access to the private IP network.

TE -> MT: ATD*99***2#

MT -> TE CONNECT

The MT enters V.250 online data state and activates an IP context to the private IP network.

After the context has been deactivated the MT returns

MT -> TE NO CARRIER

Annex A (informative):
Summary of AT commands for GPRS

This informative annex lists the AT commands for GPRS that are fully described in GSM 07.07.

Table A.1: Summary of AT commands for GPRS

Command

Description

+CGACT

PDP context activate or deactivate

+CGANS

Manual response to a network request for PDP context activation

+CGATT

GPRS attach or detach

+CGAUTO

Automatic response to a network request for PDP context activation

+CGCLASS

GPRS mobile station class

+CGCLOSP

<Void>

+CGCLPAD

Configure local triple-X PAD parameters

+CGDATA

Enter data state

+CGDCONT

Define PDP context

+CGEREP

Control unsolicited GPRS event reporting

+CGPADDR

Show PDP address

+CGREG

GPRS network registration status

+CGQMIN

Quality of service profile (minimum acceptable)

+CGQREQ

Quality of service profile (requested)

+CGSMS

Select service for MO SMS messages

Table A.2: Summary of GPRS Extensions to existing GSM AT commands

Command

Description

+CEER

Extended error report (refer to 07.07)

+CMEE

Report mobile equipment error (refer to 07.07)

+CR

Service reporting control (refer to 07.07)

+CRC

Cellular result codes (refer to 07.07)

Table A.3: Summary of AT commands for GPRS modem compatibility mode

Command

Description

A

Answer – manual acceptance of a network request for PDP context activation

D

Dial – request GPRS service

H

On-hook – manual rejection of a network request for PDP context activation

S0

Automatic answering control – automatic acceptance of a network request for PDP context activation

Annex B (informative):
Octet Stream Protocol (OSP) PDP type

Void.

Annex C (informative):
Document change history

Change history

Date

TSG #

TSG Doc.

CR

Rev

Subject/Comment

Old

New

s23

NEW

Draft GSM 07.60 v. 2.0.0

2.0.0

5.0.0

s24

A002

IP configuration parameters and PPP clarifications

5.0.0

5.1.0

s25

A004

X.25 Based Services

5.1.0

6.0.0

s26

A005

AT commands for GPRS

6.0.0

6.1.0

s26

A006

Editorial review of 07.60

6.0.0

6.1.0

s26

A007

Authentication for IP over PPP

6.0.0

6.1.0

Correction to CR implementation

6.1.0

6.1.1

s27

A008

Addition of a new AT command, +CGREG, to display current GPRS registration status

6.1.1

6.2.0

s27

A009

Addition of a new AT command, +CGSMS, to select the service for the transport of MO SMS messages

6.1.1

6.2.0

s27

A011

Corrections and clarifications, mainly to the AT commands specifications

6.1.1

6.2.0

s27

A012

Addition of a GPRS extension to the existing 07.07 AT command, Service Reporting Control +CR

6.1.1

6.2.0

s27

Editorial update to section 8.1

6.2.0

6.2.1

s29

A016

Correction to +CGAUTO command

6.2.1

6.3.0

s29

A015

Move AT commands to 07.07

6.2.1

6.3.0

s29

A013

Access to PDN’s and ISP’s with the PDP-type PPP

6.2.1

7.0.0

s29

A014

Internet Hosted Octet Stream Service (IHOSS) and Octet Stream Protocol

6.2.1

7.0.0

S30

A018

AT Commands

7.0.0

7.1.0

03-2001

TSG#11

NP-010044

A021

Removal of IHOSS and OSP

7.1.0

7.2.0