<div dir="ltr"><div><div><div>I just fixed some things (gsm_subscriber.c, VTY tmsi parsing)<br></div>and did some tests. It works!<br><br>Location Update Request with TMSI from previous network:<br><0002> gsm_04_08.c:1127 LOCATION UPDATING REQUEST: MI(TMSI)=0x68044a6c type=NORMAL <br><0001> gsm_04_08.c:144 (bts 0 trx 0 ts 0 pd 05) Sending 0x18 to MS.<br><0001> gsm_04_08.c:144 (bts 0 trx 0 ts 0 pd 05) Sending 0x18 to MS.<br><br>Outgoing SMS from OpenBSC VTY:<br>OpenBSC> subscriber tmsi 0xb7f861b6 sms sender tmsi 0xb7f861b6 send TEST<br><0002> gsm_subscriber.c:175 Subscriber <IMSI> not paged yet.<br><0004> abis_rsl.c:1465 (bts=0,trx=0,ts=0,ss=0) Activating ARFCN(***) SS(0) lctype SDCCH r=OTHER ra=0x1a ta=1<br><0004> abis_rsl.c:1199 (bts=0,trx=0,ts=0,ss=0) CHANNEL ACTIVATE ACK<br><0000> abis_rsl.c:1653 (bts=0,trx=0,ts=0,ss=0) SAPI=0 ESTABLISH INDICATION<br><0000> gsm_04_08.c:3573 Dispatching 04.08 message, pdisc=6<br><0003> gsm_04_08.c:1180 PAGING RESPONSE: MI(TMSI)=0xb7f861b6<br><0003> gsm_04_08.c:1198 <- Channel was requested by <IMSI><br><0003> gsm_04_08.c:1259 TX APPLICATION INFO id=0x00, len=4<br><0001> gsm_04_08.c:144 (bts 0 trx 0 ts 0 pd 06) Sending 0x38 to MS.<br><0001> transaction.c:71 subscr=0x2363f00, net=0x2333e90<br><br>USSD request also works:<br><0002> gsm_04_08.c:956 <- CM SERVICE REQUEST serv_type=0x08 MI(TMSI)=0xb7f861b6<br><0002> gsm_04_08_utils.c:692 -> CM SERVICE ACK<br><br></div><div>As you can see, now TMSI displays in hex.<br></div><div>I'll provide a new patch soon.<br><br></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div>С наилучшими пожеланиями,<br></div>Яницкий Вадим.<br></div></div></div>
<br><div class="gmail_quote">2016-03-22 18:58 GMT+06:00 Вадим Яницкий <span dir="ltr"><<a href="mailto:axilirator@gmail.com" target="_blank">axilirator@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hello, Harald! <span lang="en"><span>Good day, Holger!<br></span></span><br></div><span lang="en"><span>It looks like SQLite3 doesn't have support of </span></span>unsigned 64-bit integers. :(<br></div>Of course, we can write some custom functions, which can emulate it,<br>but it isn't good solution, I think.<br><br></div>My suggestion is to keep the TMSI column type in string format: 0xffffffff.<br></div><div>I need to know your <span lang="en"><span>opinions before starting to write a new patch.<br></span></span></div><div><div><div><br></div></div></div></div><div class="gmail_extra"><span class=""><br clear="all"><div><div><div dir="ltr"><div>С наилучшими пожеланиями,<br></div>Яницкий Вадим.<br></div></div></div>
<br></span><div><div class="h5"><div class="gmail_quote">2016-03-17 22:34 GMT+06:00 Holger Freyther <span dir="ltr"><<a href="mailto:holger@freyther.de" target="_blank">holger@freyther.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
> On 17 Mar 2016, at 17:21, Вадим Яницкий <<a href="mailto:axilirator@gmail.com" target="_blank">axilirator@gmail.com</a>> wrote:<br>
><br>
> Hi Guys!<br>
><br>
> > If you have time, please check if there are other occurrences in OpenBSC<br>
> > or OsmocomBB where the TMSI is printed as integer.  Thanks!<br>
><br>
> No problem! :)<br>
><br>
> > I think it was a bit too quick. I foresee one problem. Let's assume someone<br>
> > is using TMSIs and now upgrade the sourcecode. All CM Service Requests<br>
> > will fail because the TMSI is not known. What is the migration/mitigation plan?<br>
><br>
> I absolutely agree with Holger. Maybe we can add some code that will check<br>
> if database still stores TMSIs in old representation style and convert them to<br>
> uint32_t? We can change the libmsc/db.c:db_prepare() for this purpose.<br>
<br>
<br>
</span>yes, we have a schema version and can just increase it. E.g. have a look at how we migrate SMS.<br>
<span><br>
<br>
<br>
><br>
> > tmsi_from_string will not work for this anymore.<br>
><br>
> Yes, I forgot to change the gsm_subscriber.c ... Sorry.<br>
<br>
<br>
</span>it happens. thanks for contributing<br>
<span><br>
<br>
<br>
><br>
> > there is no length check but that doesn't seem to be a big issue right now.<br>
><br>
> We can just write a function that will do this check instead of using #define.<br>
<br>
</span>I think you will not need to touch this define at all. We might want to change the name to _from_mi_string.<br>
<span><br>
<br>
><br>
> > * a DB schema upgrade and store the TMSI as uint32_t<br>
> > * Use hex presentation in VTY<br>
><br>
> +1<br>
<br>
<br>
</span>looking forward for the follow up.<br>
<span><font color="#888888"><br>
<br>
holger</font></span></blockquote></div><br></div></div></div>
</blockquote></div><br></div>