Set command

The set command requests product serial number identification.

Syntax:

+CGSN[=<snt>]

The set command parameters and their defined values are the following:

<snt>
0 – Respond with <sn> (default)
1 – Respond with +CGSN: <imei>
2 – Respond with +CGSN: <imeisv>
3 – Respond with +CGSN: <svn>
<sn>
Information text determined by the manufacturer. Up to 2048 characters. Electronic Serial Number (ESN) returned if available. International Mobile (Station) Equipment Identity (IMEI) returned if ESN not available.
<imei>
A string in decimal format indicating the IMEI. Composed of Type Allocation Code (TAC) (8 digits), Serial Number (SNR) (6 digits), and Check Digit (CD) (1 digit).
<imeisv>
A string in decimal format indicating the International Mobile (Station) Equipment Identity, Software Version (IMEISV). The 16 digits of IMEISV are composed of TAC (8 digits), SNR (6 digits), and Software Version Number (SVN) (2 digits).
<svn>
A string in decimal format indicating the current SVN which is part of IMEISV.

Response syntax when <snt>=0 (or omitted):

<sn>
Response syntax for other <snt> values:
+CGSN: <string>

where <string> can be <imei>, <imeisv>, or <svn>.

The example command reads the serial number:

AT+CGSN
490154203237518
OK

The example command reads the IMEI:

AT+CGSN=1
+CGSN: "490154203237518"
OK