Reply
Thread Tools
Posts: 16 | Thanked: 1 time | Joined on Mar 2010 @ Germany
#1
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

Last edited by mboremski; 2010-09-20 at 19:11. Reason: added links
 
sampppa's Avatar
Posts: 166 | Thanked: 191 times | Joined on Dec 2007 @ Oulu, Finland
#2
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.
 
Posts: 16 | Thanked: 1 time | Joined on Mar 2010 @ Germany
#3
@sampppa,
Can i use the libbluetooth3-lib with Qt?
How can I install it? (Do I need to install it? )

Did you give me a link to a solution that dont work?

@all
Any other ideas?

TY so far
Markus
 
Posts: 121 | Thanked: 53 times | Joined on Aug 2006 @ Alexandria, VA, USA
#4
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.
 
Posts: 19 | Thanked: 7 times | Joined on Jan 2010 @ dallas, tx usa
#5
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.
 
Posts: 19 | Thanked: 7 times | Joined on Jan 2010 @ dallas, tx usa
#6
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..
 
Posts: 59 | Thanked: 36 times | Joined on Nov 2009
#7
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.
 
Posts: 227 | Thanked: 51 times | Joined on Feb 2006
#8
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...
__________________
David Smoot
 
Posts: 3 | Thanked: 0 times | Joined on Nov 2009 @ Germamy
#9
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.
 
Posts: 227 | Thanked: 51 times | Joined on Feb 2006
#10
I'm still very much interested in this... Would appreciate anything you've got working. Better than starting from zero.
__________________
David Smoot
 
Reply


 
Forum Jump


All times are GMT. The time now is 10:39.