Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bluetooth in C++

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++.

like image 780
crocboy Avatar asked Apr 20 '12 23:04

crocboy


3 Answers

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

like image 99
TJD Avatar answered Nov 15 '22 23:11

TJD


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

like image 37
Raanan W Avatar answered Nov 15 '22 23:11

Raanan W


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.

like image 1
Pierre Avatar answered Nov 15 '22 22:11

Pierre