Bluetooth for Microsoft Windows XP
Bluetooth was first introduced by Ericsson 1998 and the first Bluetooth phone was on the marked in 2000. However, I have until recently had a really hard time getting my Bluetooth phones to talk with a traditional PC. One of the first SDK for PCs was only available on the Linux system and I needed something that could run on a Windows PC.
This page describes how to get Bluetooth to run on a Microsoft Windows PC.
Part I: Install Service Pack 2 on your system
Service Pack 2 has additional support for Bluetooth. Check this Microsoft support site for more information about bluetooth and Service Pack 2. (support site).
However, not all Bluetooth devices are supported by service pack 2, so the next task is to ensure that your Bluetooth device is supported or buy one that is. A list of supported Bluetooth devices can be found at Microsoft (supported devices).
Part II: Get your code to work with Bluetooth
The easiest way and the one way that allows you the most control over Bluetooth is to program on top of the Windows Socket 2.0. (A special description of Bluetooth for Microsoft can be found here, it will not help you get started, but it is useful as a reference guide later when you got your first program up and running)
At the moment I will not post a complete tutorial, but instead point to three places on the internet that can get you started on your first Bluetooth Program.
BlueCove
BlueCove is an open source project developed at Intel and allows
you to use Bluetooth from Java. It does not implement the entire JSR-82,
but some of the functions. They use the Windows Socket API and JNI to translate
between C++ and Java. The good thing is that both the Java and the C++ part
is open source so you can download the code and look at it.
http://sourceforge.net/projects/bluecove/
Lenholgate forum
Is a private web page that has an entry about Bluetooth. On the
page is published some C++ code for getting you started with Bluetooth,
it is really valuable so check it out.
http://www.lenholgate.com/archives/000102.html
Windows XP SP2 Platform SDK
If you download the SDK for Windows XP SP2 some sample code is attached.
One example shows you how to program Bluetooth on top of WinSocket 2.0.
SDK
for Windows XP SP2
BlueServer
I have used the above mentioned resources to implement a multithreaded server
in C++. The server listens for incoming requests from mobile phones and
spans a new thread and publishes the received data as XML on a local port.
At the moment the code is not available online, but if you are interested
you can read more about the BlueServer.
Part III: Getting help
There is at the moment no great place to seek help if you get stuck. I can only recommend looking at the links provided above or trying posting your question on experts' exchange.
I do not have the resources to answer technical questions, but do you have any comments or do you know about some relevant pages that describes Bluetooth and WindowsXP please feel free to drop me a line on thomasr@daimi.au.dk
Part IV: Other links and resources
Draft book dealing with programming for Bluetooth
Slides about programming for Bluetooth from MIT Pervasive Computing Course
If you are going to compile your own Bluetooth code you might run into problems locating some of the libraries. I do not know if there is another place to find e.g. ws2bth.h and other files, but they can be found by downloading Microsoft Windows XP Service Pack 2 SDK and it can be found here: http://www.microsoft.com/msdownload/platformsdk/sdkupdate/