Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

Connecting Maemo Devices

Maemo 5 (Fremantle) is a Linux-based software platform developed by Nokia for mobile devices. It allows developers to create applications using the Qt framework. You can install the whole tool chain that you need to create, build, debug, run, and deploy Maemo 5 applications as a part of the custom installation in the Qt SDK online installer.

For more information about the Maemo 5 platform, see Software Platform on the Maemo web site. For more information about developing applications for the Maemo 5 platform, select Help > Index and look for Platform Notes, or see Platform Notes - Maemo 5.

Hardware and Software Requirements for Maemo Target

To build and run Qt applications for Maemo 5, you need the following:

  • Maemo 5 device: Nokia N900 with software update release 1.3 (V20.2010.36-2) or later installed.
  • MADDE cross-platform Maemo development tool (installed as part of the Qt SDK).
  • Nokia USB drivers.

    Only needed if you develop on Windows and if you use a USB connection to run applications on the device. The drivers are installed as part of the Qt SDK. You can also download them from PC Connectivity on the Maemo web site. Download and install the latest PC_Connectivity_<version>.exe (at the time of writing, PC_Connectivity_0.9.4.exe).

Note: The only supported build system for Maemo 5 in Qt Creator is qmake.

Setting Up Connectivity in Maemo Devices

You can connect your device to your development PC using either a USB or WLAN connection.

For the device, you need to use a connectivity tool (Mad Developer) to create the device-side end point for USB and WLAN connections. It provides no diagnostics functions but is essential for creating connections between the device and your development PC.

To use a WLAN connection, you must activate WLAN on the device and connect it to the same WLAN as the development PC. The network address is displayed in the connectivity tool.

To use a USB connection, you need to set up the device as a network device on the development PC.

Note: If you plan to connect your development PC to the device only over WLAN, you can ignore the USB-specific parts in the following sections.

Installing and Configuring Mad Developer

Install Mad Developer on a Nokia N900 device and configure a connection between the development PC and a device.

Note: The following instructions describe Mad Developer 2.1. The process and text labels might differ on other Mad Developer versions.

To install and configure Mad Developer:

  1. On the Nokia N900, select App Manager > Download > Development > mad-developer to install the Mad Developer software package.
  2. Click Mad Developer to start the Mad Developer application.
  3. To use a WLAN connection, activate WLAN on the device and connect to the same network as the development PC. You can see the network address in the wlan0 field.
  4. To use a USB connection:
    1. If you are using Microsoft Windows as development host, you must change the driver loaded for instantiating the connection. In the Mad Developer, select Manage USB and select Load g_ether.
    2. To set up the USB settings, click Edit on the usb0 row and confirm by clicking Configure.

      Note: By default, you do not need to make changes. The usb0 row displays the IP address 192.168.2.15.

  5. Select Developer Password to generate a password for a freshly created user called developer. The password stays valid for as long as the password generation dialog is open. You enter the password when you configure the connection in Qt Creator.

Installing Qt Mobility Libraries

To develop applications for the Nokia N900 devices that use the Qt Mobility APIs, you must install the Qt Mobility Libraries on the devices. The libraries are not available in the device package manager, and therefore, you must install them from the command line as the root user:

  1. On the device, in Programs, select X Terminal to open a terminal window.
  2. To install Qt Mobility libraries, enter the following command: /usr/lib/mad-developer/devrootsh apt-get install libqtm-*
  3. To confirm the installation, enter: Y
  4. Close the terminal.

Setting Up USB Connections to Maemo Devices

Use the network configuration tools on your platform to specify the USB connection to the device on the development PC. You do not need to do this if you use a WLAN connection.

Linux

The device uses the IP address 192.168.2.15 with the subnet 255.255.255.0 for its USB connection by default, so you can create the network interface with a different address inside the same subnet too.

Note: If you have changed the IP address of the device in the connectivity tool, you need to reflect those changes in your development PC USB network settings.

Run the following command in a shell as root user: ifconfig usb0 192.168.2.14 up

Windows

When you connect the device to your Windows PC, Windows tries to install a driver for the Linux USB Ethernet connection. In the Found New Hardware Wizard, select No, not this time in the first dialog and Install the software automatically in the second dialog.

To specify a network connection:

  1. Open the Network Connections window.
  2. Select the Linux USB Ethernet connection that is displayed as a new Local Area Connection.
  3. Edit the Internet Protocol Version 4 (TCP/IPv4) properties to specify the IP address for the connection. In the Use the following IP address field, enter the following values:
    • IP Address: 192.168.2.14
    • SubnetMask: 255.255.255.0
    • Default gateway: leave this field empty

Depending on your version of Microsoft Windows you may have to unplug and re-plug the device to reload the driver with its configuration accordingly.

Configuring Connections to Maemo Devices

