Results 1 to 2 of 2

Thread: Linux Maemo Development Guide For Nokia QT SDK

  1. #1
    Join Date
    Jan 2009
    Posts
    1,738

    Linux Maemo Development Guide For Nokia QT SDK

    This guide is for Nokia QT SDK for Linux OS

    Though of creating a quick and easy to refer guide to getting started in Maemo including setting up the environment, creating a basic ‘HeyAll’ program and running it on the Nokia N900.

    Tested on 32 bit Ubuntu 9.04 running on a Core 2 Duo.

    1. Remove Old SDK

    Just to ensure that there are no issues with two SDKs, we will start by remove the old SDK. Run the SDKMaintenanceTool. This should be located as a menu item.

    If you don't have it in any menu on your menu bar, Find it from the installation location.

    Once you run it, simply select the tab ‘Package Manager’, then select the option ‘Remove all components’, and then finally click on ‘Next’.

    Now just click on ‘Uninstall’. Now the Nokia SDK will be uninstalled completely. Now click ‘Finish’ to exit the uninstall tool.

    2. Installing QT SDK

    Download the current Nokia QT SDK from nokia’s website by going to the following link :
    Download Nokia QT SDK

    You will now need to change permissions of the downloaded file so that it can be executed and installed. Open terminal navigate to the folder where you have downloaded the file and run :

    Code:
    chmod u+x Nokia_Qt_SDK_Lin32_offline_v1_0_en
    Now the file is ready to run.

    Code:
    ./Nokia_Qt_SDK_Lin32_offline_v1_0_en
    If you get any error while running the installation file with the above command, you may need administrative right. Simply use the following command to run :

    Code:
    sudo ./Nokia_Qt_SDK_Lin32_offline_v1_0_en
    Follow the on screen instructions and select full install. You may want to remove the old QT SDK settings. You are free to do so. The installation process may take a while, so just wait till it finishes.

    3. Rebuilding Qt SDK Debugging Helper

    Now Qt SDK is installed, but there is still one more important thing that needs to done before we start creating codes. We need to make sure that the debugging helpers are built and working properly.

    Now Run QT SDK and follow navigate to Tools > Option > QT4. Now click on "Qt for Fremantle PR1.2 Devices (Nokia Qt SDK)" then click on "Rebuild". You will then notice that the error indicated by red cross is now a Go indicated by green tick mark.

    Again follow the same process for "Simulator Qt for GCC (Nokia Qt SDK)" and then click Ok to exit.

    Now lets configure our Nokia N900 device.

    4. Setting up Nokia N900

    Now add the Nokia N900 to Qt SDK and use one click testing and deployment on nokia device itself.

    In this guide we will use wifi instead of USB cables, after all, this is the wireless age! Ok, Let get the N900 ready for use.

    If you are not on the latest firmware, it is recommended that you update your phone to the latest available firmware. You can check for the any available firmware updates by going to : Menu > Settings > About Product.
    It should be on the Firmware Version: 10.2010.19-1.203.1 and make sure you have setup the extras repository.

    Now run the App Manager : Menu > App Manager.

    Now choose the Application Manager title and then choose Application Catalogues, you can check to make sure you have maemo.org or Maemo Extras. If you have both repositories, then you need to disable Maemo Extras.

    Now open maemo.org which should show you the following information :
    Code:
    Catalog name: maemo.org
    Web address: http://repository.maemo.org/extras/
    Distribution: fremantle-1.2
    Components: free non-free
    Now choose Download > Development > mad-developer

    This will communicate with Qt SDK and will allow it to deploy code on your N900 device.

    Now install the client. You will be ask to setup a new root password. Please keep it as simple as possible so that you do not forget it.

    5. Adding the N900 device to Qt SDK

    Load Mad Developer if it is not already loaded.

    Now this should show you your IP address on wlan0.

    On your QT SDK go to Tools > Options > Projects > Maemo Device Configurations.

    Click on the Add button. It will now add the N900 device, and show you the following information :

    Code:
    Name: Nokia N900
    Device Type: Select Remote device
    Authentication Type: Select Password
    Host Name: here input the IP which is shown on the N900 device
    Username: developer
    Password: Choose the "Developer Password" on the N900 device and it here
    Now click 'Test' and check everything works.

    You should now get the following information :

    Code:
    Device configuration successful. 
    Hardware architecture: armv7l 
    Kernel version: 2.6.28-omap1 
    List of installed Qt packages: 
        libqt4-core 4.6.2 
        libqt4-dbus 4.6.2 
        libqt4-gui 4.6.2 
        libqt4-maemo5 4.6.2 
        libqt4-maemo5-core 4.6.2 
        libqt4-maemo5-dbus 4.6.2 
        libqt4-maemo5-gui 4.6.2 
        libqt4-maemo5-maemo5 4.6.2 
        libqt4-maemo5-xml 4.6.2 
        libqt4-multimedia 4.6.2 
        libqt4-network 4.6.2 
        libqt4-opengl 4.6.2 
        libqt4-phonon 4.6.2 
        libqt4-sql 4.6.2 
        libqt4-sql-sqlite 4.6.2 
        libqt4-svg 4.6.2 
        libqt4-webkit 4.6.2 
        libqt4-xml 4.6.2 
        libqt4-xmlpatterns 4.6.2
    Now you can close the information box. You must provide a new password everytime you load Mad-Developer.

    Hence, we must deploy a key to make sure we can load Mad-Developer on our N900 device which is usable. Well, encrypted keys are not yet supported. I cannot ensure it will be supported in future.

    Now Click 'Generate SSH Key'

    A new message box will be show. Now here choose the key size as 4096. Once done, then click on 'Generate SSH Key'.

    Once you get the key, click 'Save Public Key' and again click on 'Save Private Key' as well.

    Make sure you keep these keys saved in some safe location. Now go back to Maemo Device Configuration by clicking close.

    If you want to change the Private Key location, change the 'Authentication Type' to 'Key' and after that click browse and select the new private key that you just created.

    Now again change 'Authentication Type' to 'Password' and click on 'Deploy Public Key'. Now a dialog box asking to select the public key will appear. Click on the one public key file you just saved before and click on open.

    Now you will get a message saying : 'Key was successfully deployed'

    Now again change the Authentication Type back to 'Key' and test to make sure it successfully connects.

    Now close the current screen by clicking on Ok which will take you to the main screen.

    Now justs make our first ‘Hey All’ Program.

  2. #2
    Join Date
    Jan 2009
    Posts
    1,738

    Re: Linux Maemo Development Guide For Nokia QT SDK

    6. Creating 'HeyAll' Program

    Lets just make a simple push button, which when pressed, will pop up a message on the screen saying ‘Hey All!’

    Make sure you are on the Welcome screen of QT SDK.

    Click Create Project.

    Select Mobile QT Application, then click ‘Choose’

    Set the name as HeyAll before clicking Next.

    Now make sure you select ‘Qt for Fremantle PR1.2 Devices (Nokia QT SDK)’ as well as ‘Simulator QT for GCC (Nokia Qt SDK)’ after which you are ready to click Next.

    Again click Next when you see the Class Information screen and click on Finish.

    You should be in Design mode by default.

    Now select and drag a "Push Button" on to the main window.

    Right-Click on the Button which you just placed on the windows and click 'Go to slot...'. Now select the 'Clicked()' option and click on Ok. This is similar to Visual Basic codes which has similar properties.

    Now if you receive an error saying not being able to find/add a slot, just ignore it, it a bug. Simply click on Ok to exit the error.

    There should be button labelled 'Debug' on the bottom left hand side, click it once and Select the Top one, Maemo. Wait for few moments for scanning/parsing process.

    Now click on the Qt Simulator. You will now be able to right-click on the new button that you added to the sample application. Right-Click and select 'Go to slot...'. Now click on 'Clicked()' and click Ok.

    You should now add the following code to ‘MainWindow::on_pushButton_clicked()’ :

    Code:
    void MainWindow::on_pushButton_clicked()
    {
        QMessageBox msgBox;
            msgBox.setText("Hey All!");
            msgBox.exec();
    }
    All you need to add now is the header, which can be done from right to the top of the editor by add the below codes:
    Code:
    #include "mainwindow.h"
    #include "ui_mainwindow.h"
    #include <QMessageBox>
    That’s all, we’re done with the sample code programming.
    To run on the program on the computer simulator, just click on the ‘Run’ button. You will be asked to save, just click on ‘Save All’.

    After sometime you will receive an image of the N900 with a button. Click on the button and you will get ‘Hey All!’.

    To run this program, on the N900, just click the Debug button and then choose the Maemo option. Now click the run button or just hold CTRL+R.

    The application will now be running on your Nokia N900.

Similar Threads

  1. Replies: 5
    Last Post: 23-01-2011, 07:54 PM
  2. Which linux distro should install for maemo SDK
    By Priyamada in forum Portable Devices
    Replies: 4
    Last Post: 23-01-2011, 03:11 PM
  3. Maemo Linux OS for Nokia N900
    By Edmund in forum Reviews
    Replies: 2
    Last Post: 17-01-2011, 02:00 AM
  4. Can Maemo 5 be upgraded to Maemo 6 in Nokia N 900
    By Karumbu in forum Operating Systems
    Replies: 4
    Last Post: 15-01-2011, 12:54 AM
  5. What will be the future development of Linux?
    By Edwards in forum Operating Systems
    Replies: 5
    Last Post: 21-03-2010, 02:39 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,926,718.74061 seconds with 17 queries