<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18928">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>While running Cell-Log application, I found that 
the main branch of OsmocomBB gives wrong value of MCC/MNC in hex (but correct 
one in decimal), but the Sylvain testing branch gives correct 
value.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>In practice this means compiling Cell-Log in 
testing branch gives the name of the country, but the compiling it in main 
branch does not recognise the country. Other side-effects are unknown to me at 
present.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Tracing through the source leads to the 
"gsm48_decode_lai" as the culprit. The code seems correct in the testing branch, 
but has not been updated in the main. Moreover, the code is shifted out from 
gsm48.c to sysinfo.c in the testing branch.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Testing branch decodes MCC/MNC to hex:</FONT></DIV>
<DIV><FONT size=2 face=Arial>     *mcc = ((lai->digits[0] 
& 0x0f) << 8)<BR>          | 
(lai->digits[0] & 0xf0)<BR>    
      | (lai->digits[1] & 0x0f);</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>But main branch decodes MCC/MNC to 
decimal:</FONT></DIV>
<DIV><FONT size=2 face=Arial>     *mcc = (lai->digits[0] 
& 0x0f) * 100<BR>          + 
(lai->digits[0] >> 4) * 10<BR>    
      + (lai->digits[1] & 0x0f);</FONT></DIV>
<DIV><FONT size=2 face=Arial>The comment in main branch states that "/* 
Attention: this function retunrs true integers, not hex! */". There is no such 
comment in the testing branch.</FONT><FONT size=2 face=Arial><BR></DIV></FONT>
<DIV><FONT size=2 face=Arial>So is this a problem because Cell_Log wrongly uses 
gsm48_decode_lai? Or does gsm48_decode_lai need to be updated in the main 
branch?</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>B.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV></BODY></HTML>