Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Need Help on: Building a Bluetooth APP in Qt

    Reply
    Page 1 of 3 | 1   2     3   | Next
    mboremski | # 1 | 2010-09-20, 19:06 | Report

    Hello,

    I am NEW to writing apps in Qt.
    Until now i programmed software for small microcontrollers (like AVR).
    I also programmed some small apps for console in C.

    So please forgive me if i have to ask step by step:

    My Idea:
    I got a Bluetooth-Module (BlueNiceCom III pdf) and combined it with an AVR.
    This module is sending Data via SPP-Protokoll.
    I wan tto write a GIU-APP that converts this data in e.g. bar graph or text in a first step.

    Until now
    My brohter helped me out writing a small console app (in C) to see the incoming data in the terminal.
    We compiled it directly on the N900.. But the compiler and all its parts was so big.. so I had to remove it (and unfortunately reflash my N900).
    So far i know a bit about how bluetooth as SPP works (own file for the opened connection / rfcomm and so on)

    Bevore i forget.
    I have:
    WondowsXP
    Nokia Qt SDK
    MADDE
    and of course a N900.. ;-)

    Now I want to start (and go on ) with Qt to get what I need.
    I had my first experiences in writing a "hello World"-APP and my C++ is getting better.

    My next step (and my first questions) is to establish a bluetooth connection to a known (MAC-address) bluetooth device.
    Does anyone have any experiences in connecting a bluetooth-device (via SPP) with Qt?
    Is there a lib that i can use? (and how can I?)

    I found the QBluetooth-lib.. But its only for symbian devices..

    I hope I dont get awnsers like : rtfm..
    better would be: rtfm "here", "here" and "here" ...

    TY so far,
    Markus

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by mboremski; 2010-09-20 at 19:11. Reason: added links

     
    sampppa | # 2 | 2010-09-21, 12:37 | Report

    Hi

    I once tried to compile qt bluetooth from qt-extented but i never got it to work. I think it is not working anymore on top of the new bluez version.
    http://doc.qt.nokia.com/qtextended4....othmodule.html

    I think that at the moment the only way to use bluetooth is with libbluetooth3 library.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    mboremski | # 3 | 2010-09-21, 15:09 | Report

    @sampppa,
    Can i use the libbluetooth3-lib with Qt?
    How can I install it? (Do I need to install it? )

    Originally Posted by sampppa View Post
    http://doc.qt.nokia.com/qtextended4....othmodule.html
    Did you give me a link to a solution that dont work?

    @all
    Any other ideas?

    TY so far
    Markus

    Edit | Forward | Quote | Quick Reply | Thanks

     
    talmage | # 4 | 2010-09-21, 20:00 | Report

    There's a little mention of it on http://qt.nokia.com/. I guess you have already tried searching there.

    Qt 4.7 has some nifty new APIs for mobility. Maybe there is something for you in the Messaging API or the Service Framework.

    It seems to me that once you pair your N900 with your new hardware device that there ought to be some simple way of addressing it over a socket.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    nilsbenson | # 5 | 2010-09-23, 01:07 | Report

    There isn't an easy way to do this as far as I know. I am currently doing something similar (attempting to connect to an SPP device over Bluetooth).

    The Maemo UI doesn't allow you to conifigure SPP devices. In some limited instances it will set one up, but if you want to use it in your app you have to do it yourself.

    To do this the best(?) way I have found is to talk to BlueZ over D-Bus. Python is the easiest language to do use for this. In my app I do the following:

    1) Connect to bluez and enumerate all paired bluetooth devices
    2) for each device I query the services it offers
    3) I build a list of every device that reports SerialPort as a service
    4) Connect to the SerialPort service on the device - this will establish the SPP connection and will set up a device file for you to access. The Connect() function on the bluez Device D-Bus object will return the name of the file to access. Then it's just like opening a regular device file for serial IO.

    There may be a way to do all that using some bluez tools (I am pretty sure there is), but I have chosen to do it via code.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    nilsbenson | # 6 | 2010-09-23, 04:09 | Report

    If you can wait a week or so (leaving town tomorrow) I can post a Bluetooth manager I'm putting together in C++ / QT. It will be able to enumerate BT devices, and make serial connections. That is all, but will show you what you need to do to continue..

    Edit | Forward | Quote | Quick Reply | Thanks

     
    alex25 | # 7 | 2010-09-23, 06:13 | Report

    Originally Posted by nilsbenson View Post
    If you can wait a week or so (leaving town tomorrow) I can post a Bluetooth manager I'm putting together in C++ / QT. It will be able to enumerate BT devices, and make serial connections. That is all, but will show you what you need to do to continue..
    I'm also working on a Qt application that has to communicate with bluetooth devices (bluetooth heart beat chest and bluetooth OBD2 car adapter)
    Until now I don't have a solution. So your input would be very helpful. The application should also work on symbian devices.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    djs_tx | # 8 | 2010-10-03, 04:15 | Report

    Originally Posted by nilsbenson View Post
    If you can wait a week or so (leaving town tomorrow) I can post a Bluetooth manager I'm putting together in C++ / QT. It will be able to enumerate BT devices, and make serial connections. That is all, but will show you what you need to do to continue..
    I'm interested in this too. I'm a little disappointed that QT appears to have no native bluetooth API...

    Edit | Forward | Quote | Quick Reply | Thanks

     
    discus-axel | # 9 | 2010-10-20, 09:50 | Report

    Originally Posted by nilsbenson View Post
    If you can wait a week or so (leaving town tomorrow) I can post a Bluetooth manager I'm putting together in C++ / QT. It will be able to enumerate BT devices, and make serial connections. That is all, but will show you what you need to do to continue..
    Hi,

    I am a newbie in BT and it would a great help for me to get the promise C++/Qt example.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    djs_tx | # 10 | 2010-11-01, 02:41 | Report

    I'm still very much interested in this... Would appreciate anything you've got working. Better than starting from zero.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Page 1 of 3 | 1   2     3   | Next
vBulletin® Version 3.8.8
Normal Logout