Building Symbian Applications under Linux using Qt Creator

Prerequisites

To build Symbian Applications under Linux, you need a pre-built version of Qt for Symbian as described in Symbian development using Linux [labs.trolltech.com].

While building Qt requires a full setup, compiling applications using Qt Creator only requires:

  1. One of the supported compilers:
    1. RVCT version 2.2 build686 (native Linux compiler): Using this compiler requires setting up some environment variables. It is located via the environment variable RVCTBIN (for example, RVCT22BIN for 2.2). In addition, the environment variable ARMLMD_LICENSE_FILE should point to the license and the variablesRVCTASMOPT, RVCTCCOPT and RVCT_LINKOPT should contain the correct license settings.
    2. GNU Compiler Collection for Embedded (GCCE), version 3.4.3: The path to the installation folder can be specified in the Qt Versions settings page of Qt Creator.
  2. An installation of GnuPoc (with the S60 SDK installed, as described in the blog post [labs.trolltech.com] ).
  3. A working connection to the device (see below).
  4. A version of Qt built with that setup (in-source build, no shadow-build) and installed on the device.

To register the GnuPoc SDK, choose Tools > Options Qt 4 > S60 SDKs and click on Add. You will be prompted for the GnuPoc installation folder and the Qt folder in turn. The SDK entry will then show up in the list.

You should then be able to build projects by choosing GnuPoc / Qt as Qt version along with one of the toolchains RVCT or GCCE, and to run them with a run configuration set up to deploy on the respective device obtained from the connection setup.

Connecting to a Device using USB Serial Communications

Very recent Linux kernels should be able to detect the USB serial port on the phone. However, this can also be done manually for older kernels. Running the command

  1. lsusb

should list the phone, for example:

  1. Bus 002 Device 004: ID 0421:0154 Nokia Mobile Phones

The usbserial-Module can then be loaded by running:

  1. modprobe usbserial vendor=0x0421 product=0x0154

Where the product and vendor ids are obtained from the previous lsusb-command.

This should lead to the creation of two devices /dev/ttyUSB0 and /dev/ttyUSB1. On the latter, App TRK should respond after a small delay. When using older phones, only /dev/ttyUSB0 might be created.

The connection can be tested in Qt Creator by choosing the device /dev/ttyUSB1 in the run configuration settings (Project-mode) and clicking on the Info-button. Information about the version of App TRK should appear.

Connecting to a Device using Bluetooth

If you have a working Bluetooth-setup, a Bluetooth-icon should appear in the taskbar of your desktop after plugging in an USB-Bluetooth adapter. Click on the icon, choose Settings and verify that the port is assigned a name and is visible.

With the necessary permissions, execute the command:

  1. sdptool add SP

to announce the serial port profile via Service Discovery Protocol.

Launch App TRK on the phone, change its connection settings to Bluetooth and connect to the port.

On the host side, Bluetooth communication is handled via the device /dev/rfcomm0. The connection can be tested in Qt Creator by choosing that device in the run configuration settings (Project-mode) and clicking on the Info-button. Information about the version of App TRK should appear.

Categories: