I try to simulate a connection loss by disconnecting the antenna after a valid ppp connection has been set up.
After reconnecting the antenna, activating a context again and trying to set up a ppp connection, the modem always sends
+CGEV: ME DEACT IP, , 1
and the ppp connection fails.
do I get this URC? Am I doing something wrong? It seems as if IP
Control Protocol is failing and the modem cannot receive IP
configuration from the network. IP phase is deactivated by the modem.
I have attached a full debug output.
The basic steps I take to set up a ppp connection after network registration:
also use AT&C0 to disable data carrier detect. When the DCD is
disabled the modem does not hangup anymore after the data connection.
Thanks in advance!
Maybe I’m wrong: I cannot see AT+CGATT=1 after the registration completes? The last one is when CGREG: 2.
In the failing case I see the AT+CGATT=1:
Aug 22 08:26:24 mx31tt01 daemon.info ofonod: Aux: > AT+CGATT=1r
Aug 22 08:26:24 mx31tt01 daemon.info ofonod: Modem: < rn+CIEV: rssi,3rnAug 22 08:26:26 mx31tt01 daemon.info ofonod: Aux: < rnOKrnAug 22 08:26:26 mx31tt01 daemon.debug ofonod: src/gprs.c:gprs_attach_callback() /telit_0 error = 0Aug 22 08:26:26 mx31tt01 daemon.info ofonod: Aux: > AT+CGREG?rAug 22 08:26:26 mx31tt01 daemon.info ofonod: Modem: < rn+CGREG: 2rnAug 22 08:26:26 mx31tt01 daemon.info ofonod: Aux: < rn+CIEV: rssi,3rnrn+CGREG: 2rnAug 22 08:26:26 mx31tt01 daemon.debug ofonod: drivers/atmodem/network-registration.c:ciev_notify() Strength: 60Aug 22 08:26:26 mx31tt01 daemon.debug ofonod: src/network.c:ofono_netreg_strength_notify() strength 60Aug 22 08:26:26 mx31tt01 daemon.info ofonod: Modem: < rn+CGREG: 1,"271B","3068"rnAug 22 08:26:26 mx31tt01 daemon.info ofonod: Aux: < rn+CGREG: 1,"271B","3068"rnrn+CGREG: 2,1,"271B","3068"rnrnOKrn
The debug output in this case looks the same as in the working case.
you disconnect the antenna for 60 seconds.
The GPRS connection should be recovered automatically after that time, without the need to restart a new connection (new PDP context activation, new PPP etc).
The fact that network registration is lost, it doesn’t imply the PDP deactivation.
Basically what are you doing, is to open a new connection while the previous PDP session is still active (you still have an IP address)
In fact CGEV: ME DEACT IP, , 1 message means that PDP context has been deactivated.
when you disconnect the antenna and reconnect it after 60 seconds, the PDP context is usually still active therefore the module still has an IP address.
Loosing the GSM/GPRS network for a while doesn’t imply the deactivation of the previous IP address.
What you are doing, it is to open a new connection and request an new IP address when the previous one is still valid.
In fact the +CGEV: ME DEACT IP, , 1 message means that PDP is deactivated, so it was active when you started the new PPP session
thank you for your reply!
I thought "AT+CGATT=0" should deactivate all contexts.
If I try to deactivate the context with AT+CGACT=0,cid (in my case cid == 1),
then I get +CME ERROR: 0.
Am I not supposed to deactivate the contex with +CGACT after sending ‘AT+CGATT=0’ ?
How do I deactivate the context then?
thank you for your reply!
I thought ‘AT+CGATT=0’ should deactivate all active contexts.
If I try to deactivate the context with +CGACT, I always get the response ‘+CME ERROR: 0’.
Am I not supposed to send +CGACT after ‘AT+CGATT=0’ ?
I just saw that ‘AT+CGATT=0’ returns +CME ERROR: 30.
When you reconnect the antenna, the module should automatically get registered again to the GSM/GPRS network, and PPP connection should be still active.
Usually you don’t need to restart a new PPP session, unless you lost the registration for a long time.
Wait that the module is registered again AT+CGREG? and verify that PDP is still active AT+CGACT? then you can continue you PPP session.
Ok, thanks! I understand that but it should still be possible to manually deactivate the context by any means, but +CGATT and +CGACT do not work in this case and I don’t see any other possibility to do that.
did you try sending a LCP Terminate Request on the PPP session?
or in alternative +++ to switch in command mode, followed by ATH to close the connection.
Hit enter to search or ESC to close
Knowledge Base & Download Zone