Windows Bluetooth API - Notes

22 views
Skip to first unread message

Wayne Keenan

unread,
Nov 14, 2017, 4:08:47 AM11/14/17
to python-bleson


The overall target API is called: Universal Windows Platform (UWP)

  


Supported Windows Versions:  https://docs.microsoft.com/en-us/windows/uwp/updates-and-versions/choose-a-uwp-version


Minimum version for BLE scanning without paring and GATT Peripheral is :  https://docs.microsoft.com/en-gb/windows/uwp/whats-new/windows-10-build-15063


Recommended Version:  https://docs.microsoft.com/en-gb/windows/uwp/whats-new/windows-10-build-16299


How to update to latest build:  https://support.microsoft.com/en-us/help/4028685/windows-10-get-the-fall-creators-update



Windows UWP Docs


https://docs.microsoft.com/en-gb/windows/uwp/


BLE Specifc API's (subset)

https://docs.microsoft.com/en-gb/uwp/api/windows.devices.bluetooth.genericattributeprofile.gattserviceprovider

https://docs.microsoft.com/en-gb/uwp/api/windows.devices.bluetooth.bluetoothledevice


Dev Forum:    https://social.msdn.microsoft.com/Forums/windowsapps/en-US/home?forum=wpdevelop



C# Sampels - Bluetooth LE


https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/BluetoothLE



Python Integration (Windows 10 IoT only? (maybe, see forum link below))


https://github.com/ms-iot/python/releases


https://blogs.msdn.microsoft.com/visualstudio/2017/05/12/a-lap-around-python-in-visual-studio-2017/


https://developer.microsoft.com/en-us/windows/iot/samples/helloworldpython




My question on Python and BLE API usage on the desktop (as opposed to just Win 10 IoT) posted on the forum:



https://social.msdn.microsoft.com/Forums/windowsapps/en-US/7831ebe4-fff1-41c6-901c-d00ec31f37d6/call-uwp-bluetooth-le-apis-from-python-on-the-desktop?forum=wpdevelop


Barry Byford

unread,
Nov 14, 2017, 4:19:36 AM11/14/17
to python-bleson
OK, that is pretty much what I had found when I did some research.   You clearly have some secret sauce of how to link it with Python :-)

Wayne Keenan

unread,
Nov 14, 2017, 4:25:41 AM11/14/17
to python-bleson
Not got my hands on it just yet, I left the Windows laptop upgrading to the latest build in the office overnight.  

Gut feeling is that Windows will need a binary helper, but I have absolutely zero plans to end up there though :)

Wayne Keenan

unread,
Nov 14, 2017, 6:22:52 AM11/14/17
to python-bleson
Although saying that, what I did mange to get working for Win8.1 was a standalone C# console app (not distributed thru the app store. i.e. it wasn't sandboxed) that could use the Bluetooth/Device API's  (it did OTA DFU).   

There was (maybe still is) a magical linker setting or two that can be set in the project to do it. btw, it wasn't a hack, it's just buried/not well documented.

But, it was impossible to use this from Python because of the way (iron)python.exe was linked and the linking/loader API's it doesn't provide access to.

No Win10 conclusions yet, though.



On Tuesday, November 14, 2017 at 9:19:36 AM UTC, Barry Byford wrote:
Reply all
Reply to author
Forward
0 new messages