Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AT command to identify connection type

I wrote software to identify and control different modems using AT commands.

Everything works fine, but I'd like to know if the modem is working with GPRS, Edge, 3G or LTE.

How can I get this information?

Is it provided by the modem via unsolicited results or do I have to query the information with a specific standard command (or modem dependent command)?

Update

I wanted to have a general solution, but this is not possible as the [AcT] response to +CREG and +CGREG is not returned by my modem (GTM661W), no matter if I am connected or not.

So I played with proprietary commands for the GTM661W and managed to get information about WCDMA-status (if WCDMA, WCDMA + HSDPA, WCDMA + HSUPA or WCDMA + HSDPA + HSUPA is used) unsing _OWCTI?.

I tried the following commands:

  • _OWCTI? => _OWCTI: 4
  • _OUWCTI? => _OUWCTI: 0,4
  • _OCTI? => _OCTI: 0,0

This means now I am able to recognize 3G and H connection types, but not G and E.

How can I recognize G, E, 3G and H?


Remark

Unfortunately I am not able to test this any more. Therefore I am not able to accept an answer, since I can't evaluate if the solutions are working on various devices of different manufacturers.

like image 339
AlexS Avatar asked Aug 04 '26 23:08

AlexS


1 Answers

In the 3GPP AT command spec, you can find the descriptions of +CREG, +CEREG and +CGREG.

These AT commands give an answer with possible parameters, the 5th of which is AcT, the access technology as follows:

0 GSM 1 GSM Compact
2 UTRAN
3 GSM w/EGPRS
4 UTRAN w/HSDPA
5 UTRAN w/HSUPA
6 UTRAN w/HSDPA and HSUPA
7 E-UTRAN (LTE)

You can set them to return the unsolicited +CREG/+CGREG/+CEREG replies, by sending a set command with single parameter "1", for example:

AT+CREG=1.

AT+CREG applies to circuit switched services, AT+CGREG to packet switched (GPRS), and AT+CEREG to EPS (LTE). The details of which of the above parameters are valid for which command, are given in the spec.

like image 103
user1725145 Avatar answered Aug 07 '26 14:08

user1725145



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!