Osmocon » History » Revision 9
Revision 8 (Anonymous, 02/19/2016 10:49 PM) → Revision 9/29 (Anonymous, 02/19/2016 10:49 PM)
[[PageOutline]] = osmocon = Osmocon is a console tool for our baseband implementation. It is used to download a firmware or bootloader into the phone over the serial interface, which is currently implemented for the CompalE88 and the CompalE99. After uploading a firmware, it turns into an HDLC mux/demux, allowing multichannel communication with the device. The phones console is on one such channel and will be redirected to the terminal on which osmocom runs. Several other HDLC channels are accessible by means of the following unix domain sockets: * /tmp/osmocom_l2 for the [wiki:L1A_L23_Interface] * /tmp/osmocon_loader for the [wiki:Bootloader] == General Usage == * Connect your Compal phone to a serial port of your PC, using a [wiki:CalypsoSerialCable] (3.3V RS232 on 2.5mm headphone jack) * Determine what you want to run (see [wiki:Applications]) * Start the console osmocon program like this, filling in your phone type and binary path: this {{{ $ ./osmocon -m c123xor -p /dev/ttyUSB0 -m c123xor ../../target/firmware/board/compal_e88/loader.ramload.bin /path/to/your/object_code.bin }}} * Push the power-on button of your phone (short push, not like a regular phone boot!) * Observe output resembling the following output: {{{ got 2 1 bytes from modem, data looks like: 2f c8 04 got 5 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 read_file(../../target/firmware/board/compal_e88/loader.ramload.bin): file_size=13404, hdr_len=4, dnload_len=13411 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 handle_write(): 1023 bytes (1023/13411) handle_write(): 768 bytes (1791/13411) handle_write(): 768 bytes (2559/13411) handle_write(): 768 bytes (3327/13411) handle_write(): 768 bytes (4095/13411) handle_write(): 768 bytes (4863/13411) handle_write(): 768 bytes (5631/13411) handle_write(): 768 bytes (6399/13411) handle_write(): 768 bytes (7167/13411) handle_write(): 768 bytes (7935/13411) handle_write(): 768 bytes (8703/13411) handle_write(): 768 bytes (9471/13411) handle_write(): 768 bytes (10239/13411) handle_write(): 768 bytes (11007/13411) handle_write(): 768 bytes (11775/13411) handle_write(): 768 bytes (12543/13411) handle_write(): 768 bytes (13311/13411) handle_write(): 100 bytes (13411/13411) handle_write(): finished 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! OSMOCOM Calypso loader (revision f45c5ee-modified) }}} * Observe further output of the serial port generated by the code you have downloaded {{{ Hello World from C program code ====================================================================== Running on compal_e88 in environment ramload 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 == In For some situations (like, apparently, using USB-Serial converters (most notably FTDI serial based cables), you might need the {{{-m c123}}} mode for your [wiki:MotorolaC123] instead of mode, not the normal {{{-m c123xor}}}. c123xor}}} mode.