I might be horribly wrong, but there is something I did not grasp in gprs_llc.c. So I altered it, but since I am not sure I share it here...
Function 'gprs_llc_tx_ui' uses function 'lle_by_tlli_sapi' to retrieve an lle based on a tlli/sapi combination. To do the lookup, the supplied tlli is 'localized' (tlli_foreign2local). If this does not result in a succesful find, function 'llme_alloc' is used to "create an LLME on the fly". However 'llme_alloc' does not localize the tlli. So every next search for the lle fails.
For this I created this patch:
--- openbsc/openbsc/src/gprs/gprs_llc.c 2012-04-30 15:42:58.958823325 +0200 +++ ../openbsc/openbsc/openbsc/src/gprs/gprs_llc.c 2012-04-30 10:54:11.291836887 +0200 @@ -157,7 +160,8 @@ if (!llme) return NULL;
- llme->tlli = tlli; + llme->tlli = tlli_foreign2local(tlli); llme->old_tlli = 0xffffffff; llme->state = GPRS_LLMS_UNASSIGNED;
This seems to have solved the problem (unable to get an IP link operational), but I am not sure if this was the correct way to handle this, so please feel free to comment.
HTH/F
On 04/30/2012 04:26 PM, Frank Maas wrote:
Hi,
I might be horribly wrong, but there is something I did not grasp in gprs_llc.c. So I altered it, but since I am not sure I share it here...
- llme->tlli = tlli;
 
- llme->tlli = tlli_foreign2local(tlli); llme->old_tlli = 0xffffffff; llme->state = GPRS_LLMS_UNASSIGNED;
 
I think I once carried a similar patch in one of the branches. The way we wanted to avoid this issue is that whoever transmits needs to select the llme/lle. I think my code set old_tlli to the foreign or such but I dropped it (and can't remember why it wasn't needed anymore).
This will not be the last issue you will experience with GPRS. Both the nanoBTSs implementation and our SGSN are not very stable. Some of the known GPRS issues include:
- http://openbsc.osmocom.org/trac/ticket/55 (crash) - http://openbsc.osmocom.org/trac/ticket/44 (correctness) - http://openbsc.osmocom.org/trac/ticket/43 (leak)
There is also the 'santos' branch of someone that forked our code and has done a bit of bugfixing.