Dear group members,
(I would like to apologize if you got this message for the second time, but last time I sent it to the wrong mail address and I am not sure if the gnumonks mailing list is synchronized with this one, osmocom, I am sorry if you get this mail for the second time!)
I would like to ask you a question regarding the timeouts and initiating/allocating an SDCCH channel for a subscriber inside of the GSM network. I am trying to modify some parts of OpenBSC (/openbsc/src/libmsc/rrlp.c) and to implement the MS-based RRLP in OpenBSC (to send assistance data in form of almanac, ephemeris, BTS geolocation data and GPS reference time to the MS).
At the moment I use the silent sms to start an RRLP request (send RRLP request + assistance data and then send the silent sms). But if it takes too long to send the assistance data OpenBSC starts from the beginning (send rrlp request + assistance data + sms again). I think this is because OpenBSC waits for an ack from the MS for the silent sms (which has not been sent) and therefore it's a timeout issue. As a quick hack I have modified parts of the code and got the RRLP to work (sent successfully these data and I got a position from the MS).
Just for the curious one, I commented out three lines just before the return, in /openbsc/src/libmsc/gsm_04_11.c in the function, gsm411_rx_rp_ack, the following lines:
//else //gsm411_release_conn(trans->conn);
/* free the transaction here */ //trans_free(trans);
and I changed one timer value from 10 to 100, in /openbsc/src/libbsc/bsc_rll.c in the function, rll_establish to:
osmo_timer_schedule(&rllr->timer, 100, 0);.
As I know what I did was wrong (since changing the timers and not releasing the channel properly influences the whole system) but I just did it for the purpose of testing and to see do I send correct data and does the RRLP work at all.
I hope you can give me some hints and guides how to allocate a channel for around 130 seconds and to send the RRLP assistance data within that channel without doing the above tricks. Once everything works properly I will provide the RRLP code.
Best regards, Refik Hadzialic
Hi Refik,
On Wed, Apr 04, 2012 at 04:40:36PM +0200, Refik Hadzialic wrote:
(I would like to apologize if you got this message for the second time, but last time I sent it to the wrong mail address and I am not sure if the gnumonks mailing list is synchronized with this one, osmocom, I am sorry if you get this mail for the second time!)
That's very easy to check. http://lists.osmocom.org/pipermail/openbsc/2012-March/003727.html
Kind regards, -Alexander Huemer
On 04/04/2012 04:40 PM, Refik Hadzialic wrote:
Dear group members,
Hi Refik,
osmo-nitb (libmsc/) keeps a channel open by "reference" counting. This counting is implemented by the 'transaction' or 'operations'. See gsm_subscriber_connection for 'operation' pointers.
So what roughly happens is: 1.) A channel is opened, a dummy operation is created to not immediately close the channel 2.) Whoever feels responsible creates an operation/transaction.. 3.) When a transaction is done msc_release_connection is called.. 4.) when all transactions and operations are completed the channel will be released.
You would probably want to add a new operation
Hi Alexander & Holger,
thank you for the link, I will bookmark it, and sorry for the same message.
Thank you for the help Holger, I will look at it this week, I might have then a few more questions.
Best regards, Refik
On Wed, Apr 4, 2012 at 6:38 PM, Holger Hans Peter Freyther holger@freyther.de wrote:
On 04/04/2012 04:40 PM, Refik Hadzialic wrote:
Dear group members,
Hi Refik,
osmo-nitb (libmsc/) keeps a channel open by "reference" counting. This counting is implemented by the 'transaction' or 'operations'. See gsm_subscriber_connection for 'operation' pointers.
So what roughly happens is: 1.) A channel is opened, a dummy operation is created to not immediately close the channel 2.) Whoever feels responsible creates an operation/transaction.. 3.) When a transaction is done msc_release_connection is called.. 4.) when all transactions and operations are completed the channel will be released.
You would probably want to add a new operation
On 04/08/2012 02:53 PM, Refik Hadzialic wrote:
Hi Alexander & Holger,
thank you for the link, I will bookmark it, and sorry for the same message.
Thank you for the help Holger, I will look at it this week, I might have then a few more questions.
Hi,
technical questions are more than welcome. Feel encouraged to update the wiki or submit a patch for the doc/*.txt files.
holger
Hi Holger,
I did what you suggested (at least I think I did), I recreated the silent call with different variable names in gsm_subscriber_connection and I added the release checks in msc_release_connection in libmsc/osmo_msc.c for the RRLP transaction, thank you for guiding me! However, I have one more question regarding the connection, it gets always disconnected after some time.
When I create the connection e.q. by typing in the terminal "subscriber id 1 silent-call start sdcch", and my request is being sent out (RRLP request) in the function:
static int paging_cb_silent in libmsc/silent_call.c in "case GSM_PAGING_SUCCEEDED:", between the following two lines:
"osmo_signal_dispatch(SS_SCALL, S_SCALL_SUCCESS, &sigdata);" and "break;" (between these two lines I send the request out).
If the cell phone has the GPS coordinates cached, it returns them back, if not it tries to get a fix, but no matter in which of the two states it is, it disconnects me after 30 seconds after executing the above command in the telnet window.
I get the following output after 22-23 seconds: <0000> abis_rsl.c:1517 (bts=0,trx=0,ts=0,ss=0) SAPI=0 RELEASE INDICATION <0004> abis_rsl.c:1478 rsl_handle_release
and then a few seconds later (around 5-8 seconds): <0004> abis_rsl.c:891 (bts=0,trx=0,ts=0,ss=0) CONNECTION FAIL: RELEASING CAUSE=0x01(Radio Link Failure) <0004> abis_rsl.c:621 (bts=0,trx=0,ts=0,ss=0) RF Channel Release CMD due error 1 <0004> abis_rsl.c:658 (bts=0,trx=0,ts=0,ss=0) RF CHANNEL RELEASE ACK <0000> chan_alloc.c:303 Freeing lchan with state RELEASE DUE ERROR - setting to NONE
and it doesn't enter the function: void msc_release_connection in libmsc/osmo_msc.c since I output a comment in the log file when it is in there!
Do you have an idea, what I might be doing wrong? I get the same behavior even if I comment out the RRLP request sending (so just normal silent call).
Once I finish and get it to work, I will make a wiki page so it can help other users.
Best regards, Refik Hadzialic
On Sun, Apr 8, 2012 at 4:19 PM, Holger Hans Peter Freyther holger@freyther.de wrote:
On 04/08/2012 02:53 PM, Refik Hadzialic wrote:
Hi Alexander & Holger,
thank you for the link, I will bookmark it, and sorry for the same message.
Thank you for the help Holger, I will look at it this week, I might have then a few more questions.
Hi,
technical questions are more than welcome. Feel encouraged to update the wiki or submit a patch for the doc/*.txt files.
holger