Project

General

Profile

OpenMoko » History » Version 8

laforge, 02/21/2016 10:25 AM

1 1 plotr
Open source phone project: see http://wiki.openmoko.org/wiki/Main_Page for details.
2 1 plotr
3 7 gnutoo
4 7 gnutoo
h2. How to load osmocom-bb from the phone Application CPU:
5 7 gnutoo
6 2 daves
Osmocom can be run directly on the phone. The communication flow is:
7 2 daves
8 8 laforge
!osmocon-on-OpenMoko.png!
9 1 plotr
10 8 laforge
For details see [[osmocon]] and [[CalypsoRomloader]]. IP networking between the host and the phone must be set up.
11 1 plotr
12 1 plotr
13 7 gnutoo
h3. On the phone:
14 7 gnutoo
15 7 gnutoo
16 7 gnutoo
* disable ogsmd, ousaged, ophoned via /etc/frameworkd.conf
17 7 gnutoo
* prevent fsogsmd from accessing modem by commenting following variables in /etc/freesmartphone/conf/GTA02/fsogsmd.conf:
18 7 gnutoo
*** device_port
19 7 gnutoo
*** modem_access
20 7 gnutoo
* re-check that nothing uses the modem: fuser /dev/ttySAC0
21 7 gnutoo
* open three SSH terminals to the phone
22 7 gnutoo
* transfer layer1.highram.bin and osmocon binary to the phone
23 7 gnutoo
* in the first terminal, make L2 socket externally available via socat:
24 7 gnutoo
<pre>
25 1 plotr
socat -v -x tcp-l:16661,reuseaddr,fork unix-connect:/tmp/osmocom_l2
26 7 gnutoo
</pre>
27 7 gnutoo
* in the second terminal, run osmocon:
28 7 gnutoo
<pre>
29 1 plotr
./osmocon -i 13 -m romload -p /dev/ttySAC0 layer1.highram.bin
30 7 gnutoo
</pre>
31 7 gnutoo
* in the third terminal, turn power off/on:
32 7 gnutoo
<pre>
33 1 plotr
echo 0 >/sys/bus/platform/devices/gta02-pm-gsm.0/power_on && echo 1 >/sys/bus/platform/devices/gta02-pm-gsm.0/power_on
34 7 gnutoo
</pre>
35 1 plotr
36 2 daves
37 7 gnutoo
h3. on the host machine
38 7 gnutoo
39 7 gnutoo
40 7 gnutoo
* Connect the socket:
41 7 gnutoo
<pre>
42 2 daves
socat -v -x unix-l:/var/tmp/l2,fork  tcp:192.168.7.2:16661,fork
43 7 gnutoo
</pre>
44 1 plotr
Note: 192.168.7.2 is default address of the device when you use shr-core linux distribution.
45 1 plotr
46 4 gnutoo
After this you can run various tools on host machine, for example:
47 7 gnutoo
<pre>
48 5 gnutoo
./cell_log -s /var/tmp/l2 -l /var/tmp/osmocom.log
49 7 gnutoo
</pre>
50 4 gnutoo
51 7 gnutoo
52 7 gnutoo
h2. How to load osmocom-bb from a computer
53 7 gnutoo
54 4 gnutoo
Alternatively you can also load a firmware on the openmoko modem from your computer, without needing to cross compile or install something on the phone CPU running GNU/Linux.
55 4 gnutoo
56 7 gnutoo
* like with the previous explanations be sure that nothing access the modem.
57 7 gnutoo
* Then run the following command on the phone:
58 7 gnutoo
<pre>
59 4 gnutoo
echo 1 > /sys/bus/platform/devices/gta02-pm-gsm.0/download
60 7 gnutoo
</pre>
61 4 gnutoo
That will connect the second serial port of the modem(named IRDA) to the audio jack.
62 7 gnutoo
* Then connect a 3.3V serial cable(a normal serial port will probably kill your modem because of the higher voltage) to the audio jack(for the pins you can refer to the schematics of the phone that are freely available)
63 4 gnutoo
Then on a computer do(replace /dev/ttyUSB0 by your computer serial port):
64 7 gnutoo
<pre>
65 4 gnutoo
./osmocon -i 13 -m romload -p /dev/ttyUSB0 layer1.highram.bin
66 7 gnutoo
</pre>
67 1 plotr
And back on the phone do:
68 7 gnutoo
<pre>
69 1 plotr
echo 0 >/sys/bus/platform/devices/gta02-pm-gsm.0/power_on && echo 1 >/sys/bus/platform/devices/gta02-pm-gsm.0/power_on
70 7 gnutoo
</pre>
71 1 plotr
That will load the firmware, and you will be able to interact with it from your computer like if it was a regular supported(by osmocom-bb) feature phone.
Add picture from clipboard (Maximum size: 48.8 MB)