Project

General

Profile

Actions

Osmocon » History » Revision 27

« Previous | Revision 27/29 (diff) | Next »
steve-m, 02/19/2016 10:49 PM
typo



<pre>

It is also used to download a firmware or bootloader into the phone over the serial line, which is currently implemented for the [[MotorolaC123|CompalE88 (C118C120C121C123)] the [wikiMotorolaC155 CompalE99 (C155)]].

Supported Bootloaders are currently the [[CompalRamloader]] and the [[HardwareCalypsoRomloader]].

After uploading a firmware, it turns into an HDLC mulitplexer/demultiplexer, allowing for multichannel communication with the device.

The phones console is on one such channel and will be redirected to the terminal (stdout) on which osmocom runs.

Several other HDLC channels are accessible by means of the following unix domain sockets:
* /tmp/osmocom_l2 for the [[L1A_L23_Interface]] as used by [[mobile]], [[ccch_scan]] and other host programs
* /tmp/osmocon_loader for the [[Bootloader]]

<pre>
<code class="graphviz">
digraph G {
  graph [rankdir = LR];
  Phone -> [[SerialPort]] [ label = "RS232" dir=both ];
  [[SerialPort]] -> osmocon [ label = "/dev/ttyUSB*" dir=both ];
  layer23 -> osmocon [label = "unix socket" dir=both ];
  osmoload -> osmocon [label = "unix socket" dir=both ];
  firmware -> osmocon [label = "file read" ];
  osmocon -> terminal [label = "stdout" ];
  osmocon [ shape = doublecircle ];
  layer23 [ shape = circle label = "mobile"];
  osmoload [ shape = circle];
  { rank = same; terminal layer23 osmoload firmware }
}
</code></pre>

h2. General Usage

* *Connect your phone* UART to a serial port of your PC, using a [[HardwareSerialCable]] (3.3V RS232 on 2.5mm headphone jack)
* *Choose firmware* you have to load, depending on a host program you want to run (see [[Applications]])
* *Load firmware* to the phone, running osmocon like below. Fill in phone type and firmware name with your values. See [[HardwarePhones]] if you need to look up the phone type.
<pre>
$ ./osmocon -p /dev/ttyUSB0 -m c123xor ../../target/firmware/board/PHONE_TYPE/FIRMWARE.compalram.bin
</code>
* Make sure your phone is off. Briefly press the power-on button of your phone (short push, not like a regular phone boot!). Avoid charging the phone while using osmocon, this can inhibit the loader. * Observe output resembling the following
got 2 bytes from modem, data looks like: 2f c8 
got 5 bytes from modem, data looks like: 1b f6 02 00 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.compalram.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)
======================================================================
Running on compal_e88 in environment ramload

* You can now interact with the phone through application programs like mobile, ccch_scan, osmoload, and others, depending on the firmware you loaded.

Command Line Parameters

Usage: ./osmocon [ -v | -h ] [ -d [t][r] ] [ -p /dev/ttyXXXX ]
                 [ -s /tmp/osmocom_l2 ]
                 [ -l /tmp/osmocom_loader ]
                 [ -m {c123,c123xor,c140,c140xor,c155,romload,mtk} ]
                 [ -c /to-be-chainloaded-file.bin ]
                 [ -i beacon-interval (mS) ]
                  file.bin

Show the version of the program

<pre>

Get a short help message

<pre>

<pre>

<pre>

Specify the Serial Port to which your phone is connected, e.g. /dev/ttyUSB0 for the first USB-Serial converter in your system

<pre>

Specify the file system path for the unix domain socket to be used for L1CTL

<pre>

Specify the file system path for the unix domain socket to be used for interaction with [[osmoload]]

<pre>

Specify the beacon interval. On some devices default value should be adjusted in order for loading to work (for example Neo Freerunner works wit -i 13)

<pre>

Select the protocol to be used for interaction with the phone:
<pre>
<pre>
<pre>
<pre>
<pre>
<pre>
<pre>

h2. Known Problems

<pre>
Files (0)

Updated by steve-m about 8 years ago · 27 revisions

Add picture from clipboard (Maximum size: 48.8 MB)