Project

General

Profile

Osmocon » History » Revision 3

Revision 2 (laforge, 02/19/2016 10:49 PM) → Revision 3/29 (Anonymous, 02/19/2016 10:49 PM)

[[PageOutline]] 
 = compal_dnload = 

 Using compal_dnload on your (Linux) PC, you can download arbitrary object code into your Compal-made Calypso-based phone. 

 It uses the protocol described at [wiki:CompalRamloader] to get object code downloaded and executed in your phone. 

 == Usage == 

  * Connect your Compal phone to a serial port of your PC, using a [wiki:CalypsoSerialCable] (3.3V RS232 on 2.5mm headphone jack) 
  * Start the compal_dnload program like this 
 {{{ 
 $ ./compal_dnload /path/to/your/object_code [ /dev/ttyUSBn ] 
 }}} 
  * Push the power-on button of your phone (short push, not like a regular phone boot!) 
  * Observe the following output: 
 {{{ 
 got 1 bytes from modem, data looks like: 04  
 got 1 bytes from modem, data looks like: 81  
 got 1 bytes from modem, data looks like: 1b  
 got 1 bytes from modem, data looks like: f6  
 got 1 bytes from modem, data looks like: 02  
 got 1 bytes from modem, data looks like: 00  
 got 1 bytes from modem, data looks like: 41  
 got 1 bytes from modem, data looks like: 01  
 got 1 bytes from modem, data looks like: 40  
 Received PROMPT1 from phone, responding with CMD 
 got 1 bytes from modem, data looks like: 1b  
 got 1 bytes from modem, data looks like: f6  
 got 1 bytes from modem, data looks like: 02  
 got 1 bytes from modem, data looks like: 00  
 got 1 bytes from modem, data looks like: 41  
 got 1 bytes from modem, data looks like: 02  
 got 1 bytes from modem, data looks like: 43  
 Received PROMPT2 from phone, starting download 
 got 1 bytes from modem, data looks like: 1b  
 got 1 bytes from modem, data looks like: f6  
 got 1 bytes from modem, data looks like: 02  
 got 1 bytes from modem, data looks like: 00  
 got 1 bytes from modem, data looks like: 41  
 got 1 bytes from modem, data looks like: 03  
 got 1 bytes from modem, data looks like: 42  
 Received DOWNLOAD ACK from phone, your code is running now! 
 }}} 
  * Observe further output of the serial port generated by the code you have downloaded 
 {{{ 
 Hello World from C program code 
 ====================================================================== 
 Device ID code: B4FB 
 Device Version code: 0000 
 ARM ID code: FFF3 
 cDSP ID code: 0128 
 Die ID code: 6397191EFA039BE7 
 ====================================================================== 
 REG_DPLL=2002 
 CNTL_ARM_CLK=F081 
 CNTL_CLK=FF51 
 CNTL_RST=FFF7 
 CNTL_ARM_DIV=FFF9 
 ====================================================================== 
 REG_DPLL=2193 
 CNTL_ARM_CLK=F081 
 CNTL_CLK=FF51 
 CNTL_RST=FFF7 
 CNTL_ARM_DIV=FFF9 
 ====================================================================== 
 Releasing DSP from Reset 
 Loading initial DSP bootcode 
 Releasing DSP from Reset 
 Setting some api_ndb values 
 Setting API NDB parameters 
 DSP Download Status: 0001 
 DSP API Version: 0DC4 6308 
 Finishing download phase 
 DSP Download Status: 0002 
 DSP API Version: 3606 0000 
 }}} 

 == Known Problems == 

 Somehow we're not always getting the timing quite right.    If you never get the PROMPT2 or DOWNLOAD ACK, you might 
 be affected by this bug. 

 The bug seems to resolve around the following line in the source.    Try to comment it out and recompile: 
 {{{ 
         /* write some dummy character that is not used */ 
         write(serial_fd, &running_xor, 1); 
 }}} 

 In my case the above mentioned workaround does not work. I tried even to run the compal_dnload with RealTime-Priority but it does not help. 
 {{{ 
 ionice -c1 -p $(pidof compal_dnload) 
 }}} 

 Any additional help to resolve this bug is mostly welcome! 
Add picture from clipboard (Maximum size: 48.8 MB)