phranky  0.01
handle calls and text messages for openmoko gta02
The phranky documentation


What is phranky?

phranky is a phone/SMS application written from scratch in c.
the gui uses Xlib.

What can you do with phranky?

What does it look like?

check out the video at: youtube

Why phranky?

For most of the features of the GTA02 there is already good software.
gpsd for the gps, bluez for bluetooth, pppd for gprs, wpa_supplicant for wifi, and alsa for the soundcard.
the only thing missing was a simple phone application to handle phonecalls or
text messages.
So inspired by the great work of the FSO team and gsmd, i decided to
write a simple dialer/sms handler, with just a few commands and signals.
i tried to have as little dependencies as possible (no dbus, framework, GTK etc).

What is used?

Phranky consists of 4 individual programs,
one for handling phone calls, one for handling textmessages,
one for talking to the modem and one for notifying the user of important events.
(incoming phonecall or incoming textmessage)
the programs are reading commands from stdin and printing responses on stdout
this makes it easy to use a script to read or write a text message
or answer/start a phonecall.
it needs an X server for the notifications and the menu,
without a window manager or with a scaling WM like matchbox.


If you know your freerunner boots fine from a uSD card,
then the easiest way is probably to use the ready made images at:
root image
( Thanks to Timo Jyrinki for providing the preinstalled minimal image. The root password is changeme )
on my freerunner the combination qi and a 2.6.34 kernel
gave a lot of problems with several uSD cards specially when suspending/resuming

take a microSD card (>= 1G) and on a linux pc format it as one partition:
/dev/sdx1 Linux (83)

mkdir -p /tmp/phranky/root

mke2fs /dev/sdx1
eject /dev/sdx
remove the uSD card and insert the card again

mount /dev/sdx1 /tmp/phranky/root

cd /tmp/phranky/root
tar -xJvpf /path/to/root.001.tar.xz
cd /

umount /tmp/phranky/root
eject /dev/sdx

Put the uSD card in the freerunner
Make sure the SIM card does not ask for a PIN on startup (there is no PIN dialog).
and power on the Freerunner

Installation on QtMoko

You can also use or try it if you have QtMoko installed (tested on V39)
If you not have done so already, setup Qx:
-1 Open Main Menu by clicking on the green Q-Topia "Q"-Box.
-2 Open Applications (4 Boxes, red, yellow, green, blue)
-3 Scroll down and open Qx
-4 Select the application that needs the X-Server (e.g. xterm)
And install the Xorg server.
(Make sure you have a working internet connection on the FR)

Ssh into the FR and install some more needed software:
apt-get update
apt-get -y install make gcc libasound2-dev libx11-dev xfonts-75dpi xinit x11-apps
rm /var/cache/apt/archives/*.deb
mkdir -p /home/phranky/gta02/messages
sed -i 's/list=/&phranky,/' /opt/qtmoko/etc/qx/favourites.conf
Download the phranky software here
And put it somewhere on the FR (e.g. /tmp ) (revision 49)
make sure there is no .initrc or .xserverrc in the home directory of root.
cd /
tar -xJvpf /tmp/home.001.tar.xz
On the FR quit Qx and start it again to launch phranky.
to return to QtMoko, use the shutdown button in the menu and restart the FR



I need to clean up a lot of duplicate functions and tidy up left and right.
well documented patches are highly appreciated, as are comments on both
functionality and programming skills. ( this is one of my first exercises in c ...)
please send them to the openmoko ML ( community AT lists D0T openmoko D0T org )