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(a)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(a)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?
--
- Harald Welte <laforge(a)gnumonks.org>
http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)