Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. N900 + Bluetooth
Forum Updated to NodeBB v4.3 + New Features

N900 + Bluetooth

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 2 Posters 3.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    duniu_bartek
    wrote on last edited by
    #1

    Hi all!
    How can i creating simple application on Maemo 5 with using Bluetooth? I want to create simple applications sending data to external device.
    Could anybody show me sample with comments of code ?

    1 Reply Last reply
    0
    • F Offline
      F Offline
      favoritas37
      wrote on last edited by
      #2

      What you need, is the Connectivity API from Qt Mobility 1.2. The following link has any information needed on that and contains some examples as well:
      http://doc.qt.nokia.com/qtmobility-1.2/connectivity-api.html

      1 Reply Last reply
      0
      • D Offline
        D Offline
        duniu_bartek
        wrote on last edited by
        #3

        Ok, I know that need Connectivity API from Ot Mobility, but I can't add to my project QBluetooth library. In my app I want used Accelerometer (works seamlessly) and Bluetooth to control other electronic devices (Remote contolled cars). What must i do to add QBluetooth library to project?

        Thanks for your help :)

        1 Reply Last reply
        0
        • F Offline
          F Offline
          favoritas37
          wrote on last edited by
          #4

          Before you begin make sure you have installed the latest version of Qt and Qt Mobility because Bluetooth was added not much long ago. So to be sure, i would suggest to run an update from the Maintenance tool in the Qt Creator.

          Then regarding you project changes:
          First add to your .pro file the following declaration to make that module of Qt Mobility available:
          @
          CONFIG += mobility
          MOBILITY = connectivity
          symbian {
          TARGET.CAPABILITY = LocalServices UserEnvironment ReadUserData WriteUserData NetworkServices
          }
          @

          Then in whichever class you need to use QBluetooth, you will add in the header a declaration like the following, depending on which QBluetooth classes you want to use (the following code is taken by bluetooth tennis example)
          @
          #include <qbluetoothserviceinfo.h>
          #include <qbluetoothsocket.h>

          QTM_BEGIN_NAMESPACE
          class QL2capServer;
          class QBluetoothSocket;
          class QBluetoothServiceInfo;
          QTM_END_NAMESPACE

          QTM_USE_NAMESPACE
          @

          The examples in the link posted above has all the information you are going to need.

          1 Reply Last reply
          0
          • D Offline
            D Offline
            duniu_bartek
            wrote on last edited by
            #5

            Hi

            I add to my .pro file following definition
            @CONFIG += mobility
            MOBILITY = connectivity
            symbian {
            TARGET.CAPABILITY = LocalServices UserEnvironment ReadUserData WriteUserData NetworkServices
            }@

            But still I have problem with add qbluetooth library to project. When use QT Simulator all is well. When use Maemo5 the compiler gives me error:

            "error:Qbluetoothserviceinfo: No such file or directory
            C:\Users\Bartek\Desktop\test2\test2\mainwindow.h"

            Must I add qbluetooth library and other BT library to my project folder?

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved