Hello,I got everything up and running. Including EDGE data.
The throughput of the data from the osmo-sgsn is pretty good. But recently I have spotted a problem with the SGSN.
The sgsn loses the phones SNDCP entity after idling or making a phone call.
Please see the log from the sgsn
Hi!
On Tue, Aug 02, 2011 at 02:30:14AM +0900, Seungju Kim wrote:
Hello,I got everything up and running. Including EDGE data.
The throughput of the data from the osmo-sgsn is pretty good. But recently I have spotted a problem with the SGSN.
The sgsn loses the phones SNDCP entity after idling or making a phone call. http://pastebin.com/2W9dZdvW
Interesting. I have not yet observed this, as most likely my phones don't include the "PDP Context Status IE" (TS 24.008 / 10.5.7.1).
Using this IE, the phone can tell the network "I think I still have PDP contexts for the following NSAPIs active". The network then checks if it has the smae view, and silently deletes all PDP contexts for other NSAPIs.
It seems that the current code is interpreting the IE the wrong way.
We interpret it as an uint16_t, do ntohs() and it is 0x2000. Apparently NSAPI 5 was active befor (your log snippet is a bit short):
<0002> gprs_gmm.c:884 Dropping PDP context for NSAPI=5 due to PDP CTX STATUS IE= 0x2000 <0014> sgsn_libgtp.c:212 Delete PDP Context <0014> sgsn_libgtp.c:389 PDP Context was deleted
If I'm looking at Chapter 10.5.7.1, it seems the encoding is a bit odd, i.e. actually the byte ordering is little endian!
Can you try the patch below and see if the problem is fixed?
Hi! I tested the patch but the problem still exists :( Here is the new log from sgsn : http://pastebin.com/3PBKQwR5 If it helps, I am using an iPhone 4 with OpenBSC running under Debian 6 i686 VMWare.
-----Original Message----- From: openbsc-bounces@lists.osmocom.org [mailto:openbsc-bounces@lists.osmocom.org] On Behalf Of Harald Welte Sent: Thursday, August 04, 2011 8:14 PM To: Seungju Kim Cc: openbsc@lists.osmocom.org Subject: Re: GPRS issue after idle
Hi!
On Tue, Aug 02, 2011 at 02:30:14AM +0900, Seungju Kim wrote:
Hello,I got everything up and running. Including EDGE data.
The throughput of the data from the osmo-sgsn is pretty good. But recently I have spotted a problem with the SGSN.
The sgsn loses the phones SNDCP entity after idling or making a phone
call.
Interesting. I have not yet observed this, as most likely my phones don't include the "PDP Context Status IE" (TS 24.008 / 10.5.7.1).
Using this IE, the phone can tell the network "I think I still have PDP contexts for the following NSAPIs active". The network then checks if it has the smae view, and silently deletes all PDP contexts for other NSAPIs.
It seems that the current code is interpreting the IE the wrong way.
We interpret it as an uint16_t, do ntohs() and it is 0x2000. Apparently NSAPI 5 was active befor (your log snippet is a bit short):
<0002> gprs_gmm.c:884 Dropping PDP context for NSAPI=5 due to PDP CTX STATUS IE= 0x2000 <0014> sgsn_libgtp.c:212 Delete PDP Context <0014> sgsn_libgtp.c:389 PDP Context was deleted
If I'm looking at Chapter 10.5.7.1, it seems the encoding is a bit odd, i.e. actually the byte ordering is little endian!
Can you try the patch below and see if the problem is fixed?
On Thu, Aug 04, 2011 at 11:17:18PM +0900, Seungju Kim wrote:
Hi! I tested the patch but the problem still exists :( Here is the new log from sgsn : http://pastebin.com/3PBKQwR5
Then my patch is still wrong. Please look at 24.008 / Section 10.5.7.1 and make sure the code parses the field correctly, i.e. as indicated in the specs.
0x2000 == 0010 0000 0000 0000 corresponding SAPI: 1111 11 7654 3210 5432 1098
i.e. the bit that is set _is_ NSAPI5. This means, the code should _not_ release the PDP context for NSAPI5. But due to erroneous parsing, it _thinks_ that NSAPI5 is not set and it needs to be released.
Regards, Harald
Alright, I see. I just made an ugly hack and applied to my working copy. So far it seems fine. Now my phone does not lose it's PDP context while making a phone call. I'll be working on for some not ugly fix, but all these bits are confusing me haha.
Envoyé de mon iPhone
Le Aug 5, 2011 à 3:05 PM, Harald Welte laforge@gnumonks.org a écrit :
On Thu, Aug 04, 2011 at 11:17:18PM +0900, Seungju Kim wrote:
Hi! I tested the patch but the problem still exists :( Here is the new log from sgsn : http://pastebin.com/3PBKQwR5
Then my patch is still wrong. Please look at 24.008 / Section 10.5.7.1 and make sure the code parses the field correctly, i.e. as indicated in the specs.
0x2000 == 0010 0000 0000 0000 corresponding SAPI: 1111 11 7654 3210 5432 1098
i.e. the bit that is set _is_ NSAPI5. This means, the code should _not_ release the PDP context for NSAPI5. But due to erroneous parsing, it _thinks_ that NSAPI5 is not set and it needs to be released.
Regards, Harald
--
- Harald Welte laforge@gnumonks.org http://laforge.gnumonks.org/
============================================================================ "Privacy in residential applications is a desirable marketing option." (ETSI EN 300 175-7 Ch. A6)
Hi,
On Sat, Aug 06, 2011 at 12:58:00AM +0900, Seungju Kim wrote:
Alright, I see. I just made an ugly hack and applied to my working copy. So far it seems fine. Now my phone does not lose it's PDP context while making a phone call. I'll be working on for some not ugly fix, but all these bits are confusing me haha.
can you try the attached patch? It should parse it correctly, without the double-byte-swapping of the last patch.
I could confirm that this patch is working :)
Envoyé de mon iPhone
Le Aug 6, 2011 à 4:22 AM, Harald Welte laforge@gnumonks.org a écrit :
Hi,
On Sat, Aug 06, 2011 at 12:58:00AM +0900, Seungju Kim wrote:
Alright, I see. I just made an ugly hack and applied to my working copy. So far it seems fine. Now my phone does not lose it's PDP context while making a phone call. I'll be working on for some not ugly fix, but all these bits are confusing me haha.
can you try the attached patch? It should parse it correctly, without the double-byte-swapping of the last patch. --
- Harald Welte laforge@gnumonks.org http://laforge.gnumonks.org/
============================================================================ "Privacy in residential applications is a desirable marketing option." (ETSI EN 300 175-7 Ch. A6) <0001-GPRS-Fix-the-parsing-interpretation-of-the-PDP-CTX-s.patch>
On Sat, Aug 06, 2011 at 12:01:05PM +0900, Seungju Kim wrote:
I could confirm that this patch is working :)
Great, it's already part of the master branch now.