Hi all!
I've pushed the current state of GPRS support into the 'gprs' branch. All the 'core' changes related to GPRS are already in master, so it mainly really adds the GPRS protocols (gprs_{ns,bssgp,llc}.[ch]) as well as the handling of the most importnat 04.08 GMM messages (gsm_04_08_gprs.[ch]) as well as the state management for the SGSN MM context (gprs_sgsn.[ch]).
The status of the code is as follows: * NS link and BSSGP link are established between OpenBSC and the nanoBTS * LLC frames from the MS get delivered to the OpenBSC LLC code * GMM messages sent over LLC are delivered to the GMM code * The GMM code tries to respond with useful answers, permitting GPRS attach as well as routing area update
What's missing: * any kind of GGSN functionality, i.e. gatewaying to PPP daemon for actual user payloads * persistant storage of SGSN MM context information, especially the attach/detach status, routing area and P-TMSI of a subscriber * PDP context activation/deactivation * flow control for the BTS as well as for each MS (BSSGP level) * retransmissions and things like acknowledged mode of LLC * support for multiple BTS
There's really only one extremely ugly hack in the code right now, and that is that the IP address of the BTS is hard-coded in the ipac_gprs_send() function. You will have to enter the IP address of your BTS there to make packets in the SGSN->BTS direction delivered.
Apart from that, I think the code is at a state where other interested developers can start playing with it. I am leaving to Korea on a customer assingment tomorrow and will unlikely have time to work on any GPRS code throughout the next two weeks.
To get the code going, you should do the following things: * chceck out the gprs branch * hard-code your ip address into ipac_gprs_send() as indicated above * change your openbsc.cfg to use the last timeslot (TS 7) as "TCH/F_PDCH" instead of just "TCH/F"
Patches / Bug reports / ... welcome
Regards, Harald
I'm getting this which I'm pretty sure is bad :
<0020> abis_nm.c:594 OC=GPRS CELL(f1) INST=(00,00,ff) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) ADM=Unlocked <0020> abis_nm.c:594 OC=GPRS NSVC(f2) INST=(00,00,ff) IPACCESS(0xf6): SET ATTR ACK <0020> abis_nm.c:594 OC=GPRS NSVC(f2) INST=(00,00,ff) STATE CHG: OP_STATE=Disabled AVAIL=OK(ff) ADM=Unlocked bootstrapping RSL for BTS/TRX (0/0) using MCC=901 MNC=55 BSIC=63 TSC=7 <0010> abis_rsl.c:1449 channel=(bts=0,trx=0,ts=7) chan_nr=0x0f IPAC_PDCH_ACT <0010> abis_rsl.c:997 channel=(bts=0,trx=0,ts=7) chan_nr=0x0f IPAC PDCH ACT ACK <0020> abis_nm.c:594 OC=GPRS NSVC(f2) INST=(00,00,ff) Failure Event Report Type=communication failure Severity=critical failure <0020> abis_nm.c:594 OC=GPRS NSVC(f2) INST=(00,00,ff) STATE CHG: OP_STATE=Disabled AVAIL=Failed(01)
It should go further than that shouldn't it ?
Sylvain
Ah, there is another hardcoded ip in nanobts_attr_nsvc0 in bsc_init.c You need to put the OpenBSC ip in there.
On Sun, Nov 1, 2009 at 12:38 AM, Sylvain Munaut 246tnt@gmail.com wrote:
I'm getting this which I'm pretty sure is bad :
<0020> abis_nm.c:594 OC=GPRS CELL(f1) INST=(00,00,ff) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) ADM=Unlocked <0020> abis_nm.c:594 OC=GPRS NSVC(f2) INST=(00,00,ff) IPACCESS(0xf6): SET ATTR ACK <0020> abis_nm.c:594 OC=GPRS NSVC(f2) INST=(00,00,ff) STATE CHG: OP_STATE=Disabled AVAIL=OK(ff) ADM=Unlocked bootstrapping RSL for BTS/TRX (0/0) using MCC=901 MNC=55 BSIC=63 TSC=7 <0010> abis_rsl.c:1449 channel=(bts=0,trx=0,ts=7) chan_nr=0x0f IPAC_PDCH_ACT <0010> abis_rsl.c:997 channel=(bts=0,trx=0,ts=7) chan_nr=0x0f IPAC PDCH ACT ACK <0020> abis_nm.c:594 OC=GPRS NSVC(f2) INST=(00,00,ff) Failure Event Report Type=communication failure Severity=critical failure <0020> abis_nm.c:594 OC=GPRS NSVC(f2) INST=(00,00,ff) STATE CHG: OP_STATE=Disabled AVAIL=Failed(01)
It should go further than that shouldn't it ?
Sylvain
On Sun, Nov 01, 2009 at 12:48:43AM +0100, Sylvain Munaut wrote:
Ah, there is another hardcoded ip in nanobts_attr_nsvc0 in bsc_init.c You need to put the OpenBSC ip in there.
yes, you're right. I completely forgot about that.
Patches for making those things non-hardcoded are greatly appreciated.
The NSVC0 attribute address should be replaced by the getsockname() of the UDP socket.
The IP address that's hardcoded for sending the UDP packets should be the address from which we are receiving the UDP packets. For now, there's only one.
In the future, we will likely have multiple BTS, all sending UDP packets to port 23000 - in this case, we somehow need to keep track of those source IP addresses and generate a per-source-IP data structure. The best option probably is to keep the IP address somewhere stored in the struct gsm_bts and then match the BTS based on the source IP address for incoming packets, as well as determine the destination IP address when sending packets based on msg->trx->bts.
Regards, Harald
Fixing the IP helped but I don't think it's working yet because the last line in the log is :
<0020> abis_nm.c:594 OC=GPRS CELL(f1) INST=(00,00,ff) STATE CHG: OP_STATE=Disabled AVAIL=Off line(03)
And a little earlier there is :
<0020> abis_nm.c:594 OC=GPRS CELL(f1) INST=(00,00,ff) IPACCESS(0xf7): SET ATTR NACK CAUSE=Message cannot be performed <0020> abis_nm.c:594 OC=GPRS CELL(f1) INST=(00,00,ff) Failure Event Report Type=communication failure Severity=major failure
The full log is there. http://pastebin.com/m785cf86b
I searched for what could be wrong but I didn't see anything obvious. Could you provide a trace of a working startup so I can compare ?
Sylvain