Osmocon » History » Version 14
laforge, 02/19/2016 10:49 PM
add graphviz
1 | 2 | laforge | [[PageOutline]] |
---|---|---|---|
2 | 6 | laforge | = osmocon = |
3 | 1 | laforge | |
4 | 8 | laforge | Osmocon is a console tool for our baseband implementation. |
5 | |||
6 | 12 | steve-m | 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.[[BR]] |
7 | Supported Bootloaders are currently the [wiki:CompalRamloader] and the [wiki:CalypsoRomloader]. |
||
8 | 8 | laforge | |
9 | After uploading a firmware, it turns into an HDLC mux/demux, allowing multichannel communication with the device. |
||
10 | |||
11 | The phones console is on one such channel and will be redirected to the terminal on which osmocom runs. |
||
12 | |||
13 | Several other HDLC channels are accessible by means of the following unix domain sockets: |
||
14 | * /tmp/osmocom_l2 for the [wiki:L1A_L23_Interface] |
||
15 | * /tmp/osmocon_loader for the [wiki:Bootloader] |
||
16 | |||
17 | 14 | laforge | {{{ |
18 | #!graphviz |
||
19 | digraph G { |
||
20 | graph [rankdir = LR]; |
||
21 | Phone -> SerialPort [ label = "RS232" dir=both ]; |
||
22 | SerialPort -> osmocon [ label = "/dev/ttyUSB*" dir=both ]; |
||
23 | layer23 -> osmocon [label = "unix socket" dir=both ]; |
||
24 | osmoload -> osmocon [label = "unix socket" dir=both ]; |
||
25 | firmware -> osmocon [label = "file read" ]; |
||
26 | osmocon -> terminal [label = "stdout" ]; |
||
27 | osmocon [ shape = doublecircle ]; |
||
28 | layer23 [ shape = circle ]; |
||
29 | osmoload [ shape = circle ]; |
||
30 | } |
||
31 | }}} |
||
32 | |||
33 | 9 | laforge | == General Usage == |
34 | 1 | laforge | |
35 | * Connect your Compal phone to a serial port of your PC, using a [wiki:CalypsoSerialCable] (3.3V RS232 on 2.5mm headphone jack) |
||
36 | 9 | laforge | * Determine what you want to run (see [wiki:Applications]) |
37 | * Start the console like this, filling in your phone type and binary path: |
||
38 | 1 | laforge | {{{ |
39 | 13 | laforge | $ ./osmocon -p /dev/ttyUSB0 -m c123xor ../../target/firmware/board/compal_e88/loader.compalram.bin |
40 | 1 | laforge | }}} |
41 | * Push the power-on button of your phone (short push, not like a regular phone boot!) |
||
42 | 9 | laforge | * Observe output resembling the following |
43 | 1 | laforge | {{{ |
44 | 9 | laforge | got 2 bytes from modem, data looks like: 2f c8 |
45 | got 5 bytes from modem, data looks like: 1b f6 02 00 41 |
||
46 | 1 | laforge | got 1 bytes from modem, data looks like: 01 |
47 | got 1 bytes from modem, data looks like: 40 |
||
48 | Received PROMPT1 from phone, responding with CMD |
||
49 | 13 | laforge | read_file(../../target/firmware/board/compal_e88/loader.compalram.bin): file_size=13404, hdr_len=4, dnload_len=13411 |
50 | 1 | laforge | got 1 bytes from modem, data looks like: 1b |
51 | got 1 bytes from modem, data looks like: f6 |
||
52 | got 1 bytes from modem, data looks like: 02 |
||
53 | got 1 bytes from modem, data looks like: 00 |
||
54 | got 1 bytes from modem, data looks like: 41 |
||
55 | got 1 bytes from modem, data looks like: 02 |
||
56 | got 1 bytes from modem, data looks like: 43 |
||
57 | Received PROMPT2 from phone, starting download |
||
58 | 9 | laforge | handle_write(): 1023 bytes (1023/13411) |
59 | handle_write(): 768 bytes (1791/13411) |
||
60 | handle_write(): 768 bytes (2559/13411) |
||
61 | handle_write(): 768 bytes (3327/13411) |
||
62 | handle_write(): 768 bytes (4095/13411) |
||
63 | handle_write(): 768 bytes (4863/13411) |
||
64 | handle_write(): 768 bytes (5631/13411) |
||
65 | handle_write(): 768 bytes (6399/13411) |
||
66 | handle_write(): 768 bytes (7167/13411) |
||
67 | handle_write(): 768 bytes (7935/13411) |
||
68 | handle_write(): 768 bytes (8703/13411) |
||
69 | handle_write(): 768 bytes (9471/13411) |
||
70 | handle_write(): 768 bytes (10239/13411) |
||
71 | handle_write(): 768 bytes (11007/13411) |
||
72 | handle_write(): 768 bytes (11775/13411) |
||
73 | handle_write(): 768 bytes (12543/13411) |
||
74 | handle_write(): 768 bytes (13311/13411) |
||
75 | handle_write(): 100 bytes (13411/13411) |
||
76 | handle_write(): finished |
||
77 | 1 | laforge | got 1 bytes from modem, data looks like: 1b |
78 | got 1 bytes from modem, data looks like: f6 |
||
79 | got 1 bytes from modem, data looks like: 02 |
||
80 | got 1 bytes from modem, data looks like: 00 |
||
81 | got 1 bytes from modem, data looks like: 41 |
||
82 | got 1 bytes from modem, data looks like: 03 |
||
83 | got 1 bytes from modem, data looks like: 42 |
||
84 | Received DOWNLOAD ACK from phone, your code is running now! |
||
85 | 9 | laforge | |
86 | |||
87 | OSMOCOM Calypso loader (revision f45c5ee-modified) |
||
88 | 1 | laforge | ====================================================================== |
89 | 9 | laforge | Running on compal_e88 in environment ramload |
90 | |||
91 | 1 | laforge | }}} |
92 | 10 | laforge | * You can now interact with the phone through [wiki:layer23] and [wiki:osmoload], depending on the firmware you loaded. |
93 | |||
94 | 1 | laforge | |
95 | == Known Problems == |
||
96 | 4 | roh | |
97 | 9 | laforge | In some situations (like, apparently, using FTDI serial cables), you might need the {{{-m c123}}} mode for your [wiki:MotorolaC123] instead of the normal {{{-m c123xor}}}. |