|
Cellular forums Home > Archive > Cellular GSM Technology > February 2008 > What if I miss the PDP-context deactivation?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
What if I miss the PDP-context deactivation?
|
|
| Piotr.Pietraszkiewicz 2008-02-14, 12:33 pm |
| I'm playing with a GSM module (WAVECOM Q2406 if it matters). I know that the
PLMN with which I establish a GPRS session deactivates the PDP-context every
30 minutes if MS sends no data. My problem is that I would like to find out
whether I'm deactivated. I know that normally this is not a problem, but add
to the picture a fact that the deactivation messages don't reach the mobile
(I may be temporarily out of range when this happens). Is there a way to
find out reliably that the PDP context is deactivated?
Saying "AT+CGACT?" doesn't do the job. I made an experiment. I shielded my
mobile, waited long enough to ensure that PLMN deactivates PDP-context then
un-shielded the mobile and issued the command. I got:
+CGACT: 0,0
+CGACT: 1,1
OK
Context "1" is what I activated and what gets deactivated(while I don't see
it). Any suggestions are appreciated!
Piotr
| |
| John Henderson 2008-02-14, 10:33 pm |
| Piotr.Pietraszkiewicz wrote:
> I'm playing with a GSM module (WAVECOM Q2406 if it matters). I
> know that the PLMN with which I establish a GPRS session
> deactivates the PDP-context every 30 minutes if MS sends no
> data. My problem is that I would like to find out whether I'm
> deactivated. I know that normally this is not a problem, but
> add to the picture a fact that the deactivation messages don't
> reach the mobile (I may be temporarily out of range when this
> happens). Is there a way to find out reliably that the PDP
> context is deactivated?
>
>
>
> Saying "AT+CGACT?" doesn't do the job. I made an experiment. I
> shielded my mobile, waited long enough to ensure that PLMN
> deactivates PDP-context then un-shielded the mobile and issued
> the command. I got:
>
>
>
> +CGACT: 0,0
>
> +CGACT: 1,1
>
>
>
> OK
>
>
>
> Context "1" is what I activated and what gets
> deactivated(while I don't see it). Any suggestions are
> appreciated!
Have you looked at the "AT+CGREG" command (assuming it's
supported by your module)?
AT+CGREG=1
should at least notify you when you loose GPRS coverage and when
you regain it (via unsolicited "+CGREG: <stat>" messages).
Whether it can also tell you if the session is still active or
not must surely depend on whether there's been an over-the-air
interaction on regaining coverage.
If it's then simply a matter of forcing an interaction of any
description with the network on regaining coverage, then an
appropriate supplementary services command should be both
straightforward and free. For example:
AT+CLIP?
just might result in your GPRS status being updated as a
side-effect.
John
| |
| blue box thief 2008-02-15, 10:33 am |
| On 2008-02-14, John Henderson < jhenRemoveThis@talk2
1.com> wrote:
> Piotr.Pietraszkiewicz wrote:
>
<SNIP>[color=darkred]
>
> Have you looked at the "AT+CGREG" command (assuming it's
> supported by your module)?
>
> just might result in your GPRS status being updated as a
> side-effect.
>
> John
<SNIP>
while I'm more familiar with actual core messages, when yo uget an active PDP
context, your UT will get an IP address.
Would it be something as simple as checking, when you "think" your UT
has disconnected, if your modem still has an IP address.
When your UT receives a PDP De-activate message, the IP address assigned
will be released and reused in the APN DHCP pool (unless your a corporation
who pays a fortune for static addresses...).
Just a thought...
hth,
b
| |
| Piotr Pietraszkiewicz 2008-02-15, 12:33 pm |
| Thanks for your suggestions. I include my comments inline.
"John Henderson" < jhenRemoveThis@talk2
1.com> schrieb im Newsbeitrag
news:61jv3hF1vlj3oU1
@mid.individual.net...
> Piotr.Pietraszkiewicz wrote:
>
>
> Have you looked at the "AT+CGREG" command (assuming it's
> supported by your module)?
>
> AT+CGREG=1
>
> should at least notify you when you loose GPRS coverage and when
> you regain it (via unsolicited "+CGREG: <stat>" messages).
Yes.. and that seems to work. But "not registered" does not imply
"deactivated".
When I am out of coverege the status changes to "not registered", when I
have
the coverege again the status changes back to "registered". I'd like to
preserve
the GPRS session in cases where I'm temporarly out of coverage. But I would
also like to be sure that the GPRS session is still valid after I regain the
coverage.
> Whether it can also tell you if the session is still active or
> not must surely depend on whether there's been an over-the-air
> interaction on regaining coverage.
>
> If it's then simply a matter of forcing an interaction of any
> description with the network on regaining coverage, then an
> appropriate supplementary services command should be both
> straightforward and free. For example:
>
> AT+CLIP?
>
> just might result in your GPRS status being updated as a
> side-effect.
This one looked very promising. I just tried it, but the status remains
unchagned. The device still claims it is "activated" afterwards. But perhaps
some other commands have the side-effect you described.. I did not think of
this earlier. Thanks. I'll keep on trying.
Piotr
| |
| Piotr Pietraszkiewicz 2008-02-15, 12:33 pm |
| "blue box thief" <"blue box thief"@runningwithbulls.com> schrieb im
Newsbeitrag news:slrnfrb7bq.762. blueboxthief@sanferm
in.my.domain...
> On 2008-02-14, John Henderson < jhenRemoveThis@talk2
1.com> wrote:
> <SNIP>
> <SNIP>
>
> while I'm more familiar with actual core messages, when yo uget an active
> PDP
> context, your UT will get an IP address.
>
> Would it be something as simple as checking, when you "think" your UT
> has disconnected, if your modem still has an IP address.
That could work, if the disconnection messages reached me. But then the
regular "CGACT?" would work too. In the scenario I described the PDP
context deactivation is overlooked. The problem is that I have the IP
address
assigned, but don't know if its a valid one.
>
> When your UT receives a PDP De-activate message, the IP address assigned
> will be released and reused in the APN DHCP pool (unless your a
> corporation
> who pays a fortune for static addresses...).
>
> Just a thought...
Thanks, anyway.
Piotr
| |
| John Henderson 2008-02-15, 10:33 pm |
| Piotr Pietraszkiewicz wrote:
> This one looked very promising. I just tried it, but the
> status remains unchagned. The device still claims it is
> "activated" afterwards. But perhaps some other commands have
> the side-effect you described.. I did not think of this
> earlier. Thanks. I'll keep on trying.
This suggestion isn't exactly what you asked for, but is your
aim to keep the context active (rather than simply check its
status)?
If so, then
AT+CGATT=1
_might_ achieve that, if you issue this command whenever
"+CGREG: <stat>" indicates that coverage has returned.
GSM 07.07 says "If the MT is already in the requested state, the
command is ignored and the OK response is returned." Whether
this will work will depend on whether it actually tests the
status or trusts its pre-coverage-loss value. GSM 07.07 itself
isn't absolutely clear on this point.
John
| |
| Piotr Pietraszkiewicz 2008-02-20, 12:33 pm |
|
"John Henderson" < jhenRemoveThis@talk2
1.com> schrieb im Newsbeitrag
news:61mnsqF1vhlhdU1
@mid.individual.net...
> Piotr Pietraszkiewicz wrote:
>
>
> This suggestion isn't exactly what you asked for, but is your
> aim to keep the context active (rather than simply check its
> status)?
>
> If so, then
>
> AT+CGATT=1
>
> _might_ achieve that, if you issue this command whenever
> "+CGREG: <stat>" indicates that coverage has returned.
>
> GSM 07.07 says "If the MT is already in the requested state, the
> command is ignored and the OK response is returned." Whether
> this will work will depend on whether it actually tests the
> status or trusts its pre-coverage-loss value. GSM 07.07 itself
> isn't absolutely clear on this point.
This hint was also promising. Unfortunately it seems it does not test the
status :-(. "OK" is returned the module claims it is activated, but IP
packets don't reach their destination.
I temporarly implemented this workaround(which I don't like):
Whenever state changes from "not registered" to "registered", or "signal not
measurable" to "signal measurable" then I detach and assume my GPRS session
is disconnected. Later(depending on the choosen policy) the software may
decide to automatically rebuild the GPRS session.
I don't like this solution because:
- It is not comfortable for the end user. Being temporarily out of coverage
results in GPRS session being broken.
- It is not reliable. One can imagine that PDP-deactivation messages don't
reach the mobile for some other reason e.g. due to wave interference or
some SGSN problem, maintanance action, etc.
It would be nice to have a message like "hello PLMN do you still have my
context?".
BTW. During "Network initialized PDP deactivation" the mobile sends back the
"Deactivate PDP Context Accept" message. What happens if SGSN doesn't
get this accept message? What does it do? What is specified? Does anyone
know? I found only the good scenarios explained on the web.
I guess I have to educate myself more on the subject. I hope it is just my
incompetence and that there exists a way to prove whether my context is a
valid one.
Thanks again for your suggestions!
Piotr
|
|
|
|
|