Question

I have a Vodaphone data card with SIM embedded in that.

There is IMEI number printed on datacard. I wanted to know is there any way to read the IMEI number of that data card programmatically.

I am using datacard for browsing.

And also I wanted to know where can I get information on programming for data card so that I can get more information on data card.

Was it helpful?

Solution

The data card most likely acts as a modem, and most GSM modems support the ETSI GSM 07.07 standard.

You should get the IMEI by issuing AT+CGSN:

5.4 Request product serial number identification +CGSN

Table 5: +CGSN action command syntax

Command          Possible response(s)
+CGSN            <sn>
                 +CME ERROR: <err>
+CGSN=?

Description

Execution command causes the TA to return one or more lines of information text , determined by the ME manufacturer, which is intended to permit the user of the TA to identify the individual ME to which it is connected to.

Typically, the text will consist of a single line containing the IMEI (International Mobile station Equipment Identity) number of the ME, but manufacturers may choose to provide more information if desired. Refer subclause 9.2 for possible <err> values.

Defined values

<sn>: the total number of characters, including line terminators, in the information text shall not exceed 2048 characters. Text shall not contain the sequence 0<CR> or OK<CR>

Implementation

Optional.

OTHER TIPS

You'd need to connect to the virtual serial port that you get (assuming you're using a PCMCIA card like the Vodafone one I have). Then it's a simple AT command (AT+GSN off the top of my head) to return the IMEI

Not mentioned here, but what I found handy is setting the responses a bit more verbose with:

AT+CMEE=2

Where an AT+IMEI gave me the IMEI number of my GSM modem, the query AT+CIMI for the IMSI number gave:

+CME ERROR: SIM PIN required

Which was a bit more readable than the ERROR, which I got before.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top