Skip to content

Supported Hardware and Software

Peter Foot edited this page May 1, 2017 · 1 revision

Supported Hardware and Software

The library is supported both in a version for desktop Windows, and a version for NETCF v2.0. On both platforms various companies have provided software protocol stack software to use Bluetooth hardware. For instance, on desktop Windows there are well known stacks from Microsoft, Widcomm (now Broadcom(Broadcom)), BlueSoleil and Toshiba. On CE platforms there are also stacks from Microsoft and Broadcom(Broadcom)/Widcomm. To visually identify which stack is installed see http://www.peterfoot.net/VisuallyIdentifyYourBluetoothStack.aspx, http://32feetnetdev.wordpress.com/2011/02/03/how-stacks-show-radio-version/ and http://www.bluecove.org/bluecove-examples/bluetooth-stack.html Also see our preliminary page Stack Identification.

On both platforms we have long standing support for the Microsoft stack, the Broadcom/Widcomm stack, the BlueSoleil stack, and also for the Stonesteet One Bluetopia stack. We also have support for the BlueZ stack on Linux on the Mono CLI, see BlueZ on Linux. Finally, we haven't so far been able to get Toshiba to provide us the information needed to support their stack.

On Windows Phone 7 there are no APIs for Bluetooth so we can't provide support there. Windows Phone 8 does have some support.

On Windows 8 and later 32feet.NET is supported for traditional desktop applications but cannot be used within Windows Store applications. See more at Windows Store Apps.

On a device where there is no Bluetooth hardware connected or a non-supported stack is present the library will obviously not function. Opening a BluetoothClient/-Listener will fail with an exception and getting the list of local radios (BluetoothRadio.AllRadios) will return a zero length array, and getting the primary radio (BluetoothRadio.PrimaryRadio) will return null/Nothing, thus code like the following will fail with a NullReferenceException.

{{ BluetoothRadio.PrimaryRadio.Mode = RadioMode.Discoverable }}

Note that this is different from previous versions e.g. 2.3, where we assumed that the Microsoft Bluetooth stack was present and would load its support even when no radio dongle was plugged-in.

Standard Dongles

Note that most Bluetooth dongles use a standard connection protocol and thus they appear very similar. This means that most Bluetooth software stacks (Microsoft, Broadcom/Widcomm, BlueZ, Bluetopia etc) can use any dongle. It it not the case for instance that Broadcom dongles can only be used by the Broadcom/Widcomm stack. There are some dongles that are non-standard however; I have one from Trust like that and it can thus only be used with the stack supplied with it.

: The specification of the protocol between the host PC/phone/etc and the Bluetooth radio is defined by the Bluetooth standards body and it is called HCI (Host Controller Interface). Various physical connection types are specified as well e.g. USB, Serial, and SD card.

Thus with a Windows PC, one can then insert the dongle without installing any software and plug-and-play will find it and load the Microsoft Bluetooth stack. Or one can installed the software that comes on the CD with the dongle and install Broadcom/Widcomm or BlueSoleil for instance and that stack will use the dongle. To identify which stack is using a dongle attached to your PC see Stack Identification.

The Microsoft stack provides the best support for programming so it is often useful to disable an existing stack and use it instead. For instance the Broadcom stack provides no API for handling authentication, and the BlueSoleil stack is not very helpful at all, see more information at the linked pages. See some help changing to the Microsoft stack at Switching any dongle to the Microsoft stack. On Windows Mobile etc, it is generally not possible to switch stacks with one exception, devices with the Stonestreet One Bluetopia stack often can also switch between it and the Microsoft stack.

Note that each stack supplies the Bluetooth Profiles/services whereas the dongle is much like an Ethernet card in that it only takes care of sending and receiving frames of data on the network. When a product box says that such a dongle support a particular list of profiles what it really means that the software stack on the CD in the same package supports that list. Switching stacks will change the services supported.

One Radio at a time

Finally note that each of these stacks support only one attached radio. For instance on the Microsoft XP stack when I have two dongles attached I see an event log warning from BTHUSB with message “Only one active Bluetooth radio is supported at a time.”

Also note that we need to attempt to load each Bluetooth stack one-by-one (Microsoft, Widcomm, BlueSoleil etc). For each that is not installed an error will occur and the library handle each exception and try the next stack. If you are using a debugger and it is configured to stop at every exception then it'll break during that process (within BluetoothFactory). Just hit F5 or do Debug->Continue to continue until the start-up process is complete. (On Win32 I often run my app, and only attach the debugger after library start-up to avoid this phase).

Feature support table

Logging

The library produces various logging particularly when starting-up and checking which stacks/radios are present. This trace logging can be seen either in the Output windows of a debugger, or in the standard .NET logging mechanism. To see the .NET logging in a file use a app.config file. There's an example app.config file in the release, copy it next to you app .exe and rename it to suit e.g. myapp.exe.config and logging will be written to file trace.log.

Clone this wiki locally