Categories
Bluetooth

32feet for WinRT

Currently the 32feet Bluetooth Classic library for Windows is build around the Win32 API to ensure support for Windows 7 as well as theoretically supporting prior versions no longer officially supported. It has always been my aim to implement the library using the newer WinRT APIs in order to support consistent functionality for apps running in the UWP sandbox as well as future-proofing the library.

In version 4.0.27 the UWP implementation includes BluetoothRadio, BluetoothClient, BluetoothDevicePicker and BluetoothSecurity. The BluetoothListener is not implemented at the moment. BluetoothRadio can read the mode but not set it currently as it requires a bit of trickery to ask for permission on the UI thread. This however means most of the functionality is now available from UWP apps including Hololens. Once there is a clean way to add this implementation to the desktop Windows dlls it’ll make it easier to support other Windows variants which don’t have all the Win32 APIs – like IoT.

If there is some functionality you’d like to see added please get involved in the GitHub issues to discuss and I’ll happily accept pull requests to continue enhancing the libraries.

By Peter Foot

Microsoft Windows Development MVP