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