QtMoko

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Data Safety / Boot Errors)
m (Install Script: Correct syncal script where some special caracters in $vPWD could make bugs and there was a "l" instead of "1")
 
(16 intermediate revisions by 2 users not shown)
Line 164: Line 164:
 
Navit installation uses Festival Lite for Speech synthesis look for the following string in navit.xml:
 
Navit installation uses Festival Lite for Speech synthesis look for the following string in navit.xml:
 
   flite -t "%s"
 
   flite -t "%s"
===== Navit Installation =====
+
===== Navit Installation (Qtmoko Version 47) =====
 +
First add the squeeze-backports to your /etc/apt/sources.list .<br>
 +
Thereafter install the following packages:
 +
  apt-get update
 +
  apt-get -t squeeze-backports install flite navit gpsd
 +
I do not know if this still necessary but in previous versions you needed to point gpsd to the right device which in case of the GTA02 is /dev/ttySAC1:
 +
  dpkg-reconfigure gpsd
 +
and then:
 +
  yes
 +
  no
 +
  /dev/ttySAC1
 +
  OK
 +
  OK
 +
 
 +
so you can check with:
 +
  cat /etc/default/gpsd
 +
  # Default settings for gpsd.
 +
  # Please do not edit this file directly - use `dpkg-reconfigure gpsd' to
 +
  # change the options.
 +
  START_DAEMON="true"
 +
  GPSD_OPTIONS=""
 +
  DEVICES="/dev/ttySAC1"
 +
  USBAUTO="false"
 +
  GPSD_SOCKET="/var/run/gpsd.sock"
 +
 
 +
Now to check if everything is working go to QX in Qtmoko, toggle the Favourites until the navit icon shows up, tick the box on the left to the icon to make it a favourite, check favourites again, click on navit and go to settings, use: window manager, fullscreen, and gpsd, launch navit
 +
To check if this also launches the gps receiver open a terminal and do:
 +
# cat /dev/ttySAC1
 +
and you should be seeing some numbers.
 +
 
 +
last but not least edit the navit.xml to enable the flite speech part which is commented out and paste an OSD layout section from the navit homepage which you like in the osd section in navit.xml, then enable the mapset for some XYZ.bin mapfile which you get with the navit planet extrator and adjust the link to properly point to that file. make sure this mapset is the only one which is enabled!
 +
 
 +
===== Navit Installation (Qtmoko Version XY) =====
 
If you want to install e.g. the application [[Navit]], you have to install the following packages. Navit needs and X-Server and it will run under [[QX]].
 
If you want to install e.g. the application [[Navit]], you have to install the following packages. Navit needs and X-Server and it will run under [[QX]].
 
   # apt-get install apt-utils
 
   # apt-get install apt-utils
Line 261: Line 293:
 
<pre>
 
<pre>
 
#!/bin/sh
 
#!/bin/sh
vUser="myusername"
+
vUser='myusername'
vPWD="mypassword"
+
vPWD='mypassword'
vICS1="https://www.example.org/caldav/calendar1.ics"
+
vICS1='https://www.example.org/caldav/calendar1.ics'
vICS2="https://www.example.org/caldav/calendar2.ics"
+
vICS2='https://www.example.org/caldav/calendar2.ics'
remotesync4ics2openmoko.sh -u $vUser -p $vPWD $vICSl $vICS2
+
remotesync4ics2openmoko.sh -u "$vUser" -p "$vPWD" "$vICS1" "$vICS2"
 
</pre>
 
</pre>
 
Please edit the file <tt>syncal</tt> and modify the username and password for accessing ics-file on a remote groupware server, where your iCal-file is stored.
 
Please edit the file <tt>syncal</tt> and modify the username and password for accessing ics-file on a remote groupware server, where your iCal-file is stored.
Line 323: Line 355:
 
   /usr/local/bin/synccal
 
   /usr/local/bin/synccal
 
with your confidential username, password and file URL for the remote ics files. You can import more than one remote ICS-files, so 2 variables for file URLs are defined. Change that to your appropriate number of remote ICS-files. See <tt>remotesync4ics2openmoko.sh</tt> for further details. If you do not want to store the password in the script for security reasons you can use [http://xdialog.free.fr xdialog] for entering the <tt>vPWD</tt> via user interface (e.g. [http://xdialog.free.fr/inputbox.gif input box]).
 
with your confidential username, password and file URL for the remote ics files. You can import more than one remote ICS-files, so 2 variables for file URLs are defined. Change that to your appropriate number of remote ICS-files. See <tt>remotesync4ics2openmoko.sh</tt> for further details. If you do not want to store the password in the script for security reasons you can use [http://xdialog.free.fr xdialog] for entering the <tt>vPWD</tt> via user interface (e.g. [http://xdialog.free.fr/inputbox.gif input box]).
 +
 
===Setting up a Groupware Server for testing===
 
===Setting up a Groupware Server for testing===
 
If you want to setup your own groupware server for testing on your own Linux Box, you can try [http://www.citadel.org CitaDel]. Accessing the remote ics-file are explained on the homepage of [http://www.citadel.org/doku.php/faq:favoriteclient:what_url_s_do_i_use?s=sunbird http://www.citadel.org].
 
If you want to setup your own groupware server for testing on your own Linux Box, you can try [http://www.citadel.org CitaDel]. Accessing the remote ics-file are explained on the homepage of [http://www.citadel.org/doku.php/faq:favoriteclient:what_url_s_do_i_use?s=sunbird http://www.citadel.org].
Line 376: Line 409:
 
* Install MP3-codec
 
* Install MP3-codec
 
* reboot you freerunner
 
* reboot you freerunner
 +
 +
== Video ==
 +
=== Transcoding for  240x320 with Gamma Correction===
 +
The 240x320 mode on freerunner has "odd" colors. To adjust this you can run:
 +
 +
  mencoder -really-quiet -oac pcm -ovc lavc -lavcopts vcodec=ffvhuff -vf eq2=1:1:0:1:1.19:1.19:1.44 -vf scale=320:240,rotate=1 -o - "$@" | ffmpeg2theora -V 256 -A 32 -H 22050 -c 1 -o - - 2> dev/null | dd bs=8192 iflag=fullblock 2> /dev/null
 +
 +
where 1.19, 1.19 and 1.44 are the gamma values for red, green and blue.
 +
 +
=== Transcoding for  480x640===
 +
GTA02 can't play ''native'' 480x640 video - processor is good enough for decoding it, but the graphics card bus is too slow to get the information through to have a decent framerate. 240x320 is only a fourth of that information and this does work even when being scaled to 480x640 to run fullscreen.
  
 
== Error Handling and Workarounds ==
 
== Error Handling and Workarounds ==
Line 494: Line 538:
 
== SVG Keyboards (from QtMoko v45 onwards) ==
 
== SVG Keyboards (from QtMoko v45 onwards) ==
 
Since QtMoko v45 you can customize your keyboard via simple svg files which can be easily edited in inkscape.
 
Since QtMoko v45 you can customize your keyboard via simple svg files which can be easily edited in inkscape.
Here is the original post:
+
Here is the original explications from Radek on the list (see [http://lists.openmoko.org/pipermail/community/2012-June/067108.html this mail]):
  
''Layouts are completely customizable. You can easily change key size, position,  
+
''Layouts are completely customizable. You can easily change key size, position, background. It's very easy to add international characters and new layouts. Just have a look at /opt/qtmoko/etc/im/svgkbd/ The layouts are normal svg images. You can use inkscape to open and edit them. It should be very clear what to do. Only thing to explain is how you should name the key XML elements. In Inkscape go to Edit->XML editor and click on key. The element name must be in form:''
background. It's very easy to add international characters and new layouts.  
+
Just have a look at /opt/qtmoko/etc/im/svgkbd/ The layouts are normal svg  
+
images. You can use inkscape to open and edit them. It should be very clear  
+
what to do. Only thing to explain is how you should name the key XML elements.  
+
In Inkscape go to Edit->XML editor and click on key. The element name must be  
+
in form:
+
  
 
key_QtKeycode_unicode
 
key_QtKeycode_unicode
  
For possible QtKeycode values check this link [http://qt-project.org/doc/qt-4.8/qt.html#Key-enum qt-keycodes] and for unicode values use  
+
''For possible QtKeycode values check this link [http://qt-project.org/doc/qt-4.8/qt.html#Key-enum qt-keycodes] and for unicode values use  
your favourite unicode character map.
+
your favourite unicode character map.''
''
+
 
 +
If you want to create a keyboard layout yourself for the abc.svg it is easiest to start with the abc_portrait.svg or abc_landscape.svg DE_de.tar.gz as in those svg files the keys all have an absolute xy position and are all automatically centered, so you can easily change the keysize by chaning the 24px value in the svg with any value you's prefer. They also have exculsively unicode characters which makes moving the keys around a bit easier. The portrait has 6 rows and the landscape keyboard has 4 rows of keys.
  
 
===Manual installation===
 
===Manual installation===
Line 514: Line 553:
 
If you want to keep them backup everything in root@192.168.0.202:/opt/qtmoko/etc/im/svgkbd/
 
If you want to keep them backup everything in root@192.168.0.202:/opt/qtmoko/etc/im/svgkbd/
  
To install the keyboard download [[File:DE de.tar.gz]], go to your download directory and use
+
To install the keyboard download the tar gz file desired (see below), go to your download directory and use
  
 
   tar xvzf DE_de.tar.gz && scp DE_de/* root@192.168.0.202:/opt/qtmoko/etc/im/svgkbd/
 
   tar xvzf DE_de.tar.gz && scp DE_de/* root@192.168.0.202:/opt/qtmoko/etc/im/svgkbd/
Line 522: Line 561:
 
Do not forget to restart QtMoko afterwards.
 
Do not forget to restart QtMoko afterwards.
  
====DE_de Layout====
+
====DE_de Layouts====
 +
These layouts provide a portrait or a landscape mode for the abc.svg keyboard (more a SMS keyboard now) and abc_shift.svg keyboard. The idea was to be as consistent with the standard querty/quertz layout our brain is used to, so only the qwe and the arrows were moved to different positions. Everything else is pretty much in place though as there are too many keys for portrait mode the upper two rows have been split in two.<br> The querty keyboards are the same for both portrait and landscape so far<br>There are some problems if you switch between abc and qwerty mode. especially if you switch from shifted case to the other keyboard layout. As I do not know the internals of the keyboard switch I currently have no idea on how this might be fixed.
 +
 
 +
Download Portrait: [[File:DE de portrait.tar.gz]] / Download Landscape: [[File:DE de landscape.tar.gz]]
 +
 
 
<gallery widths=250px heights=370>
 
<gallery widths=250px heights=370>
File:DE de abc.png | abc.svg
+
File:de DE abc portrait.png | abc.svg = portrait mode abc.svg
 +
File:de DE abc shift portrait.png | abc_shift.svg = portrait mode abc_shift.svg
 
File:DE de qwerty.png | qwerty.svg
 
File:DE de qwerty.png | qwerty.svg
 
File:DE de qwerty shift.png | qwerty_shift.svg
 
File:DE de qwerty shift.png | qwerty_shift.svg
 
</gallery>
 
</gallery>
 +
 +
<gallery widths=280px heights=250>
 +
File:De DE abc landscape.png | abc.svg = landscape mode abc.svg
 +
File:De DE abc shift landscape.png | abc_shift.svg = landscape mode abc_shift.svg
 +
File:De DE querty landscape.png | qwerty.svg
 +
File:De DE querty shift landscape.png | qwerty_shift.svg
 +
</gallery>
 +
 +
====ABC layout / fr_CH layout====
 +
This layout add a new layout : you can know "shift" the simple keyboard. In this new layout you'll find shifted caracters and some special caracters like @ ? ! , ... This keyboard is good for french speaking people, because you'll find also "é" and "à". This is partucallary good for french speaking Swiss because the main keyboard is QWERTY and they've QWERTZ keyboard. This keyboard modifies also the switch button : it displays the next layout on his key.
 +
 +
Download: [[File:fr_CH_qtmoko.tar.gz]]
 +
 +
<gallery widths=250px heights=370>
 +
File:fr_CH_abc.png | abc.svg
 +
File:fr_CH_abc_shift.png | abc_shift.svg
 +
File:fr_CH_qwerty.png | qwerty.svg
 +
File:fr_CH_qwerty shift.png | qwerty_shift.svg
 +
</gallery>
 +
  
 
===Installation via Package-Manger===
 
===Installation via Package-Manger===

Latest revision as of 18:50, 21 August 2012

QtMoko is a Debian based distribution for the Neo FreeRunner. The phone and user interface are based on Qt Extended Improved formerly known as Qtopia. The QtMoko wiki can be found here.

Contents

[edit] Download

Further information on QtMoko and the current state of development can be found on its website.

[edit] Sourceforge Download

Download the following files from radekp download to you desktop computer:

[edit] OpenMobile.nl Download

This downloadable QtMoko-Image does not need the installation procedure of the following sections:

  • OpenMobile Installer is a zip-file that contains images.
  • The installation processes flashes Qi and other images
  • you have to create to partitions 1=FAT 2=SWAP on your SD-Card (e.g. 2GB SD, Partition 1: FAT16, Partition 2: 128MB as swap - fdisk type 82)
  • download qtm-installer-v26.zip and unpack the file on the FAT-partition of your microSD card.
  • Insert microSD in your freerunner and boot from SD-Card (press Power & AUX-Button together to get boot menue)
  • Select boot from microSD and after 3 automatic reboots and flashing the QtMoko is installed including Navit.

[edit] Installation

If you flash the FreeRunner with a kernel image from QtMoko, then you must install the kernel and the root file system with dfu-util.

NOTE: You need a fully charged Freerunner for installation.



[edit] Installation on SD card with Qi

Installing QtMoko on your microSD Card depends on the Bootloader you are using, U-Boot or Qi.

If you have Qi installed then you can install QtMoko on the SD card. This seems to be useful if you want to work with different distribution and you can change the distribution just by changing the microSD card in your FreeRunner.

NOTE: Installation in NAND-Memory with Qi is possible without errors, but with an installed bootloader Qi the boot process will terminate (with Qi installed by Android, which is modified). Install a non-Android Qi version or u-Boot instead!


If you use Qi, you only need an ext2 partition into your µSD Card where you uncompress the root filesystem image file qtmoko-debian-v26.tar.gz. In this case Qi Bootloader is going to look for the kernel image into the /boot directory for file named uImage-GTA02.bin .

[edit] Installation on SDHC card with u-Boot (Neo1973)

This procedure was tested only on Neo1973. The biggest disadvantage is the fact, that you will still be able to have only one distribution on the device at once. You can change the sd card, of course, or install another system to NAND flash, but you can have only one kernel flashed on device. The only advantage is more space for system.

This procedure is derived from Booting_from_SD.

[edit] Preparation of SD card

Format it as ext3 filesystem. Download kernel and rootfs from qtmoko download page

Mount the card in your computer and cd to it. Untar the rootfs archive to your sd with following command:

tar xvpzf qtmoko-debian-v24-gta01.tar.gz
[edit] Flashing the kernel

Flash kernel to NAND.

  1. Hold aux and power button.
  2. Connect neo to computer.
  3. Flash the kernel (you must be root).
# dfu-util -d 0x1457:0x5119 -a kernel -R -D uImage-v24-gta01.bin
[edit] Adding bootmenu entry
  1. Hold aux and power button.
  2. Connect neo to computer.
  3. Connect to u-Boot console (you must be root).
# chown uucp.uucp /dev/ttyACM0
# cu -l /dev/ttyACM0
  1. Check the variables.
GTA01Bv4 # printenv
  1. menu_x defines xth row of bootmenu, select the one you want to define.
  2. Edit selected boot entry (for example 5th row). Note that it's impossible to copy & paste, so you will probably have to write it all by your own.
GTA01Bv4 # setenv menu_5 Boot from SDHC: setenv  bootargs root=/dev/mmcblk0p1 console=tty0 rootdelay=5 neo1973-nand:0x00040000(u-boot),0x00004000(u-boot_env),0x00200000(kernel),0x000a0000(splash)\; nand read.e 0x32000000 kernel\; bootm 0x32000000
  1. Check your edited entry (backslashes are not displayed anymore).
GTA01Bv4 # printenv menu_5
  1. Save variables.
GTA01Bv4 # saveenv
[edit] Testing
  1. Hold aux and power button
  2. Select Boot from SDHC
  3. If it works, you can set it as default boot procedure according to this procedure http://wiki.openmoko.org/wiki/Booting_from_SD#Autoboot_from_SDHC.

[edit] Installation in NAND Memory with u-Boot

If you have Qi or Android (with a modified Qi) installed on your Freerunner then install U-Boot again as a bootloader by downloading a U-Boot-binary on http://downloads.openmoko.org/distro/unstable/daily/ otherwise the boot process will terminate and you have to install u-Boot.

All versions of the GTA02 (Neo FreeRunner) that have been sold to the public are version 5 hardware, so look for a file with "gta02" and "v5" in the name, for example: u-boot-gta02v5-1.3.1.bin (linked U-Boot-Version from 31.Jan 2010):

 sudo dfu-util -a u-boot -R -D u-boot-gta02v5-1.3.1.bin

[edit] Installation of Kernel and Root-FS NAND-Memory

Switch off your FreeRunner and press the AUX and Power-On button at the same time. Your FreeRunner is showing the following U-Boot Menu:

  *** BOOT MENU (NOR) ***
  Boot
  Boot from microSD (FAT/ext2)
  Set Console to USB
  Set Console to Serial
  Reboot
  Power Off  

The FreeRunner will stay in this mode for only 30 sec. Within this time you have to start dfu-util. If you want to flash the kernel image (you will need to be root on your PC) then you have to start the following command in the 30sec your see the BOOT MENU (use kernel and rootfs from http://sourceforge.net/projects/qtmoko/files/):

# for the Neo FreeRunner:
dfu-util -d 0x1d50:0x5119 -a kernel -R -D  uImage-v24.bin

and finally the root fs with this one:

# for the Neo FreeRunner:
dfu-util -d 0x1d50:0x5119 -a rootfs -R -D qtmoko-debian-v24.jffs2

[edit] Preparations on the Connected PC/Laptop

  • To enable connections just by using the hostname openmoko edit the /etc/hosts and add line
 192.168.0.202   openmoko
  • Enable internet connection via USB Networking so that the installation of packages will be possible.

[edit] First Boot

After finishing the installation without errors you have to start the FreeRunner and calibrate the touch screen. Then you see the installed QtMoko on your device.

QtMoko after first boot

[edit] First Login

If you want to login to your FreeRunner set up a network connection (see USB Networking) with USB cable and start:

  desktop# ssh -X -l root 192.168.0.202

The root password is empty so set it for security reason especially when you open the ssh-daemon on the WLAN network interface. Define root password as usual on a linux box with

  neo# passwd

If you have established the internet connection via USB cable then update the repository data:

  neo# apt-get update 

If you want to check if the internet connection is available on your freerunner ping the OpenMoko web server with:

  neo# ping 88.198.93.221
  neo# ping wiki.openmoko.org

If the first ping works and the second doesn't then check the DNS server settings (see USB Networking).

[edit] Setting Time and Date

Set the time and date on from your linux box with

ssh root@openmoko "date -us @`date -u +%s`"

sync the hardware clock with the system time to make your change persist over reboots:

# hwclock --systohc  
   DOES NOT WORK - no access to Hardware Clock

If you want to set the time with a NTP Client install the following package, if you have a network connection available (see USB Networking)

# apt-get install ntpdate
# ntpdate-debian

For further detail see Setting Date and Time.

[edit] Usage

[edit] Size Root File System

If you want to install e.g. Twinkle and Navit on QtMoko the size of internal NAND memory is not sufficient (Twinkle need > 100MB). By creating symbolic links some memory problems can be avoided.

NOTE: (Size Root Filesystem) Create symbolic links from root file system to SD-card to save internal memory.If some folders are symb-linked to SD-Card (with e.g. ext2 partition), e.g.
 # mkdir /media/card/share
 # mkdir /media/card/share/navit
 # ln -s /media/card/share/navit /usr/share/navit 

It recommended to use an ext2-partition. After creating symb-links install software.


Consider installing QtMoko on MircroSD instead with Qi, if you want to make use of debian applications that exceed NAND memory capacity.

[edit] Login

If you want to login to your FreeRunner set up a network connection (see USB Networking) with USB cable and start:

  desktop# ssh -X -l root 192.168.0.202

or if hostname is defined in /etc/hosts

  desktop# ssh -X -l root openmoko

[edit] Installation of Applications

If you want to install applications (e.g. myapplication) login on your freerunner

 # apt-get install myapplication

Replace myapplication by the package name of application name you want to start, e.g. if you want to install the command line editor vim.

 # apt-get install vim

[edit] Navit

Navit installation uses Festival Lite for Speech synthesis look for the following string in navit.xml:

 flite -t "%s"
[edit] Navit Installation (Qtmoko Version 47)

First add the squeeze-backports to your /etc/apt/sources.list .
Thereafter install the following packages:

 apt-get update
 apt-get -t squeeze-backports install flite navit gpsd

I do not know if this still necessary but in previous versions you needed to point gpsd to the right device which in case of the GTA02 is /dev/ttySAC1:

 dpkg-reconfigure gpsd

and then:

 yes
 no
 /dev/ttySAC1
 OK
 OK

so you can check with:

 cat /etc/default/gpsd 
 # Default settings for gpsd.
 # Please do not edit this file directly - use `dpkg-reconfigure gpsd' to
 # change the options.
 START_DAEMON="true"
 GPSD_OPTIONS=""
 DEVICES="/dev/ttySAC1"
 USBAUTO="false"
 GPSD_SOCKET="/var/run/gpsd.sock"

Now to check if everything is working go to QX in Qtmoko, toggle the Favourites until the navit icon shows up, tick the box on the left to the icon to make it a favourite, check favourites again, click on navit and go to settings, use: window manager, fullscreen, and gpsd, launch navit To check if this also launches the gps receiver open a terminal and do:

# cat /dev/ttySAC1

and you should be seeing some numbers.

last but not least edit the navit.xml to enable the flite speech part which is commented out and paste an OSD layout section from the navit homepage which you like in the osd section in navit.xml, then enable the mapset for some XYZ.bin mapfile which you get with the navit planet extrator and adjust the link to properly point to that file. make sure this mapset is the only one which is enabled!

[edit] Navit Installation (Qtmoko Version XY)

If you want to install e.g. the application Navit, you have to install the following packages. Navit needs and X-Server and it will run under QX.

 # apt-get install apt-utils
 # apt-get install flite
 # apt-get install unzip

The zip-package is necessary to unzip the navit-qtm.zip package.

 # cd /media/card
 # mkdir download
 # cd download
 # wget http://www.openmobile.nl/media/download_gallery/navit-qtm.zip
 # cd /

During unzip you will be asked to replace /opt/qtmoko/bin/ppp-network. This has to be done to solve problems with DNS over GPRS. Backup ppp-network file before unzipping navit-qtm.zip.

 # cp -p /opt/qtmoko/bin/ppp-network /opt/qtmoko/bin/ppp-network.bak
 # unzip /media/card/download/navit-qtm.zip
 # rm /media/card/download/navit-qtm.zip

Unzipping the file will overwrite the following files too:

 /opt/qtmoko/etc/qx/favourites.conf
 /opt/qtmoko/etc/qx/profiles.conf
NOTE: Unzip extracts and overwrites the network settings files mentioned above. Due to this fact the usb0 MAC address changes for the USB connection to your freerunner. E.g. under Ubuntu 10.04 the new network interface for usb0 has to configure again


Now you have to restart your Freerunner, but you can also try from the command line of your neo:

 # echo 1 > /proc/sys/vm/overcommit_memory

After restart you can start Navit under QX.

Navit in QX Main Menu
[edit] Download Maps

Create a folder MapsNavit on your SD card

 # mkdir /media/card/MapsNavit

The navit QT package navit-qtm.zip from http://www.openmobile.nl contains a file navit.xml that specifies the benelux map and will try to load osm_benelux.bin that should be stored as

 /media/card/MapsNavit/osm_benelux.bin

If you want to use a map for another country, you can just store a downloaded Navit-Map in that folder and rename it osm_benelux.bin. If the map name should make sense, you have to edit the file navit.xml. See the Navit manual for details. You can find the navit.xml at:

 # /usr/share/navit/navit.xml

Create the folder .navit in the home directory on your FR and copy navit.xml to this directory:

 # cd ~
 # mkdir .navit
 # cp /usr/share/navit/navit.xml .navit/navit.xml 

If you have the editor vim installed, edit the file at line 376 approx.:

 # vim ~/.navit/navit.xml

For example, if you have downloaded the file germany.bin, your mapset element should look like this:

 <!-- Mapset template for openstreetmaps -->
 <mapset enabled="yes">
   <map type="binfile" enabled="yes" data="/media/card/MapsNavit/germany.bin"/>
 </mapset>
NOTE: Both MAPSET and MAP have to be enabled to work with the OSM-map in Navit.


[edit] Starting Navit
Launch Navit in QX
  • Open Main Menu by clicking on the green Q-Topia "Q"-Box.
  • Open Applications (4 Boxes, red, yellow, green, blue).
  • Scroll down and open QX.
  • Select Navit.
  • Click on the white Paper Icon on the bottom left to open the context menu of the QX application.
  • Select Launch to start Navit.
  • Exit with AUX-Button without stopping navit.

[edit] VoIP

[edit] Integrated VoIP-Client

QtMoko has an integrated VoIP-Client, which would be perfect to use a SIP-Account to do free of charge mobile communication world wide. But at the moment the integrated VoIP-Client does not work, due to some strange problems in Version v24 (see QtMoko homepage for current status of development).

Android on Freerunner has an integrated SIP-Client SipDroid that has strange audio problems as well (see http://sipdroid.org ). Maybe there is an underlying problem the

have in common.

[edit] Twinkle/Linphone

See Twinkle for further details or the official Website http://www.twinklephone.com/

  apt-get install twinkle

For installation of Twinkle your need 105MB. It would be necessary to install QtMoko on microSD.

Error: Installation of Twinkle with apt-get stops with errors (Test: 19.11.2010)


You can use Linphone (http://www.linphone.org) instead, which will use 83MB.

  apt-get install linphone

See additional information on the OpenMoko-Linphone pages.

[edit] PIM Storage and Import

As visible on QtMoko-Wiki Syncing Calendar data is not working at the moment. Some work has be done (Thanks to mossroy), so that iCal-Files (ics) can be imported to your QtMoko calendar via a perlscript ics2qtcal.pl. Choose the current version from http://mossroy.free.fr/ics2qtcal/.

The main job of the scripts are:

  1. deleting old appointments in Qt-Calendar
  2. importing the an ics-file into the Qt-Calendar. The ics-File can be an exported calendar in an iCal File (e.g. mycalendar.ics) which is transfered to your Neo.
  3. import mycalendar.ics with scripts into your SQLite Database.


[edit] Install Script

The following installation script

  • downloads the scripts and stores them into the directory /usr/local/bin/,
  • makes them executable,
  • creates a file /usr/share/applications/syncal.desktop for QX and
  • creates a file /usr/local/bin/syncal for starting the synchronisation. The syncal will look like this:
#!/bin/sh
vUser='myusername'
vPWD='mypassword'
vICS1='https://www.example.org/caldav/calendar1.ics'
vICS2='https://www.example.org/caldav/calendar2.ics'
remotesync4ics2openmoko.sh -u "$vUser" -p "$vPWD" "$vICS1" "$vICS2"

Please edit the file syncal and modify the username and password for accessing ics-file on a remote groupware server, where your iCal-file is stored.

#!/bin/sh
# INSTALL SCRIPT FOR ICS2QTCAL
# ----------------------------
# Edit the following variable for a new versions
vURL="http://mossroy.free.fr/ics2qtcal/v0.4"
cd /usr/local/bin
wget "$vURL/ics2qtcal.pl"
wget "$vURL/ics2qtcal.sh"
wget "$vURL/deleteqtcalappointments.pl"
wget "$vURL/install_dependencies.sh"
wget "$vURL/remotesync4ics2openmoko.sh"
wget "$vURL/sync4ics2openmoko.sh"
sh ./install_dependencies.sh
rm ./install_dependencies.sh
chmod u+x *.sh
# insert synccal in QX-favourites and make backup of old favourites.conf
cd /opt/qtmoko/etc/qx/
cp ./favourites.conf ./favourites.conf.$$
cat ./favourites.conf.$$ | sed 's/list=/list=synccal, /g' | favourites.conf
echo "generate synccal.desktop"
vSyncCal="/usr/share/applications/synccal.desktop"
echo "[Desktop Entry]" > $vSyncCal
echo "Version=1.0" >> $vSyncCal
echo "Name=SyncCal" >> $vSyncCal
echo "Name[de]=SyncCal" >> $vSyncCal
echo "Name[fr]=SyncCal" >> $vSyncCal
echo "Comment=Syncing remote and local ics-file into Qt-Calendar." >> $vSyncCal
echo "Comment[de]=Script fuer den Import von ics-Dateien" >> $vSyncCal
echo "Exec=synccal" >> $vSyncCal
echo "Icon=synccal" >> $vSyncCal
echo "StartupNotify=true" >> $vSyncCal
echo "Terminal=false" >> $vSyncCal
echo "Type=Application" >> $vSyncCal
echo "Categories=GTK;Utility;Dialog;" >> $vSyncCal
echo "GenericName=SyncCal" >> $vSyncCal
echo "GenericName[de]=SyncCal" >> $vSyncCal
# Done synccal.desktop ----------
echo "Generate syncal"
vSyncCal="/usr/local/bin/syncal"
echo "#!/bin/sh" > $vSyncCal
echo "vUser=\"myusername\"" >> $vSyncCal
echo "vPWD=\"mypassword\"" >> $vSyncCal
echo "vICS1=\"https://www.example.org/caldav/calendar1.ics\"" >> $vSyncCal
echo "vICS2=\"https://www.example.org/caldav/calendar2.ics\"" >> $vSyncCal
echo "remotesync4ics2openmoko.sh -u $vUser -p $vPWD $vICSl $vICS2" >> $vSyncCal
chmod u+x $vSyncCal

The script adds a syncal to QX-favourites and creates a desktop-definition file

 /usr/share/applications/syncal.desktop  

because without the desktop-definition file an application will not be visible in QX-favourites.

[edit] Settings for Remote ICS-files

After installation you have to edit the file

 /usr/local/bin/synccal

with your confidential username, password and file URL for the remote ics files. You can import more than one remote ICS-files, so 2 variables for file URLs are defined. Change that to your appropriate number of remote ICS-files. See remotesync4ics2openmoko.sh for further details. If you do not want to store the password in the script for security reasons you can use xdialog for entering the vPWD via user interface (e.g. input box).

[edit] Setting up a Groupware Server for testing

If you want to setup your own groupware server for testing on your own Linux Box, you can try CitaDel. Accessing the remote ics-file are explained on the homepage of http://www.citadel.org.

[edit] Use Evolution iCal-file via SSHFS

Evolution stores the calendar data in the iCal-file calendar.ics. So you might to use the files directly.

If you running Evolution on you Linux-Box you can use SSHFS to mount the directory of Evolution in homedirectory e.g. in

 /home/username/.evolution/calendar/local/system

You can use the iCal-file directly by mounting the directory mentioned above on the Freerunner. Now you can used the calendar.ics from the Linux-Box, if you mount the directory in (replace username by your account on your Linux-Box):

 /mnt/remoteics

on your Freerunner.

 # mkdir /mnt/remoteics
 # sshfs username@example.com:/home/username/.evolution/calendar/local/system /mnt/remoteics

Now you can use the file calendar.ics directly:

 /mnt/remoteics/calendar.ics

The scripts of Mossroy must be modified for this, because the scripts use wget to download the ics-files.

[edit] Favorites

Delete Icons from Favorites in Task Manager

[edit] QtMoko Favorites

[edit] Add to Favorites

You might prefer some applications and you use them more frequent. Then you might want them to add to your favorites.

  • Go the application list and select (highlight, but do not start) application.
  • click on the paper icon on bottom left and select Add to Favorite.

Then you will have this Icon in the favorites menu (yellow star in main menu) too.

[edit] Delete from Favorites

A bit more difficult (i.e. more hidden in QtMoko) is to delete icons from the favorites menu.

  • start Task Manager in main menu by pressing the AUX-Button on you freerunner.
  • You will see the list of favorites
  • Select the application your want to remove from favorites (keep pressed for a few seconds on the application until the context menu appear. The icon you want to delete should not be selected before.
  • select delete from context menu and the icon disappears from favorites.

[edit] Adding QX Favourites

For adding Favourites in the X-Server environment see QX.

[edit] MP3 Audio

Media Player

[edit] Directory of MP3-Files

The Media-Player will expect audio MP3-file in the directory:

  /home/root/Documents/audio/mpeg

If want to store several MP3-file on your freerunner create a symbolic link of audio to your SD-card:

  neo# mkdir /media/card/audio
  neo# mkdir /media/card/audio/mpeg
  ln -s /media/card/audio /home/root/Documents/audio

Store MP3-files in /media/card/audio/mpeg

[edit] MP3-codec install

  • Install codec-installer from repository
  • Start codec-installer
  • Install MP3-codec
  • reboot you freerunner

[edit] Video

[edit] Transcoding for 240x320 with Gamma Correction

The 240x320 mode on freerunner has "odd" colors. To adjust this you can run:

 mencoder -really-quiet -oac pcm -ovc lavc -lavcopts vcodec=ffvhuff -vf eq2=1:1:0:1:1.19:1.19:1.44 -vf scale=320:240,rotate=1 -o - "$@" | ffmpeg2theora -V 256 -A 32 -H 22050 -c 1 -o - - 2> dev/null | dd bs=8192 iflag=fullblock 2> /dev/null

where 1.19, 1.19 and 1.44 are the gamma values for red, green and blue.

[edit] Transcoding for 480x640

GTA02 can't play native 480x640 video - processor is good enough for decoding it, but the graphics card bus is too slow to get the information through to have a decent framerate. 240x320 is only a fourth of that information and this does work even when being scaled to 480x640 to run fullscreen.

[edit] Error Handling and Workarounds

During the installations above, the following problem occured:

[edit] Xdialog Problem with Gdk-WARNING

When encouter a GdK-Warning using Xdialog in scripts you can remove the warning with sed.

 sed 's/Gdk-WARNING ... locale not supported by C library//g

This warning is part of the return string of an inputbox in xdialog.

NOTE: This application sed is a workaround. The best solution is a modifacition that removes the GdK-warning itself.


Embedded in a script sed will remove the warning from the input string. A example script (modified from http://xdialog.free.fr) will work like this:

  #!/bin/sh
 
  Xdialog --title "INPUT BOX" \
     --inputbox "Enter URL:" 18 45 \
     "http://www123.Example-Test.com" 2> /tmp/inputbox.tmp.$$
  
  retval=$?
  input=`cat /tmp/inputbox.tmp.$$`
  rm -f /tmp/inputbox.tmp.$$
  
  
  input=`echo $input | sed 's/Gdk-WARNING ... locale not supported by C library//g'`
  # remove invalid character from URL
  input=`echo $input | sed 's/[^a-zA-Z1-9\/:\. \-]//g'`
  
  case $retval in
    0)
      echo "Input string is '$input'";;
    1)
      echo "Cancel pressed.";;
    255)
      echo "Box closed.";;
  esac

To test this script on your freerunner, you have to start it from the terminal in QX. Source of the xdialog script is used from http://xdialog.free.fr.

[edit] Apt-Get Problem jffs2

[Apt-Get] (jffs2) Couldn't make mmap ...: (solved with the following workaround) If that happens regularly, create two scripts apt-start and apt-stop. These scripts are used before and after apt-get use.

[edit] Create an APT-START Script

  • start vi for the script apt-start
 # vi /bin/apt-start 
  • press "I" for insert and enter the following code:
 #!/bin/sh
 mount -t tmpfs none /var/cache/apt
 mkdir -p /var/cache/apt/archives/partial
 apt-get update
 echo "apt-get can now be used"
 echo "stop with apt-stop"
  • press ESC and then ":w"
  • press ":q" for quit.
  • make the script executable with chmod:
  chmod u+x /bin/apt-start

[edit] Create an APT-STOP Script

  • start vi for the script apt-stop.
 # vi /bin/apt-stop 
  • press "I" for insert and enter the following code:
 #!/bin/sh
 umount /var/cache/apt
 echo "Now old settings for apt-get are restored"
  • press ESC and then ":w"
  • press ":q" for quit.
  • make the script executable with chmod:
  chmod u+x /bin/apt-stop

[edit] Usage of Scripts

If you to install software use the scripts before and after apt-get call:

 apt-start
 apt-get install mysoftware
 apt-stop

Replace mysoftware with the package you want to install e.g. linphone.


[edit] Data Safety / Boot Errors

[edit] Boot Errors due to Filesystem Corruption

In case your ext3 partition gets corrupted take out the sdcard from your freerunner, put it in a card reader and insert the card reader in one of the usb slots of your desktop linux system.
Find out the mount point of the ext3 partition but do not mount the partition. You can use the following command to find the partition:

 cat /proc/partitions

Now you can run from command line where /dev/sdXX is the qtmoko partition on your sd card (/dev/sdc2 in the example below):

 fsck /dev/sdc2

and you will be asked to confirm the error correction. If you just want to have any errors corrected run

 fsck -y /dev/sdc2

[edit] Backing up whole partitions

To backup whole partitions to your local desktop computer navigate to the directory where you'd like to have the files written to (in this case /home/limo/) open a terminal in that directory and run the two commands below (it assumes the following paritioning of the sdcard: 1st partition = vfat 2nd partition = qtmoko on some ext filesystem):

 ssh -t root@192.168.0.202 dd if=/dev/mmcblk0p1 ibs=4096 conv=notrunc,noerror | dd of=/home/limo/qtmoko_vfatpartition.img obs=4096
 ssh -t root@192.168.0.202 dd if=/dev/mmcblk0p2 ibs=4096 conv=notrunc,noerror | dd of=/home/limo/qtmoko_rootpartition.img obs=4096

or somewhat simpler do the folowing which works with busybox dd:

 ssh -t root@192.168.0.202 dd if=/dev/mmcblk0p1 bs=4096 > ~/qtmoko_vfatpartition.bs4096.img
 ssh -t root@192.168.0.202 dd if=/dev/mmcblk0p2 bs=4096 > ~/qtmoko_rootpartition.bs4096.img


[edit] Backing up your contacts

In contacts menu there is "Send All..." You can then send contacts using bluetooth or email. If you use email and you don't have smtp setup up, you can download the mail message from /home/root/Applications/qtopiamail and open in e.g. in kmail and save the VCF attachment.

Reinstallation of the contacts is much easier: After reinstall you can just click on it and QtMoko imports them. Regards

[edit] Links

[edit] SVG Keyboards (from QtMoko v45 onwards)

Since QtMoko v45 you can customize your keyboard via simple svg files which can be easily edited in inkscape. Here is the original explications from Radek on the list (see this mail):

Layouts are completely customizable. You can easily change key size, position, background. It's very easy to add international characters and new layouts. Just have a look at /opt/qtmoko/etc/im/svgkbd/ The layouts are normal svg images. You can use inkscape to open and edit them. It should be very clear what to do. Only thing to explain is how you should name the key XML elements. In Inkscape go to Edit->XML editor and click on key. The element name must be in form:

key_QtKeycode_unicode

For possible QtKeycode values check this link qt-keycodes and for unicode values use your favourite unicode character map.

If you want to create a keyboard layout yourself for the abc.svg it is easiest to start with the abc_portrait.svg or abc_landscape.svg DE_de.tar.gz as in those svg files the keys all have an absolute xy position and are all automatically centered, so you can easily change the keysize by chaning the 24px value in the svg with any value you's prefer. They also have exculsively unicode characters which makes moving the keys around a bit easier. The portrait has 6 rows and the landscape keyboard has 4 rows of keys.

[edit] Manual installation

This installation will remove the original keyboards!!!
If you want to keep them backup everything in root@192.168.0.202:/opt/qtmoko/etc/im/svgkbd/

To install the keyboard download the tar gz file desired (see below), go to your download directory and use

 tar xvzf DE_de.tar.gz && scp DE_de/* root@192.168.0.202:/opt/qtmoko/etc/im/svgkbd/

to replace the original keyboards with the language specific ones.

Do not forget to restart QtMoko afterwards.

[edit] DE_de Layouts

These layouts provide a portrait or a landscape mode for the abc.svg keyboard (more a SMS keyboard now) and abc_shift.svg keyboard. The idea was to be as consistent with the standard querty/quertz layout our brain is used to, so only the qwe and the arrows were moved to different positions. Everything else is pretty much in place though as there are too many keys for portrait mode the upper two rows have been split in two.
The querty keyboards are the same for both portrait and landscape so far
There are some problems if you switch between abc and qwerty mode. especially if you switch from shifted case to the other keyboard layout. As I do not know the internals of the keyboard switch I currently have no idea on how this might be fixed.

Download Portrait: File:DE de portrait.tar.gz / Download Landscape: File:DE de landscape.tar.gz

[edit] ABC layout / fr_CH layout

This layout add a new layout : you can know "shift" the simple keyboard. In this new layout you'll find shifted caracters and some special caracters like @ ? ! , ... This keyboard is good for french speaking people, because you'll find also "é" and "à". This is partucallary good for french speaking Swiss because the main keyboard is QWERTY and they've QWERTZ keyboard. This keyboard modifies also the switch button : it displays the next layout on his key.

Download: File:Fr CH qtmoko.tar.gz


[edit] Installation via Package-Manger

Radek has packaged the keyboard as a .deb package so you can simple navigate to "more apps" and look for keyboards. Do not forget to restart QtMoko afterwards.

Personal tools

QtMoko is a Debian based distribution for the Neo FreeRunner. The phone and user interface are based on Qt Extended Improved formerly known as Qtopia. The QtMoko wiki can be found here.

Download

Further information on QtMoko and the current state of development can be found on its website.

Sourceforge Download

Download the following files from radekp download to you desktop computer:

OpenMobile.nl Download

This downloadable QtMoko-Image does not need the installation procedure of the following sections:

  • OpenMobile Installer is a zip-file that contains images.
  • The installation processes flashes Qi and other images
  • you have to create to partitions 1=FAT 2=SWAP on your SD-Card (e.g. 2GB SD, Partition 1: FAT16, Partition 2: 128MB as swap - fdisk type 82)
  • download qtm-installer-v26.zip and unpack the file on the FAT-partition of your microSD card.
  • Insert microSD in your freerunner and boot from SD-Card (press Power & AUX-Button together to get boot menue)
  • Select boot from microSD and after 3 automatic reboots and flashing the QtMoko is installed including Navit.

Installation

If you flash the FreeRunner with a kernel image from QtMoko, then you must install the kernel and the root file system with dfu-util.

NOTE: You need a fully charged Freerunner for installation.



Installation on SD card with Qi

Installing QtMoko on your microSD Card depends on the Bootloader you are using, U-Boot or Qi.

If you have Qi installed then you can install QtMoko on the SD card. This seems to be useful if you want to work with different distribution and you can change the distribution just by changing the microSD card in your FreeRunner.

NOTE: Installation in NAND-Memory with Qi is possible without errors, but with an installed bootloader Qi the boot process will terminate (with Qi installed by Android, which is modified). Install a non-Android Qi version or u-Boot instead!


If you use Qi, you only need an ext2 partition into your µSD Card where you uncompress the root filesystem image file qtmoko-debian-v26.tar.gz. In this case Qi Bootloader is going to look for the kernel image into the /boot directory for file named uImage-GTA02.bin .

Installation on SDHC card with u-Boot (Neo1973)

This procedure was tested only on Neo1973. The biggest disadvantage is the fact, that you will still be able to have only one distribution on the device at once. You can change the sd card, of course, or install another system to NAND flash, but you can have only one kernel flashed on device. The only advantage is more space for system.

This procedure is derived from Booting_from_SD.

Preparation of SD card

Format it as ext3 filesystem. Download kernel and rootfs from qtmoko download page

Mount the card in your computer and cd to it. Untar the rootfs archive to your sd with following command:

tar xvpzf qtmoko-debian-v24-gta01.tar.gz
Flashing the kernel

Flash kernel to NAND.

  1. Hold aux and power button.
  2. Connect neo to computer.
  3. Flash the kernel (you must be root).
# dfu-util -d 0x1457:0x5119 -a kernel -R -D uImage-v24-gta01.bin
Adding bootmenu entry
  1. Hold aux and power button.
  2. Connect neo to computer.
  3. Connect to u-Boot console (you must be root).
# chown uucp.uucp /dev/ttyACM0
# cu -l /dev/ttyACM0
  1. Check the variables.
GTA01Bv4 # printenv
  1. menu_x defines xth row of bootmenu, select the one you want to define.
  2. Edit selected boot entry (for example 5th row). Note that it's impossible to copy & paste, so you will probably have to write it all by your own.
GTA01Bv4 # setenv menu_5 Boot from SDHC: setenv  bootargs root=/dev/mmcblk0p1 console=tty0 rootdelay=5 neo1973-nand:0x00040000(u-boot),0x00004000(u-boot_env),0x00200000(kernel),0x000a0000(splash)\; nand read.e 0x32000000 kernel\; bootm 0x32000000
  1. Check your edited entry (backslashes are not displayed anymore).
GTA01Bv4 # printenv menu_5
  1. Save variables.
GTA01Bv4 # saveenv
Testing
  1. Hold aux and power button
  2. Select Boot from SDHC
  3. If it works, you can set it as default boot procedure according to this procedure http://wiki.openmoko.org/wiki/Booting_from_SD#Autoboot_from_SDHC.

Installation in NAND Memory with u-Boot

If you have Qi or Android (with a modified Qi) installed on your Freerunner then install U-Boot again as a bootloader by downloading a U-Boot-binary on http://downloads.openmoko.org/distro/unstable/daily/ otherwise the boot process will terminate and you have to install u-Boot.

All versions of the GTA02 (Neo FreeRunner) that have been sold to the public are version 5 hardware, so look for a file with "gta02" and "v5" in the name, for example: u-boot-gta02v5-1.3.1.bin (linked U-Boot-Version from 31.Jan 2010):

 sudo dfu-util -a u-boot -R -D u-boot-gta02v5-1.3.1.bin

Installation of Kernel and Root-FS NAND-Memory

Switch off your FreeRunner and press the AUX and Power-On button at the same time. Your FreeRunner is showing the following U-Boot Menu:

  *** BOOT MENU (NOR) ***
  Boot
  Boot from microSD (FAT/ext2)
  Set Console to USB
  Set Console to Serial
  Reboot
  Power Off  

The FreeRunner will stay in this mode for only 30 sec. Within this time you have to start dfu-util. If you want to flash the kernel image (you will need to be root on your PC) then you have to start the following command in the 30sec your see the BOOT MENU (use kernel and rootfs from http://sourceforge.net/projects/qtmoko/files/):

# for the Neo FreeRunner:
dfu-util -d 0x1d50:0x5119 -a kernel -R -D  uImage-v24.bin

and finally the root fs with this one:

# for the Neo FreeRunner:
dfu-util -d 0x1d50:0x5119 -a rootfs -R -D qtmoko-debian-v24.jffs2

Preparations on the Connected PC/Laptop

  • To enable connections just by using the hostname openmoko edit the /etc/hosts and add line
 192.168.0.202   openmoko
  • Enable internet connection via USB Networking so that the installation of packages will be possible.

First Boot

After finishing the installation without errors you have to start the FreeRunner and calibrate the touch screen. Then you see the installed QtMoko on your device.

QtMoko after first boot

First Login

If you want to login to your FreeRunner set up a network connection (see USB Networking) with USB cable and start:

  desktop# ssh -X -l root 192.168.0.202

The root password is empty so set it for security reason especially when you open the ssh-daemon on the WLAN network interface. Define root password as usual on a linux box with

  neo# passwd

If you have established the internet connection via USB cable then update the repository data:

  neo# apt-get update 

If you want to check if the internet connection is available on your freerunner ping the OpenMoko web server with:

  neo# ping 88.198.93.221
  neo# ping wiki.openmoko.org

If the first ping works and the second doesn't then check the DNS server settings (see USB Networking).

Setting Time and Date

Set the time and date on from your linux box with

ssh root@openmoko "date -us @`date -u +%s`"

sync the hardware clock with the system time to make your change persist over reboots:

# hwclock --systohc  
   DOES NOT WORK - no access to Hardware Clock

If you want to set the time with a NTP Client install the following package, if you have a network connection available (see USB Networking)

# apt-get install ntpdate
# ntpdate-debian

For further detail see Setting Date and Time.

Usage

Size Root File System

If you want to install e.g. Twinkle and Navit on QtMoko the size of internal NAND memory is not sufficient (Twinkle need > 100MB). By creating symbolic links some memory problems can be avoided.

NOTE: (Size Root Filesystem) Create symbolic links from root file system to SD-card to save internal memory.If some folders are symb-linked to SD-Card (with e.g. ext2 partition), e.g.
 # mkdir /media/card/share
 # mkdir /media/card/share/navit
 # ln -s /media/card/share/navit /usr/share/navit 

It recommended to use an ext2-partition. After creating symb-links install software.


Consider installing QtMoko on MircroSD instead with Qi, if you want to make use of debian applications that exceed NAND memory capacity.

Login

If you want to login to your FreeRunner set up a network connection (see USB Networking) with USB cable and start:

  desktop# ssh -X -l root 192.168.0.202

or if hostname is defined in /etc/hosts

  desktop# ssh -X -l root openmoko

Installation of Applications

If you want to install applications (e.g. myapplication) login on your freerunner

 # apt-get install myapplication

Replace myapplication by the package name of application name you want to start, e.g. if you want to install the command line editor vim.

 # apt-get install vim

Navit

Navit installation uses Festival Lite for Speech synthesis look for the following string in navit.xml:

 flite -t "%s"
Navit Installation

If you want to install e.g. the application Navit, you have to install the following packages. Navit needs and X-Server and it will run under QX.

 # apt-get install apt-utils
 # apt-get install flite
 # apt-get install unzip

The zip-package is necessary to unzip the navit-qtm.zip package.

 # cd /media/card
 # mkdir download
 # cd download
 # wget http://www.openmobile.nl/media/download_gallery/navit-qtm.zip
 # cd /

During unzip you will be asked to replace /opt/qtmoko/bin/ppp-network. This has to be done to solve problems with DNS over GPRS. Backup ppp-network file before unzipping navit-qtm.zip.

 # cp -p /opt/qtmoko/bin/ppp-network /opt/qtmoko/bin/ppp-network.bak
 # unzip /media/card/download/navit-qtm.zip
 # rm /media/card/download/navit-qtm.zip

Unzipping the file will overwrite the following files too:

 /opt/qtmoko/etc/qx/favourites.conf
 /opt/qtmoko/etc/qx/profiles.conf
NOTE: Unzip extracts and overwrites the network settings files mentioned above. Due to this fact the usb0 MAC address changes for the USB connection to your freerunner. E.g. under Ubuntu 10.04 the new network interface for usb0 has to configure again


Now you have to restart your Freerunner, but you can also try from the command line of your neo:

 # echo 1 > /proc/sys/vm/overcommit_memory

After restart you can start Navit under QX.

Navit in QX Main Menu
Download Maps

Create a folder MapsNavit on your SD card

 # mkdir /media/card/MapsNavit

The navit QT package navit-qtm.zip from http://www.openmobile.nl contains a file navit.xml that specifies the benelux map and will try to load osm_benelux.bin that should be stored as

 /media/card/MapsNavit/osm_benelux.bin

If you want to use a map for another country, you can just store a downloaded Navit-Map in that folder and rename it osm_benelux.bin. If the map name should make sense, you have to edit the file navit.xml. See the Navit manual for details. You can find the navit.xml at:

 # /usr/share/navit/navit.xml

Create the folder .navit in the home directory on your FR and copy navit.xml to this directory:

 # cd ~
 # mkdir .navit
 # cp /usr/share/navit/navit.xml .navit/navit.xml 

If you have the editor vim installed, edit the file at line 376 approx.:

 # vim ~/.navit/navit.xml

For example, if you have downloaded the file germany.bin, your mapset element should look like this:

 <!-- Mapset template for openstreetmaps -->
 <mapset enabled="yes">
   <map type="binfile" enabled="yes" data="/media/card/MapsNavit/germany.bin"/>
 </mapset>
NOTE: Both MAPSET and MAP have to be enabled to work with the OSM-map in Navit.


Starting Navit
Launch Navit in QX
  • Open Main Menu by clicking on the green Q-Topia "Q"-Box.
  • Open Applications (4 Boxes, red, yellow, green, blue).
  • Scroll down and open QX.
  • Select Navit.
  • Click on the white Paper Icon on the bottom left to open the context menu of the QX application.
  • Select Launch to start Navit.
  • Exit with AUX-Button without stopping navit.

VoIP

Integrated VoIP-Client

QtMoko has an integrated VoIP-Client, which would be perfect to use a SIP-Account to do free of charge mobile communication world wide. But at the moment the integrated VoIP-Client does not work, due to some strange problems in Version v24 (see QtMoko homepage for current status of development).

Android on Freerunner has an integrated SIP-Client SipDroid that has strange audio problems as well (see http://sipdroid.org ). Maybe there is an underlying problem the

have in common.

Twinkle/Linphone

See Twinkle for further details or the official Website http://www.twinklephone.com/

  apt-get install twinkle

For installation of Twinkle your need 105MB. It would be necessary to install QtMoko on microSD.

Error: Installation of Twinkle with apt-get stops with errors (Test: 19.11.2010)


You can use Linphone (http://www.linphone.org) instead, which will use 83MB.

  apt-get install linphone

See additional information on the OpenMoko-Linphone pages.

PIM Storage and Import

As visible on QtMoko-Wiki Syncing Calendar data is not working at the moment. Some work has be done (Thanks to mossroy), so that iCal-Files (ics) can be imported to your QtMoko calendar via a perlscript ics2qtcal.pl. Choose the current version from http://mossroy.free.fr/ics2qtcal/.

The main job of the scripts are:

  1. deleting old appointments in Qt-Calendar
  2. importing the an ics-file into the Qt-Calendar. The ics-File can be an exported calendar in an iCal File (e.g. mycalendar.ics) which is transfered to your Neo.
  3. import mycalendar.ics with scripts into your SQLite Database.


Install Script

The following installation script

  • downloads the scripts and stores them into the directory /usr/local/bin/,
  • makes them executable,
  • creates a file /usr/share/applications/syncal.desktop for QX and
  • creates a file /usr/local/bin/syncal for starting the synchronisation. The syncal will look like this:
#!/bin/sh
vUser="myusername"
vPWD="mypassword"
vICS1="https://www.example.org/caldav/calendar1.ics"
vICS2="https://www.example.org/caldav/calendar2.ics"
remotesync4ics2openmoko.sh -u $vUser -p $vPWD $vICSl $vICS2

Please edit the file syncal and modify the username and password for accessing ics-file on a remote groupware server, where your iCal-file is stored.

#!/bin/sh
# INSTALL SCRIPT FOR ICS2QTCAL
# ----------------------------
# Edit the following variable for a new versions
vURL="http://mossroy.free.fr/ics2qtcal/v0.4"
cd /usr/local/bin
wget "$vURL/ics2qtcal.pl"
wget "$vURL/ics2qtcal.sh"
wget "$vURL/deleteqtcalappointments.pl"
wget "$vURL/install_dependencies.sh"
wget "$vURL/remotesync4ics2openmoko.sh"
wget "$vURL/sync4ics2openmoko.sh"
sh ./install_dependencies.sh
rm ./install_dependencies.sh
chmod u+x *.sh
# insert synccal in QX-favourites and make backup of old favourites.conf
cd /opt/qtmoko/etc/qx/
cp ./favourites.conf ./favourites.conf.$$
cat ./favourites.conf.$$ | sed 's/list=/list=synccal, /g' | favourites.conf
echo "generate synccal.desktop"
vSyncCal="/usr/share/applications/synccal.desktop"
echo "[Desktop Entry]" > $vSyncCal
echo "Version=1.0" >> $vSyncCal
echo "Name=SyncCal" >> $vSyncCal
echo "Name[de]=SyncCal" >> $vSyncCal
echo "Name[fr]=SyncCal" >> $vSyncCal
echo "Comment=Syncing remote and local ics-file into Qt-Calendar." >> $vSyncCal
echo "Comment[de]=Script fuer den Import von ics-Dateien" >> $vSyncCal
echo "Exec=synccal" >> $vSyncCal
echo "Icon=synccal" >> $vSyncCal
echo "StartupNotify=true" >> $vSyncCal
echo "Terminal=false" >> $vSyncCal
echo "Type=Application" >> $vSyncCal
echo "Categories=GTK;Utility;Dialog;" >> $vSyncCal
echo "GenericName=SyncCal" >> $vSyncCal
echo "GenericName[de]=SyncCal" >> $vSyncCal
# Done synccal.desktop ----------
echo "Generate syncal"
vSyncCal="/usr/local/bin/syncal"
echo "#!/bin/sh" > $vSyncCal
echo "vUser=\"myusername\"" >> $vSyncCal
echo "vPWD=\"mypassword\"" >> $vSyncCal
echo "vICS1=\"https://www.example.org/caldav/calendar1.ics\"" >> $vSyncCal
echo "vICS2=\"https://www.example.org/caldav/calendar2.ics\"" >> $vSyncCal
echo "remotesync4ics2openmoko.sh -u $vUser -p $vPWD $vICSl $vICS2" >> $vSyncCal
chmod u+x $vSyncCal

The script adds a syncal to QX-favourites and creates a desktop-definition file

 /usr/share/applications/syncal.desktop  

because without the desktop-definition file an application will not be visible in QX-favourites.

Settings for Remote ICS-files

After installation you have to edit the file

 /usr/local/bin/synccal

with your confidential username, password and file URL for the remote ics files. You can import more than one remote ICS-files, so 2 variables for file URLs are defined. Change that to your appropriate number of remote ICS-files. See remotesync4ics2openmoko.sh for further details. If you do not want to store the password in the script for security reasons you can use xdialog for entering the vPWD via user interface (e.g. input box).

Setting up a Groupware Server for testing

If you want to setup your own groupware server for testing on your own Linux Box, you can try CitaDel. Accessing the remote ics-file are explained on the homepage of http://www.citadel.org.

Use Evolution iCal-file via SSHFS

Evolution stores the calendar data in the iCal-file calendar.ics. So you might to use the files directly.

If you running Evolution on you Linux-Box you can use SSHFS to mount the directory of Evolution in homedirectory e.g. in

 /home/username/.evolution/calendar/local/system

You can use the iCal-file directly by mounting the directory mentioned above on the Freerunner. Now you can used the calendar.ics from the Linux-Box, if you mount the directory in (replace username by your account on your Linux-Box):

 /mnt/remoteics

on your Freerunner.

 # mkdir /mnt/remoteics
 # sshfs username@example.com:/home/username/.evolution/calendar/local/system /mnt/remoteics

Now you can use the file calendar.ics directly:

 /mnt/remoteics/calendar.ics

The scripts of Mossroy must be modified for this, because the scripts use wget to download the ics-files.

Favorites

Delete Icons from Favorites in Task Manager

QtMoko Favorites

Add to Favorites

You might prefer some applications and you use them more frequent. Then you might want them to add to your favorites.

  • Go the application list and select (highlight, but do not start) application.
  • click on the paper icon on bottom left and select Add to Favorite.

Then you will have this Icon in the favorites menu (yellow star in main menu) too.

Delete from Favorites

A bit more difficult (i.e. more hidden in QtMoko) is to delete icons from the favorites menu.

  • start Task Manager in main menu by pressing the AUX-Button on you freerunner.
  • You will see the list of favorites
  • Select the application your want to remove from favorites (keep pressed for a few seconds on the application until the context menu appear. The icon you want to delete should not be selected before.
  • select delete from context menu and the icon disappears from favorites.

Adding QX Favourites

For adding Favourites in the X-Server environment see QX.

MP3 Audio

Media Player

Directory of MP3-Files

The Media-Player will expect audio MP3-file in the directory:

  /home/root/Documents/audio/mpeg

If want to store several MP3-file on your freerunner create a symbolic link of audio to your SD-card:

  neo# mkdir /media/card/audio
  neo# mkdir /media/card/audio/mpeg
  ln -s /media/card/audio /home/root/Documents/audio

Store MP3-files in /media/card/audio/mpeg

MP3-codec install

  • Install codec-installer from repository
  • Start codec-installer
  • Install MP3-codec
  • reboot you freerunner

Error Handling and Workarounds

During the installations above, the following problem occured:

Xdialog Problem with Gdk-WARNING

When encouter a GdK-Warning using Xdialog in scripts you can remove the warning with sed.

 sed 's/Gdk-WARNING ... locale not supported by C library//g

This warning is part of the return string of an inputbox in xdialog.

NOTE: This application sed is a workaround. The best solution is a modifacition that removes the GdK-warning itself.


Embedded in a script sed will remove the warning from the input string. A example script (modified from http://xdialog.free.fr) will work like this:

  #!/bin/sh
 
  Xdialog --title "INPUT BOX" \
     --inputbox "Enter URL:" 18 45 \
     "http://www123.Example-Test.com" 2> /tmp/inputbox.tmp.$$
  
  retval=$?
  input=`cat /tmp/inputbox.tmp.$$`
  rm -f /tmp/inputbox.tmp.$$
  
  
  input=`echo $input | sed 's/Gdk-WARNING ... locale not supported by C library//g'`
  # remove invalid character from URL
  input=`echo $input | sed 's/[^a-zA-Z1-9\/:\. \-]//g'`
  
  case $retval in
    0)
      echo "Input string is '$input'";;
    1)
      echo "Cancel pressed.";;
    255)
      echo "Box closed.";;
  esac

To test this script on your freerunner, you have to start it from the terminal in QX. Source of the xdialog script is used from http://xdialog.free.fr.

Apt-Get Problem jffs2

[Apt-Get] (jffs2) Couldn't make mmap ...: (solved with the following workaround) If that happens regularly, create two scripts apt-start and apt-stop. These scripts are used before and after apt-get use.

Create an APT-START Script

  • start vi for the script apt-start
 # vi /bin/apt-start 
  • press "I" for insert and enter the following code:
 #!/bin/sh
 mount -t tmpfs none /var/cache/apt
 mkdir -p /var/cache/apt/archives/partial
 apt-get update
 echo "apt-get can now be used"
 echo "stop with apt-stop"
  • press ESC and then ":w"
  • press ":q" for quit.
  • make the script executable with chmod:
  chmod u+x /bin/apt-start

Create an APT-STOP Script

  • start vi for the script apt-stop.
 # vi /bin/apt-stop 
  • press "I" for insert and enter the following code:
 #!/bin/sh
 umount /var/cache/apt
 echo "Now old settings for apt-get are restored"
  • press ESC and then ":w"
  • press ":q" for quit.
  • make the script executable with chmod:
  chmod u+x /bin/apt-stop

Usage of Scripts

If you to install software use the scripts before and after apt-get call:

 apt-start
 apt-get install mysoftware
 apt-stop

Replace mysoftware with the package you want to install e.g. linphone.


Data Safety / Boot Errors

Boot Errors due to Filesystem Corruption

In case your ext3 partition gets corrupted take out the sdcard from your freerunner, put it in a card reader and insert the card reader in one of the usb slots of your desktop linux system.
Find out the mount point of the ext3 partition but do not mount the partition. You can use the following command to find the partition:

 cat /proc/partitions

Now you can run from command line where /dev/sdXX is the qtmoko partition on your sd card (/dev/sdc2 in the example below):

 fsck /dev/sdc2

and you will be asked to confirm the error correction. If you just want to have any errors corrected run

 fsck -y /dev/sdc2

Backing up whole partitions

To backup whole partitions to your local desktop computer navigate to the directory where you'd like to have the files written to (in this case /home/limo/) open a terminal in that directory and run the two commands below (it assumes the following paritioning of the sdcard: 1st partition = vfat 2nd partition = qtmoko on some ext filesystem):

 ssh -t root@192.168.0.202 dd if=/dev/mmcblk0p1 ibs=4096 conv=notrunc,noerror | dd of=/home/limo/qtmoko_vfatpartition.img obs=4096
 ssh -t root@192.168.0.202 dd if=/dev/mmcblk0p2 ibs=4096 conv=notrunc,noerror | dd of=/home/limo/qtmoko_rootpartition.img obs=4096

or somewhat simpler do the folowing which works with busybox dd:

 ssh -t root@192.168.0.202 dd if=/dev/mmcblk0p1 bs=4096 > ~/qtmoko_vfatpartition.bs4096.img
 ssh -t root@192.168.0.202 dd if=/dev/mmcblk0p2 bs=4096 > ~/qtmoko_rootpartition.bs4096.img


Backing up your contacts

In contacts menu there is "Send All..." You can then send contacts using bluetooth or email. If you use email and you don't have smtp setup up, you can download the mail message from /home/root/Applications/qtopiamail and open in e.g. in kmail and save the VCF attachment.

Reinstallation of the contacts is much easier: After reinstall you can just click on it and QtMoko imports them. Regards

Links

SVG Keyboards (from QtMoko v45 onwards)

Since QtMoko v45 you can customize your keyboard via simple svg files which can be easily edited in inkscape. Here is the original post:

Layouts are completely customizable. You can easily change key size, position, background. It's very easy to add international characters and new layouts. Just have a look at /opt/qtmoko/etc/im/svgkbd/ The layouts are normal svg images. You can use inkscape to open and edit them. It should be very clear what to do. Only thing to explain is how you should name the key XML elements. In Inkscape go to Edit->XML editor and click on key. The element name must be in form:

key_QtKeycode_unicode

For possible QtKeycode values check this link qt-keycodes and for unicode values use your favourite unicode character map.

Manual installation

This installation will remove the original keyboards!!!
If you want to keep them backup everything in root@192.168.0.202:/opt/qtmoko/etc/im/svgkbd/

To install the keyboard download File:DE de.tar.gz, go to your download directory and use

 tar xvzf DE_de.tar.gz && scp DE_de/* root@192.168.0.202:/opt/qtmoko/etc/im/svgkbd/

to replace the original keyboards with the language specific ones.

Do not forget to restart QtMoko afterwards.

DE_de Layout

Installation via Package-Manger

Radek has packaged the keyboard as a .deb package so you can simple navigate to "more apps" and look for keyboards. Do not forget to restart QtMoko afterwards.