To be able to run and debug applications on the Maemo emulator and devices, you must set up connections to the emulator and devices in the Qt Creator build and run settings. If you install Qt SDK, the connection to the emulator is configured automatically and you only need to configure a connection to the device.

You use a wizard to create the connections. You can edit the settings later in Tools > Options... > Linux Devices > Device Configurations.

"Maemo Device Configurations dialog"

By default, you create the connection as the developer user. This protects real user data on the device from getting corrupted during testing. If you write applications that use Qt Mobility APIs, you might want to test them with real user data. To create a connection as a user, specify the Username and Password in Qt Creator. For more information, see Testing with User Data on Maemo Devices.

You can protect the connections between Qt Creator and a device by using either a password or an SSH key. If you use a password, you must generate it in the connectivity tool and enter it in Qt Creator every time you start the connectivity tool.

If you do not have an SSH key, you can create it in Qt Creator. Encrypted keys are not supported. For more information, see Generating SSH Keys.

You can view processes running on devices and kill them. For more information, see Managing Device Processes.

To configure connections between Qt Creator and a device:

  1. To deploy applications and run them remotely on devices, specify parameters for accessing devices:
    1. Connect your device to the development PC via a USB cable or a WLAN. For a USB connection, you are prompted to select the mode to use. Choose PC suite mode.

      Note: If you experience connection problems due to a USB port issue, switch to a different port or use WLAN to connect to the device.

    2. Select Tools > Options... > Linux Devices > Device Configurations > Add, and add a new configuration for a hardware device.

      "Maemo device configuration"

    3. In the The name to identify this configuration field, enter a name for the connection.
    4. In the The system running on the device field, select the software platform of the device.
    5. In the The kind of device field, select Hardware device.
    6. In the The device's host name or IP address field, enter the IP address from the connectivity tool on the device.
    7. In the The SSH server port field, enter the port number to use for SSH connections.
    8. Click Next.
    9. Follow the instructions of the wizard to create the connection.
  2. To test applications on the emulator (QEMU) separately, you must create a connection to it from the development PC. If you installed Qt SDK, the connection is created automatically and you can omit this step.
    1. In Qt Creator, select Tools > Options... > Linux Devices > Device Configurations > Add to add a new configuration.

      "Maemo emulator configuration"

    2. In the The name to identify this configuration field, enter a name for the connection.
    3. In the The system running on the device field, select the software platform to emulate.
    4. In the The kind of device field, select Emulator (Qemu).
    5. Click Next.
    6. Follow the instructions of the wizard to create and test the connection.
  3. To specify build and run settings:
    1. Open a project for an application you want to develop for your device.
    2. Click Projects to open the projects mode.
    3. In the Build Settings section, choose the MADDE Qt version that was registered by the installation program.

      "Maemo build settings"

    4. In the Run Settings section, click Add to add a new deploy configuration. The configuration is named automatically. To give it a new name, click Rename.
    5. In the Device configuration field, select the device connection or the emulator connection.

      "Maemo run settings"

    6. Click <no target path set> in Remote Directory to specify the folder where the file is installed on the device. For example, /opt/usr/bin.

Testing with User Data on Maemo Devices

To run your application as the default user, you must first assign a password for the user account and then create the connection to the device as the user:

  1. On the device, in Programs, select X Terminal to open a terminal window.
  2. To specify the password, enter the following command: /usr/lib/mad-developer/devrootsh passwd user
  3. In Qt Creator, select Tools > Options... Linux Devices > Device Configurations.
  4. Specify the username user and the password in the device configuration.

Troubleshooting Connections to Maemo Devices

The addresses used in this example might be reserved by some other application in your network. If you cannot establish a connection, try the following optional configurations:

IP Address and Network on DeviceUSB Network on Development PCHost Name in Qt Creator Build Settings
172.30.7.15 255.255.255.0172.30.7.14 255.255.255.0172.30.7.15
10.133.133.1510.133.133.1410.133.133.15
192.168.133.15192.168.133.14192.168.133.15

Note: You cannot use the value localhost for connections to a device.

Note: VPN connections might block the device connection.

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.

[0]; s.parentNode.insertBefore(ga, s); })();
Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 44
  2. Microsoft ouvre aux autres compilateurs C++ AMP, la spécification pour la conception d'applications parallèles C++ utilisant le GPU 22
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. RIM : « 13 % des développeurs ont gagné plus de 100 000 $ sur l'AppWord », Qt et open-source au menu du BlackBerry DevCon Europe 0
  5. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  6. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  7. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
Page suivante

Le Qt Quarterly au hasard

Logo

XQuery et la météo

Qt Quarterly est la revue trimestrielle proposée par Nokia et à destination des développeurs Qt. Ces articles d'une grande qualité technique sont rédigés par des experts Qt. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtcreator-2.3
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web