Qtopia Home - Classes - Annotated - Functions - Qt Embedded

Running Qtopia

Introduction

This document describes the commands required to run Qtopia PDA and Phone. It is assumed that you have the Qtopia binaries. These will have been generated when the developer sdk, commercial sdk, or demo package (all .rpm packages) was installed.

Note that if you are using a Qtopia source package you will have to build the Qtopia binaries before proceeding.

Running Qtopia PDA

The location of the installed Qtopia binaries is dependent on the package used. The demo package and both the developer and commercial sdk packages place the binaries in /opt/Qtopia/bin and you have to set QPEDIR to /opt/Qtopia.

For those using the source package who have built the product themselves, the binaries will be in the your-qpe-source-dir/image/opt/Qtopia/bin directory.

For example, if you have installed Qtopia-phone-source-2.0.0-1 in ~/dev/qtopia-pda-2.0.0 then you have to set QPEDIR to ~/dev/qtopia-pda-2.0.0/image/opt/Qtopia.

Environment Variables

Running Qtopia Phone

The location of the installed Qtopia binaries is dependent on the package used. The demo package and both the developer and commercial sdk packages place the binaries in /opt/Qtopia/bin and you have to set QPEDIR to /opt/Qtopia. This is normally the case when Qtopia is installed from an .rpm package.

For those using the source package (e.g. qtopia-phone-source-2.x.x.tar.gz) who have built the product themselves, the binaries will be in the your-qpe-source-dir/image/opt/Qtopia/bin directory.

For example, if you have installed Qtopia-phone-source-2.0.0 in ~/dev/qtopia-phone-2.0.0 then you have to set QPEDIR to ~/dev/qtopia-phone-2.0.0/image/opt/Qtopia.

Running Qtopia Phone from the /opt/Qtopia directory

The Qtopia phone can be run either from a script or by manually working through the steps.

The Script

For the convenience of the script type:

/opt/Qtopia/bin/startphonedemo

The Manual Process

To work through the mechanics yourself:

Running Qtopia Phone from an image directory

If you have built Qtopia Phone yourself then the binaries end up in the image/opt/Qtopia subdir of your package directory. For example, if your Qtopia Phone package is installed in ~/dev/qtopia-phone-2.0.0 and you have built the source then the resulting binaries can be found in ~/dev/qtopia-phone-2.0.0/image/opt/Qtopia.

To run Qtopia phone from the image directory:

   export QTEDIR= wherever_you_installed_qt-embedded
   cd into your-qtopia-phone-package-dir (example: cd ~/dev/qtopia-phone-2.0.0)
   cd image/opt/Qtopia
   export QPEDIR=$PWD
   export QTDIR=$QPEDIR
   export PATH=$QPEDIR/bin:$QTEDIR/bin:$PATH

   # To run Qtopia phone with the phone simulator...
   export QTOPIA_PHONE_DEVICE=sim:localhost

   qvfb -skin $QPEDIR/bin/SmartPhone.skin &
   phonesim $QPEDIR/etc/troll.xml &
   qpe

The main difference between building and running Qtopia is in relation to QPEDIR:

Connecting Qtopia Phone to a phone device

Qtopia Phone is the phone GUI software that runs on a mobile phone. To make a 'real' phonecall you will need the electronics to connect to a phone network. These electronics are assumed to be in the phone device itself. This section describes how the Qtopia Phone software can be connected to the phone device hardware.

Using a phone simulator

The phone simulator is an internal tool used to test part of Qtopia Phone's functionality. It simulates part of the phone's modem functionality and can be the first step in debugging software. The simulator has been included this in the package because it is well suited to illustrating the capabilities of Qtopia Phone. Please be advised however that the phone simulator is an unsupported tool that is provided as is.

You can connect Qtopia Phone to the simulator using the following command:

   export QTOPIA_PHONE_DEVICE=sim:localhost
This must be set before Qtopia AND the simulator are started. It is also possible to run Qtopia Phone on one machine (embedded device) and the phone simulator on another machine. To do this replace localhost with the name of the machine on which the phonesim is running.

You can find more information about the phone simulator in the tools section of the reference documentation. To be able to 'call' to peers in the same network you have to modify the peers.xml file and enter machine names that are valid within your network environment.

Using a phone device

You can also connect Qtopia Phone to a real phone device using a serial connection. Please be advised that the phone device must support the standard AT commands. To connect use the following command:

    export QTOPIA_PHONE_DEVICE=/dev/ttyS1:115200
where:

This env variable must be set before qtopia phone is started. Entering a baud rate after the serial port name is optional and depends on the actual modem being used. In this case it is not necessary to start the phonesim application (although it doesn't cause problems if it does run).

Using a real phone

Qtopia Phone is tested with real phones such as the Ericson T39M. To connect to a phone you must use the serial cable provided with the phone and again use the command:

    export QTOPIA_PHONE_DEVICE=/dev/ttyS1:115200
where:

This env variable must be set before qtopia phone is started. In this case it is not necessary to start the phonesim application (although it doesn't cause problems if it does run).


Copyright © 2001-2004 Trolltech Trademarks
Qtopia version 2.0.1