<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<STYLE type=text/css>@import url( C:\Documents and Settings\Administrator\Local Settings\Temporary Internet Files\scrollbar.css );
</STYLE>

<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19019"><LINK rel=stylesheet 
href="BLOCKQUOTE{margin-Top: 0px; margin-Bottom: 0px; margin-Left: 2em}"></HEAD>
<BODY style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt">
<DIV><FONT size=2 face=Verdana></FONT> </DIV>
<DIV> </DIV>
<DIV>hello, when i run osmocom i meet a problem that 
LOCATION UPDATE REQUEST is always faild,</DIV>
<DIV>the details are in the following:</DIV>
<DIV> </DIV>
<DIV>1, my hardware environment: </DIV>
<DIV style="TEXT-INDENT: 2em">a Moto C118 mobile;</DIV>
<DIV style="TEXT-INDENT: 2em">a cheap RS232 com port to jack port data 
cable (unkown chip);</DIV>
<DIV style="TEXT-INDENT: 2em">a USB2 to RS232 converter using FTDI 
chip;</DIV>
<DIV style="TEXT-INDENT: 2em">i5 CPU with GIGABYTE motherbord running with 
Ubuntu 9.04;</DIV>
<DIV> </DIV>
<DIV>2, i run the command osmocon, mobile, and telnet as below in 
seprate terminals in order.</DIV>
<DIV 
style="TEXT-INDENT: 2em">./osmocon -p /dev/ttyUSB0 -m c123xor ../../target/firmware/board/compal_e88/layer1.compalram.bin 
</DIV>
<DIV style="TEXT-INDENT: 2em">./mobile -i 127.0.0.1</DIV>
<DIV style="TEXT-INDENT: 2em">telnet localhost 4247 </DIV>
<DIV style="TEXT-INDENT: 4em">en</DIV>
<DIV style="TEXT-INDENT: 4em">sim reader 1</DIV>
<DIV> </DIV>
<DIV>3, after that osmocom is working, but things doesn't happed what i wish, 
LOCATION UPDATE REQUEST is always faild so that the phone can not make 
calls.</DIV>
<DIV style="TEXT-INDENT: 2em">-in command mobile running terminial i grubbed the 
following log:</DIV>
<DIV style="TEXT-INDENT: 2em"> </DIV>
<DIV style="TEXT-INDENT: 6em">
<DIV style="TEXT-INDENT: 2em">
<DIV style="TEXT-INDENT: 4em">"</DIV></DIV>
<DIV style="TEXT-INDENT: 4em">
<DIV><0001> gsm48_rr.c:2006 PAGING ignored, we are not camping.</DIV>
<DIV>writing msgb to gsmtap fd: Connection refused</DIV>
<DIV><0001> gsm48_rr.c:694 timer T3126 has fired</DIV>
<DIV><000d> gsm48_rr.c:699 Requesting channel failed</DIV>
<DIV><0001> gsm48_rr.c:363 new state connection pending -> idle</DIV>
<DIV><0003> gsm322.c:3318 (ms 1) Event 'EVENT_RET_IDLE' for Cell selection in state 'C3 camped normally'</DIV>
<DIV><0003> gsm322.c:2889 Selecting frequency 22. after LOC.UPD.</DIV>
<DIV><0003> gsm322.c:251 Sync to ARFCN=22 rxlev=-56 (Sysinfo, ccch mode NON-COMB)</DIV>
<DIV><0003> gsm322.c:540 new state 'C3 camped normally' -> 'C3 camped normally'</DIV>
<DIV><0004> gsm48_mm.c:3695 (ms 1) Received 'RR_REL_IND' from RR in state wait for RR connection (location updating)</DIV>
<DIV><0004> gsm48_mm.c:2589 RR link released after loc. upd.</DIV>
<DIV><000d> gsm48_mm.c:2533 Location update failed</DIV>
<DIV><000d> gsm48_mm.c:2543 Try location update later</DIV>
<DIV><0004> gsm48_mm.c:2545 Loc. upd. failed, retry #0</DIV>
<DIV><0004> gsm48_mm.c:391 starting T3211 (loc. upd. retry delay) with 15.0 seconds</DIV>
<DIV><0004> gsm48_mm.c:4083 (ms 1) Received 'MM_EVENT_CELL_SELECTED' event in state wait for RR connection (location updating)</DIV>
<DIV><0004> gsm48_mm.c:1055 We are in registered LAI as returning to MM IDLE</DIV>
<DIV><0004> gsm48_mm.c:892 new state wait for RR connection (location updating) -> MM IDLE, normal service</DIV>
<DIV><0003> gsm322.c:2433 Channel synched. (ARFCN=22, snr=13, BSIC=10)</DIV>
<DIV><0001> gsm322.c:2460 using DSC of 90</DIV>
<DIV><0003> gsm48_rr.c:4548 Channel provides data.</DIV>
<DIV>writing msgb to gsmtap fd: Connection refused</DIV>
<DIV>writing msgb to gsmtap fd: Connection refused</DIV>
<DIV><0001> gsm48_rr.c:609 MON: f=22 lev=-52 snr= 0 ber= 62 LAI=460 00 11a5 ID=629a</DIV>
<DIV>writing msgb to gsmtap fd: Connection refused</DIV>
<DIV><0001> gsm48_rr.c:2265 IMMEDIATE ASSIGNMENT:</DIV>
<DIV><0001> gsm48_rr.c:2286  (ta 1/553m ra 0x7f chan_nr 0x0e ARFCN 22 TS 6 SS 0 TSC 2)</DIV>
<DIV><0001> gsm48_rr.c:2291 Not for us, no request.</DIV>
<DIV>"</DIV>
<DIV> </DIV></DIV></DIV>
<DIV style="TEXT-INDENT: 2em">-it shows that LOCATION UPDATE REQUEST 
is faild and it will be retry, and use command "OsmocomBB# show ms" 
also can find that the mobile is trying hard to get location update 
successfully:</DIV>
<DIV style="TEXT-INDENT: 2em"> </DIV>
<DIV style="TEXT-INDENT: 4em">"</DIV>
<DIV style="TEXT-INDENT: 4em">
<DIV></DIV>
<DIV>OsmocomBB# show ms</DIV>
<DIV>MS '1' is up, MM connection active</DIV>
<DIV>  IMEI: 000000000000000</DIV>
<DIV>     IMEISV: 0000000000000000</DIV>
<DIV>     IMEI generation: fixed</DIV>
<DIV>  automatic network selection state: A1 trying RPLMN</DIV>
<DIV>  cell selection state: C3 camped normally</DIV>
<DIV>  radio ressource layer state: connection pending</DIV>
<DIV>  mobility management layer state: wait for RR connection (location updating)</DIV>
<DIV></DIV>
<DIV>OsmocomBB# show ms</DIV>
<DIV>MS '1' is up, service is normal</DIV>
<DIV>  IMEI: 000000000000000</DIV>
<DIV>     IMEISV: 0000000000000000</DIV>
<DIV>     IMEI generation: fixed</DIV>
<DIV>  automatic network selection state: A1 trying RPLMN</DIV>
<DIV>  cell selection state: C3 camped normally (ARFCN 22)</DIV>
<DIV>  radio ressource layer state: idle</DIV>
<DIV>  mobility management layer state: MM idle, normal service</DIV>
<DIV></DIV>
<DIV>OsmocomBB# show ms</DIV>
<DIV>MS '1' is up, service is normal</DIV>
<DIV>  IMEI: 000000000000000</DIV>
<DIV>     IMEISV: 0000000000000000</DIV>
<DIV>     IMEI generation: fixed</DIV>
<DIV>  automatic network selection state: A1 trying RPLMN</DIV>
<DIV>  cell selection state: C3 camped normally (ARFCN 22)</DIV>
<DIV>  radio ressource layer state: idle</DIV>
<DIV>  mobility management layer state: MM idle, normal service</DIV>
<DIV></DIV>
<DIV>OsmocomBB# show ms</DIV>
<DIV></DIV>
<DIV>MS '1' is up, MM connection active</DIV>
<DIV>  IMEI: 000000000000000</DIV>
<DIV>     IMEISV: 0000000000000000</DIV>
<DIV>     IMEI generation: fixed</DIV>
<DIV>  automatic network selection state: A1 trying RPLMN</DIV>
<DIV>  cell selection state: C3 camped normally</DIV>
<DIV>  radio ressource layer state: connection pending</DIV>
<DIV>  mobility management layer state: wait for RR connection (location updating)</DIV>
<DIV>"</DIV>
<DIV> </DIV></DIV>
<DIV style="TEXT-INDENT: 2em">-and in command osmocon terminal, i found the log 
may show the  LOCATION UPDATE REQUEST faild reasons.</DIV>
<DIV style="TEXT-INDENT: 2em"> </DIV>
<DIV style="TEXT-INDENT: 4em">"</DIV>
<DIV style="TEXT-INDENT: 4em">
<DIV>Received PROMPT1 from phone, responding with CMD</DIV>
<DIV>read_file(../../target/firmware/board/compal_e88/layer1.compalram.bin): file_size=53948, hdr_len=4, dnload_len=53955</DIV>
<DIV>got 1 bytes from modem, data looks like: 1b  .</DIV>
<DIV>got 1 bytes from modem, data looks like: f6  .</DIV>
<DIV>got 1 bytes from modem, data looks like: 02  .</DIV>
<DIV>got 1 bytes from modem, data looks like: 00  .</DIV>
<DIV>got 1 bytes from modem, data looks like: 41  A</DIV>
<DIV>got 1 bytes from modem, data looks like: 02  .</DIV>
<DIV>got 1 bytes from modem, data looks like: 43  C</DIV>
<DIV>Received PROMPT2 from phone, starting download</DIV>
<DIV>handle_write(): 4096 bytes (4096/53955)</DIV>
<DIV>handle_write(): 4096 bytes (8192/53955)</DIV>
<DIV>handle_write(): 4096 bytes (12288/53955)</DIV>
<DIV>handle_write(): 4096 bytes (16384/53955)</DIV>
<DIV>handle_write(): 4096 bytes (20480/53955)</DIV>
<DIV>handle_write(): 4096 bytes (24576/53955)</DIV>
<DIV>handle_write(): 4096 bytes (28672/53955)</DIV>
<DIV>handle_write(): 4096 bytes (32768/53955)</DIV>
<DIV>handle_write(): 4096 bytes (36864/53955)</DIV>
<DIV>handle_write(): 4096 bytes (40960/53955)</DIV>
<DIV>handle_write(): 4096 bytes (45056/53955)</DIV>
<DIV>handle_write(): 4096 bytes (49152/53955)</DIV>
<DIV>handle_write(): 4096 bytes (53248/53955)</DIV>
<DIV>handle_write(): 707 bytes (53955/53955)</DIV>
<DIV>handle_write(): finished</DIV>
<DIV>got 1 bytes from modem, data looks like: 1b  .</DIV>
<DIV>got 1 bytes from modem, data looks like: f6  .</DIV>
<DIV>got 1 bytes from modem, data looks like: 02  .</DIV>
<DIV>got 1 bytes from modem, data looks like: 00  .</DIV>
<DIV>got 1 bytes from modem, data looks like: 41  A</DIV>
<DIV>got 1 bytes from modem, data looks like: 03  .</DIV>
<DIV>got 1 bytes from modem, data looks like: 42  B</DIV>
<DIV>Received DOWNLOAD ACK from phone, your code is running now!</DIV>
<DIV></DIV>
<DIV></DIV>
<DIV>OSMOCOM Layer 1 (revision osmocon_v0.0.0-757-gc4483bf-modified)</DIV>
<DIV>======================================================================</DIV>
<DIV>Device ID code: 0xb4fb</DIV>
<DIV>Device Version code: 0x0000</DIV>
<DIV>ARM ID code: 0xfff3</DIV>
<DIV>cDSP ID code: 0x0128</DIV>
<DIV>Die ID code: 71c60b1d89021625</DIV>
<DIV>======================================================================</DIV>
<DIV>REG_DPLL=0x2413</DIV>
<DIV>CNTL_ARM_CLK=0xf0a1</DIV>
<DIV>CNTL_CLK=0xff91</DIV>
<DIV>CNTL_RST=0xfff3</DIV>
<DIV>CNTL_ARM_DIV=0xfff9</DIV>
<DIV>======================================================================</DIV>
<DIV>Power up simcard:</DIV>
<DIV></DIV>
<DIV></DIV>
<DIV>THIS FIRMWARE WAS COMPILED WITHOUT TX SUPPORT!!!</DIV>
<DIV>Assert DSP into Reset</DIV>
<DIV>Releasing DSP from Reset</DIV>
<DIV>Setting some dsp_api.ndb values</DIV>
<DIV>Setting API NDB parameters</DIV>
<DIV>DSP Download Status: 0x0001</DIV>
<DIV>DSP API Version: 0x0000 0x0000</DIV>
<DIV>Finishing download phase</DIV>
<DIV>DSP Download Status: 0x0002</DIV>
<DIV>DSP API Version: 0x3606 0x0000</DIV>
<DIV>LOST 1634!</DIV></DIV>
<DIV style="TEXT-INDENT: 4em">"</DIV>
<DIV style="TEXT-INDENT: 2em"> </DIV>
<DIV style="TEXT-INDENT: 4em">"</DIV>
<DIV style="TEXT-INDENT: 4em">
<DIV>SB2 (2663816:2): TOA=   26, Power= -60dBm, Angle=  132Hz</DIV>
<DIV>=> SB 0x003cf629: BSIC=10 fn=1331917(1004/15/ 1)=> DSP reports SB in bit that is 965199799 bits in the future?!?</DIV>
<DIV>Synchronize_TDMA</DIV>
<DIV>=> DSP reports FB in bit that is 965199776 bits in the future?!?</DIV>
<DIV>LOST 1908!</DIV>
<DIV>nb_cmd(0) and rxnb.msg != NULLL1CTL_PARAM_REQ (ta=0, tx_power=5)</DIV>
<DIV>L1CTL_RACH_REQ (ra=0x0a, offset=8 combined=0)</DIV>
<DIV>L1CTL_PARAM_REQ (ta=0, tx_power=5)</DIV>
<DIV>L1CTL_RACH_REQ (ra=0x0a, offset=236 combined=0)</DIV>
<DIV>L1CTL_PARAM_REQ (ta=0, tx_power=5)</DIV>
<DIV>L1CTL_RACH_REQ (ra=0x0d, offset=248 combined=0)</DIV>
<DIV>L1CTL_PARAM_REQ (ta=0, tx_power=5)</DIV>
<DIV>L1CTL_RACH_REQ (ra=0x06, offset=240 combined=0)</DIV>
<DIV>L1CTL_PARAM_REQ (ta=0, tx_power=5)</DIV>
<DIV>L1CTL_RACH_REQ (ra=0x04, offset=217 combined=0)</DIV>
<DIV>L1CTL_DM_REL_REQL1CTL_RESET_REQ: FULL!L1CTL_RESET_REQ: FULL!L1CTL_FBSB_REQ (arfcn=22, flags=0x7)</DIV>
<DIV>Starting FCCH RecognitionEMPTY</DIV>
<DIV>FB0 (1334018:5): TOA= 5040, Power= -57dBm, Angle= 2049Hz</DIV>
<DIV>FB1 (1334028:8): TOA= 8755, Power= -57dBm, Angle=  223Hz</DIV>
<DIV>  fn_offset=1334026 (fn=1334028 + attempt=8 + ntdma = 6)m  delay=8 (fn_offset=1334026 + 11 - fn=1334028 - 1</DIV>
<DIV>  scheduling next FB/SB detection task with delay 8</DIV>
<DIV>=>FB @ FNR 1334026 fn_offset=1334026 qbits=4836</DIV>
<DIV>Synchronize_TDMA</DIV>
<DIV>LOST 3717!</DIV>
<DIV>SB1 (2668059:1): TOA=   27, Power= -59dBm, Angle=   -9Hz</DIV>
<DIV>=> SB 0x0111f729: BSIC=10 fn=1334038(1006/ 4/31)=> DSP reports SB in bit that is 959894800 bits in the future?!?</DIV>
<DIV>Synchronize_TDMA</DIV>
<DIV>=> DSP reports FB in bit that is 959894777 bits in the future?!?</DIV>
<DIV>LOST 1909!</DIV>
<DIV>nb_cmd(0) and rxnb.msg != NULLL1CTL_RESET_REQ: FULL!EMPTY</DIV>
<DIV>L1CTL_FBSB_REQ (arfcn=22, flags=0x7)</DIV>
<DIV>Starting FCCH RecognitionFB0 (1337271:8): TOA= 9312, Power= -56dBm, Angle=-3405Hz</DIV>
<DIV>FB1 (1337282:9): TOA= 9999, Power= -56dBm, Angle= 5216Hz</DIV>
<DIV>  fn_offset=1337280 (fn=1337282 + attempt=9 + ntdma = 7)m  delay=8 (fn_offset=1337280 + 11 - fn=1337282 - 1</DIV>
<DIV>  scheduling next FB/SB detection task with delay 8</DIV>
<DIV>FB1 (1337302:11): TOA=12507, Power= -56dBm, Angle=  431Hz</DIV>
<DIV>  fn_offset=1337300 (fn=1337302 + attempt=11 + ntdma = 9)m  delay=8 (fn_offset=1337300 + 11 - fn=1337302 - 1</DIV>
<DIV>  scheduling next FB/SB detection task with delay 8</DIV>
<DIV>=>FB @ FNR 1337300 fn_offset=1337300 qbits=4844</DIV>
<DIV>Synchronize_TDMA</DIV>
<DIV>LOST 3719!</DIV>
<DIV>SB1 (2674604:1): TOA=   24, Power= -56dBm, Angle=  263Hz</DIV>
<DIV>=> SB 0x000af829: BSIC=10 fn=1337312(1008/ 2/41)=> DSP reports SB in bit that is 951713547 bits in the future?!?</DIV>
<DIV>Synchronize_TDMA</DIV>
<DIV>=> DSP reports FB in bit that is 951713524 bits in the future?!?</DIV>
<DIV>LOST 1905!</DIV>
<DIV>nb_cmd(0) and rxnb.msg != NULLL1CTL_PARAM_REQ (ta=0, tx_power=5)</DIV>
<DIV>L1CTL_RACH_REQ (ra=0x0f, offset=13 combined=0)</DIV>
<DIV>L1CTL_PARAM_REQ (ta=0, tx_power=5)</DIV>
<DIV>L1CTL_RACH_REQ (ra=0x0a, offset=233 combined=0)</DIV>
<DIV>L1CTL_PARAM_REQ (ta=0, tx_power=5)</DIV>
<DIV>L1CTL_RACH_REQ (ra=0x0a, offset=237 combined=0)</DIV>
<DIV>L1CTL_PARAM_REQ (ta=0, tx_power=5)</DIV>
<DIV>L1CTL_RACH_REQ (ra=0x0e, offset=240 combined=0)</DIV>
<DIV>L1CTL_PARAM_REQ (ta=0, tx_power=5)</DIV>
<DIV>L1CTL_RACH_REQ (ra=0x04, offset=241 combined=0)</DIV>
<DIV>L1CTL_DM_REL_REQL1CTL_RESET_REQ: FULL!L1CTL_RESET_REQ: FULL!L1CTL_FBSB_REQ (arfcn=22, flags=0x7)</DIV>
<DIV>Starting FCCH RecognitionFB0 (1339424:4): TOA= 3792, Power= -53dBm, Angle= 2044Hz</DIV>
<DIV>FB1 (1339434:8): TOA= 8755, Power= -52dBm, Angle=  295Hz</DIV>
<DIV>  fn_offset=1339432 (fn=1339434 + attempt=8 + ntdma = 6)m  delay=8 (fn_offset=1339432 + 11 - fn=1339434 - 1</DIV>
<DIV>  scheduling next FB/SB detection task with delay 8</DIV>
<DIV>=>FB @ FNR 1339432 fn_offset=1339432 qbits=4836</DIV>
<DIV>Synchronize_TDMA</DIV>
<DIV>LOST 3717!</DIV>
<DIV>"</DIV>
<DIV> </DIV></DIV>
<DIV style="TEXT-INDENT: 2em">-i found the value of LOST is too big, and i tried 
to look for reasons in codes and found  function "check_lost_frame()" 
below (in sync.c, lines 180 to 205). After read this code, i think it's delays 
of physical layer caused so so much LOST value.</DIV>
<DIV style="TEXT-INDENT: 2em"> </DIV>
<DIV style="TEXT-INDENT: 4em">"</DIV>
<DIV style="TEXT-INDENT: 4em">
<DIV>/* Lost TDMA interrupt detection.  This works by starting a hardware timer</DIV>
<DIV> * that is clocked by the same master clock source (VCTCXO).  We expect</DIV>
<DIV> * 1875 timer ticks in the duration of a TDMA frame (5000 qbits / 1250 bits) */</DIV>
<DIV></DIV>
<DIV>/* Timer for detecting lost IRQ */</DIV>
<DIV>#define TIMER_TICKS_PER_TDMA 1875</DIV>
<DIV>#define TIMER_TICK_JITTER 1</DIV>
<DIV></DIV>
<DIV>static int last_timestamp;</DIV>
<DIV></DIV>
<DIV>static inline void check_lost_frame(void)</DIV>
<DIV>{</DIV>
<DIV>int diff, timestamp = hwtimer_read(1);</DIV>
<DIV></DIV>
<DIV>if (last_timestamp < timestamp)</DIV>
<DIV>last_timestamp += (4*TIMER_TICKS_PER_TDMA);</DIV>
<DIV></DIV>
<DIV>diff = last_timestamp - timestamp;</DIV>
<DIV></DIV>
<DIV>/* allow for a bit of jitter */</DIV>
<DIV>if (diff < TIMER_TICKS_PER_TDMA - TIMER_TICK_JITTER ||</DIV>
<DIV>    diff > TIMER_TICKS_PER_TDMA + TIMER_TICK_JITTER)</DIV>
<DIV>printf("LOST %d!\n", diff);</DIV>
<DIV></DIV>
<DIV>last_timestamp = timestamp;</DIV>
<DIV>}</DIV>
<DIV>"</DIV></DIV>
<DIV style="TEXT-INDENT: 2em"> </DIV>
<DIV>4, here, i want some help to figure out whether physical delays caused 
big LOST value, and big LOST value caused LOCATION UPDATE REQUEST 
failed?</DIV>
<DIV>if it's the problem of the physical layer, i want to make sure which part 
<SPAN id=tran_1_4 onmouseover="LjHighlightAlign('#src_1_4,#tran_1_4')" 
onmouseout="LjUnhighlightAlign('#src_1_4,#tran_1_4')">should be</SPAN> 
held responsible:</DIV>
<DIV style="TEXT-INDENT: 2em">-is that the cheap RS232 com port to jack port 
data cable caused the delays?</DIV>
<DIV style="TEXT-INDENT: 2em">-or is the USB2 to RS232 converter caused the 
delays?</DIV>
<DIV style="TEXT-INDENT: 2em">-or is that some bugs in layer1.compalram.bin 
caused the delays?</DIV>
<DIV>i really want some experienced engineer to help me fix up the 
problem.</DIV>
<DIV> </DIV>
<DIV>Thanks!</DIV>
<DIV>Best Regards!</DIV>
<DIV>zheng</DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Verdana></FONT> </DIV>
<DIV align=left><FONT color=#c0c0c0 size=2 face=Verdana>2011-03-09 
</FONT></DIV><FONT size=2 face=Verdana>
<HR style="WIDTH: 122px; HEIGHT: 2px" align=left SIZE=2>
</FONT></BODY></HTML>