AT command to read IMEI not working on EG25-G (or EC25-E)

Hi,

I am trying to read the IMEI off our module but it is not working. I have tried both GSN and CGSN AT commands but neither return anything.

Without the CGSN command everything works correctly with the expected responses but the CGSN command returns nothing (neither OR or ERROR) communication stops.

Below are example logs with the EC25. The response from the EG25 is the same.

Here is a GOOD log:

local2.info chat[8121]: abort on (BUSY)
local2.info chat[8121]: abort on (NO CARRIER)
local2.info chat[8121]: abort on (NO DIALTONE)
local2.info chat[8121]: abort on (ERROR)
local2.info chat[8121]: abort on (NO ANSWER)
local2.info chat[8121]: timeout set to 30 seconds
local2.info chat[8121]: send (AT^M)
local2.info chat[8121]: expect (OK)
local2.info chat[8121]: ^M
local2.info chat[8121]: OK
local2.info chat[8121]:  -- got it
local2.info chat[8121]: send (ATE0^M)
local2.info chat[8121]: expect (OK)
local2.info chat[8121]: ^M
local2.info chat[8121]: ^M
local2.info chat[8121]: OK
local2.info chat[8121]:  -- got it
local2.info chat[8121]: send (ATI;+CSUB;+CSQ;+COPS?;+CGREG?;&D2^M)
local2.info chat[8121]: expect (OK)
local2.info chat[8121]: ^M
local2.info chat[8121]: ^M
local2.info chat[8121]: Quectel^M
local2.info chat[8121]: EC25^M
local2.info chat[8121]: Revision: EC25EFAR06A04M4G^M
local2.info chat[8121]: ^M
local2.info chat[8121]: SubEdition: V05^M
local2.info chat[8121]: ^M
local2.info chat[8121]: +CSQ: 13,99^M
local2.info chat[8121]: ^M
local2.info chat[8121]: +COPS: 1^M
local2.info chat[8121]: ^M
local2.info chat[8121]: +CGREG: 0,0^M
local2.info chat[8121]: ^M
local2.info chat[8121]: OK
local2.info chat[8121]:  -- got it
local2.info chat[8121]: send (AT+CGDCONT=1,"IP","epc.tmobile.com",,0,0^M)
local2.info chat[8121]: expect (OK)
local2.info chat[8121]: ^M
local2.info chat[8121]: ^M
local2.info chat[8121]: OK
local2.info chat[8121]:  -- got it
local2.info chat[8121]: send (ATD*99#^M)
local2.info chat[8121]: expect (CONNECT)
local2.info chat[8121]: ^M
local2.info chat[8121]: ^M
local2.info chat[8121]: CONNECT
local2.info chat[8121]:  -- got it
daemon.debug pppd[5364]: Script chat -s -v -f /etc/chatscripts/sixfab-connect -T epc.tmobile.com finished (pid 8121), status = 0x0
daemon.info pppd[5364]: Serial connection established.
daemon.debug pppd[5364]: using channel 40
daemon.info pppd[5364]: Using interface ppp0
daemon.notice pppd[5364]: Connect: ppp0 <--> /dev/ttyUSB3
daemon.debug pppd[5364]: sent [LCP ConfReq id=0x24 <asyncmap 0x0> <magic 0xa27f3127> <pcomp> <accomp>]
daemon.debug pppd[5364]: rcvd [LCP ConfReq id=0x4e <asyncmap 0x0> <auth chap MD5> <magic 0xd12df876> <pcomp> <accomp>]
daemon.debug pppd[5364]: sent [LCP ConfAck id=0x4e <asyncmap 0x0> <auth chap MD5> <magic 0xd12df876> <pcomp> <accomp>]
daemon.debug pppd[5364]: rcvd [LCP ConfAck id=0x24 <asyncmap 0x0> <magic 0xa27f3127> <pcomp> <accomp>]
daemon.debug pppd[5364]: rcvd [LCP DiscReq id=0x4f magic=0xd12df876]
daemon.debug pppd[5364]: rcvd [CHAP Challenge id=0x1 <043dfabb74a5489d01037e77906861a9>, name = "UMTS_CHAP_SRVR"]
daemon.warn pppd[5364]: No CHAP secret found for authenticating us to 3gppp
daemon.debug pppd[5364]: sent [CHAP Response id=0x1 <4513c728d57e15694f95f138f815a919>, name = ""]
daemon.debug pppd[5364]: rcvd [CHAP Success id=0x1 ""]
daemon.info pppd[5364]: CHAP authentication succeeded
daemon.notice pppd[5364]: CHAP authentication succeeded
daemon.debug pppd[5364]: sent [IPCP ConfReq id=0x24 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
daemon.debug pppd[5364]: sent [IPV6CP ConfReq id=0x24 <addr fe80::d075:7dd4:3ddc:8ac9>]

and here is a BAD log:

local2.info chat[11553]: abort on (BUSY)
local2.info chat[11553]: abort on (NO CARRIER)
local2.info chat[11553]: abort on (NO DIALTONE)
local2.info chat[11553]: abort on (ERROR)
local2.info chat[11553]: abort on (NO ANSWER)
local2.info chat[11553]: timeout set to 30 seconds
local2.info chat[11553]: send (AT^M)
local2.info chat[11553]: expect (OK)
local2.info chat[11553]: ^M
local2.info chat[11553]: OK
local2.info chat[11553]:  -- got it
local2.info chat[11553]: send (ATE0^M)
local2.info chat[11553]: expect (OK)
local2.info chat[11553]: ^M
local2.info chat[11553]: ^M
local2.info chat[11553]: OK
local2.info chat[11553]:  -- got it
local2.info chat[11553]: send (ATI;+CSUB;+CSQ;+COPS?;+CGREG?;&D2^M)
local2.info chat[11553]: expect (OK)
local2.info chat[11553]: ^M
local2.info chat[11553]: ^M
local2.info chat[11553]: Quectel^M
local2.info chat[11553]: EC25^M
local2.info chat[11553]: Revision: EC25EFAR06A04M4G^M
local2.info chat[11553]: ^M
local2.info chat[11553]: SubEdition: V05^M
local2.info chat[11553]: ^M
local2.info chat[11553]: +CSQ: 13,99^M
local2.info chat[11553]: ^M
local2.info chat[11553]: +COPS: 1^M
local2.info chat[11553]: ^M
local2.info chat[11553]: +CGREG: 0,0^M
local2.info chat[11553]: ^M
local2.info chat[11553]: OK
local2.info chat[11553]:  -- got it
local2.info chat[11553]: send (+CGSN=1^M)
local2.info chat[11553]: expect (OK)
local2.info chat[11553]: ^M

That should be: AT+CGSN=1^M

The “AT” gets dropped only when chaining AT commands together with a semi-colon after the initial “AT”.

3GPP 27.007 section 4.1 refers.

Hi,

Thank you for your reply. If I chain it I get an error:

local2.info chat[881361]: abort on (BUSY)
local2.info chat[881361]: abort on (NO CARRIER)
local2.info chat[881361]: abort on (NO DIALTONE)
local2.info chat[881361]: abort on (ERROR)
local2.info chat[881361]: abort on (NO ANSWER)
local2.info chat[881361]: timeout set to 30 seconds
local2.info chat[881361]: send (AT^M)
local2.info chat[881361]: expect (OK)
local2.info chat[881361]: ^M
local2.info chat[881361]: OK
local2.info chat[881361]:  -- got it
local2.info chat[881361]: send (ATE0^M)
local2.info chat[881361]: expect (OK)
local2.info chat[881361]: ^M
local2.info chat[881361]: ^M
local2.info chat[881361]: OK
local2.info chat[881361]:  -- got it
local2.info chat[881361]: send (ATI;+CGSN=1;+CSUB;+CSQ;+COPS?;+CGREG?;&D2^M)
local2.info chat[881361]: expect (OK)
local2.info chat[881361]: ^M
local2.info chat[881361]: ^M
local2.info chat[881361]: Quectel^M
local2.info chat[881361]: EC25^M
local2.info chat[881361]: Revision: EC25EFAR06A04M4G^M
local2.info chat[881361]: ^M
local2.info chat[881361]: ERROR
local2.info chat[881361]:  -- failed
local2.info chat[881361]: Failed (ERROR)
daemon.debug pppd[880888]: Script chat -s -v -f /etc/chatscripts/sixfab-connect -T wap.vodaphone.co.uk finished (pid 881361), status = 0x7

If it is standalone with the AT I get the error too:

local2.info chat[884308]: abort on (BUSY)
local2.info chat[884308]: abort on (NO CARRIER)
local2.info chat[884308]: abort on (NO DIALTONE)
local2.info chat[884308]: abort on (ERROR)
local2.info chat[884308]: abort on (NO ANSWER)
local2.info chat[884308]: timeout set to 30 seconds
local2.info chat[884308]: send (AT^M)
local2.info chat[884308]: expect (OK)
local2.info chat[884308]: ^M
local2.info chat[884308]: OK
local2.info chat[884308]:  -- got it
local2.info chat[884308]: send (ATE0^M)
local2.info chat[884308]: expect (OK)
local2.info chat[884308]: ^M
local2.info chat[884308]: ^M
local2.info chat[884308]: OK
local2.info chat[884308]:  -- got it
local2.info chat[884308]: send (ATI;+CSUB;+CSQ;+COPS?;+CGREG?;&D2^M)
local2.info chat[884308]: expect (OK)
local2.info chat[884308]: ^M
local2.info chat[884308]: ^M
local2.info chat[884308]: Quectel^M
local2.info chat[884308]: EC25^M
local2.info chat[884308]: Revision: EC25EFAR06A04M4G^M
local2.info chat[884308]: ^M
local2.info chat[884308]: SubEdition: V05^M
local2.info chat[884308]: ^M
local2.info chat[884308]: +CSQ: 10,99^M
local2.info chat[884308]: ^M
local2.info chat[884308]: +COPS: 1^M
local2.info chat[884308]: ^M
local2.info chat[884308]: +CGREG: 0,0^M
local2.info chat[884308]: ^M
local2.info chat[884308]: OK
local2.info chat[884308]:  -- got it
local2.info chat[884308]: send (AT+CGSN=1^M)
local2.info chat[884308]: expect (OK)
local2.info chat[884308]: ^M
local2.info chat[884308]: ^M
local2.info chat[884308]: ERROR
local2.info chat[884308]:  -- failed
local2.info chat[884308]: Failed (ERROR)
daemon.debug pppd[884057]: Script chat -s -v -f /etc/chatscripts/sixfab-connect -T wap.vodaphone.co.uk finished (pid 884308), status = 0x7

Gabriel

Try these to read the IMEI:

AT+GCSN
AT+CSN

It they don’t work, please try querying the supported syntax with:

AT+CGSN=?
AT+CSN=?

Hi,

I’ve think I’ve tried pretty much ever combination conceivable with the help of this manual Quectel_EC2xEG9xEG2x-GEM05_Series_AT_Commands_Manual_V2.0.pdf (sixfab.com)

Would you be able to confirm it is working for you on one of the modules?

Thanks,

Gabriel

I have tried this on a third unit and it is working so am trying figure out why.

The unit that is working is rev EG25GGBR07A08M2G
One unit that is not working is: EC25EFAR06A04M4G

I wonder if my issue is related to this: EC25-E can’t get IMEI - Technical Subjects / Open Solution - Quectel Forums