I finally found the reason for this behaviour (at
least I hope
it is the reason), I had to specify the correct BVCI parameter
for the call to gprs_ns_sendmsg() in gprs_bssgp_tx_dl_ud(). If
I use "925" instead of "0" it works.
Ah yes, I had to do that too. I fixed that first and forgot about it because
it didn't fix the reboot but apparently both fix are needed for things to
work.
The phone sends an "GMM
IDENITY RESPONSE" and continues to send "GMM ATTACH REQUEST"
because it does not yet receive an accept.
After rebooting the phone fully I was able to convince it it wasn't
attached (both my iPhone and my android had the same behavior of thinking
they were still attached after switching from their 'home' network EDGE to
OpenBSC GPRS, even with different mnc/mcc ... And they didn't seem to care
about the RA REJECT with "implicit detach" cause)
Initially I had a segfault when receiving a GMM ATTACH. The MCC/MNC in the
CELL ID transmitted in the GMM ATTACH REQUEST are not the one I set in
openbsc.cfg, they seem hardcoded to 001/01 but I haven't found from where
yet. So currently you need to set 1/1 in your openbsc.cfg as well.
Sylvain