Bluetooth in C++
Asked Answered
B

3

10

I am looking to communicate via RFCOMM to another Bluetooth device. I want to use C++ (VS2008) for the application. I already know of the 32feet library, but was unsure if it would work for C++. Does anyone know of a good starting point for this kind of project? Or possibly 32feet samples written in C++? I want a simple, easy to use API for Bluetooth using C++.

Blackpoll answered 20/4, 2012 at 23:45 Comment(0)
M
4

You can do Bluetooth programming using BT sockets into the OS Bluetooth stack. This page discusses socket usage: http://msdn.microsoft.com/en-us/library/windows/desktop/aa362928(v=vs.85).aspx

This page has links to download Bluetooth SDK from Microsoft: http://msdn.microsoft.com/en-us/library/windows/desktop/aa363058(v=vs.85).aspx

Mccullers answered 20/4, 2012 at 23:56 Comment(0)
R
5

This question is rather old, I know.

Just wanted to update, that Qt Framework has now Qt Bluetooth for C++ that looks very promising -- http://doc.qt.io/qt-5/qtbluetooth-module.html

Reiterant answered 25/2, 2015 at 13:43 Comment(4)
No support on windows yet.Currently, the API is supported on the following platforms: Android, iOS, Linux (BlueZ 4.x/5.x) and OS X from hereMummy
Old questions tend to be the ones that pop up first on Google searches. :) Updating with new info is always good.Ancel
Qt's Bluetooth stack (as of May 2023) still has lots of bugs, even their examples don't work consistently. Lost many dev hours trying to make the Qt BT stack work.Venule
@TSG, I second that. It doesn't work properly and it shows different behavior on different platforms.Turfman
M
4

You can do Bluetooth programming using BT sockets into the OS Bluetooth stack. This page discusses socket usage: http://msdn.microsoft.com/en-us/library/windows/desktop/aa362928(v=vs.85).aspx

This page has links to download Bluetooth SDK from Microsoft: http://msdn.microsoft.com/en-us/library/windows/desktop/aa363058(v=vs.85).aspx

Mccullers answered 20/4, 2012 at 23:56 Comment(0)
U
1

Building apps using the Microsoft stack works fairly well (XP and Vista work great, trying to run the same apps under Windows 7-64bit does not work so well...)

The real advantage to 32feet.net is that the Bluetooth support on Windows is heavily Balkanized - you never know on a given machine whether it is using the Microsoft, Broadcom, Toshiba, BlueSolei, or some other stack. While these are all mostly compatible over-the-air, the APIs are completely different for each. Building with 32feet.net lets your application run on a larger subset of machines... That said, I have not tried building it into a C++ application - sorry.

Ursula answered 6/9, 2013 at 19:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.