at-commandgprssim-cardppp

AT-COMMAND how to check data connection


I seek for a full proof method to check if the modem is connected to data network ?

As I have seen, there is two differents commands :

  1. at+cgreg : Give GPRS status
  2. at+creg : Give GSM / UMTS status

In some case (maybe one time on ten), I get the following result :

at+creg?
+CREG: 2,5,"00CA","007993E2",2

and

at+cgreg?
+CGREG: 2,3

So the GSM is configured in UMTS, but the GPRS cannot be registered. Can I considere that the data network can be used without GPRS (from UMTS) ?


Solution

  • At commands finishing with "reg" are related to network registration. To check if the modem is attached to the packet switched (data) domain you can use at+cgatt? command. Further, if you want to check if the PDP context or bearer is activated you can use at+cgact? command. Of course you need both to be activated in order to send and receive data to and from Internet.