Page cover image

😻AT Commands

Extract all information about SIM cards using AT Commands

busybox microcom /dev/ttyUSB0
Functionality
Storage location in SIM and USIM cards
AT command

Extraction of IMSI

Stored in 6F07 (decimal 28423) for SIM and USIM

(SIM/USIM)

AT+CRSM=176,28423,0,0,3

Extraction of Ciphering

Indicator

Stored in 6FAD (decimal 28589) for SIM and USIM

(SIM/USIM)

AT+CRSM=176,28589,0,0,3

Extraction of Ciphering

Key Kc

Stored in 6F20 (decimal 28448 for SIM and 4F20 (decimal 20256) for USIM

(SIM)

AT+CRSM=176,28448,0,0,9

(USIM)

AT+CRSM=176,20256,0,0,9

Extraction of Ciphering

Key KcGPRS

Stored in 6F52 (decimal 28498 for SIM and 4F52 (decimal 20306) for USIM

(SIM)

AT+CRSM=176,28498,0,0,9

(USIM)

AT+CRSM=176,20306,0,0,9

Extraction of Ciphering

Key CK and Integrity Key

IK

Stored in 6F08 (decimal 28424), applied to USIM only

(USIM)

AT+CRSM=176,28424,0,0,33

Extraction of TMSI,

TMSI TIME and LAI

Stored in 6F7E (decimal 28542 for SIM and USIM

(SIM/USIM)

AT+CRSM=176,28542,0,0,11

Extraction of PTMSI,

PTMSI Signature Value,

RAI and RAUS

Stored in 6F53 (decimal 28499 for SIM and 6F73

(decimal 28531) for USIM

(SIM)

AT+CRSM=176,28499,0,0,14

(USIM)

AT+CRSM=176,28531,0,0,14

Extraction of

THRESHOLD

Stored in 6F5C (decimal 28508), applied to USIM only

(USIM)

AT+CRSM=176,28508,0,0,3

xtraction of Provider

-

AT+COPS?

Extraction of

Lac and

Cell ID

-

AT+CREG?

AT Commands for SIM Cards

AT commands are a standardized set of text strings used to communicate with modems, including those embedded in SIM cards. Here's a list of common AT commands used for SIM card operations:

General Commands

  • AT: Checks the modem's readiness.

  • ATE0: Turns off echo.

  • ATZ: Resets the modem.

  • AT+CGMI: Gets the manufacturer ID of the SIM card.

  • AT+CGMM: Gets the model name of the SIM card.

  • AT+CGMR: Gets the revision number of the SIM card.

SIM Card Status and Information

  • AT+CREG?: Queries the registration status of the SIM card on the network.

  • AT+CSCS?: Gets the character set used for SMS messages.

  • AT+CPIN?: Checks the SIM card PIN status.

  • AT+CPIN=1234: Unlocks the SIM card with the PIN "1234".

  • AT+CPMS?: Gets the memory locations for storing SMS messages.

SMS Commands

  • AT+CMGF=1: Sets SMS mode to text mode.

  • AT+CMGS="+1234567890" Sends an SMS to the number "+1234567890".

  • AT+CMGL=1,4 Reads SMS messages 1 to 4.

  • AT+CMGD=1 Deletes SMS message 1.

Phone Book Commands

  • AT+CPBF? Checks the phone book storage.

  • AT+CPBS=1,1 Sets the phone book storage to SIM card.

  • AT+CPBA=1,1234567890,John Doe Adds a contact to the phone book.

  • AT+CPBR=1,1 Reads a contact from the phone book.

Call Control Commands

  • ATD+1234567890; Dials a phone number.

  • ATH: Hangs up a call.

  • ATA: Answers an incoming call.

  • AT+CLCK=1 Locks the keypad.

Network Settings

  • AT+CREG=2 Sets the registration status to manual.

  • AT+CGATT=1 Attaches to the GPRS network.

  • AT+CGACT=1,1 Activates the GPRS context.

The specific AT commands and their parameters may vary depending on the SIM card manufacturer and network provider. It's essential to consult the documentation provided by your SIM card or modem manufacturer for accurate information.

Last updated

Was this helpful?