PKConstant - Windows BLE Support

Enables bluetooth low energy support for windows devices.

  • Scan for nearby devices

  • Read/Write characterisitics

  • Subcribe for notifictions or indications

  • Detect disconnections and reconnections

Supports UE 5.5 and comes with a built in example to get you started.

Requires c++20 to be enabled within the project!

Relies on 3rd party windows libs for bluetooth access!

https://www.fab.com/listings/ed920fa6-670f-4e52-ab09-6ae58a6b3f56

Hey! Could you help me out? How do I use your plugin in Blueprints to subscribe and read data from a BLE device, like a heart rate monitor? I guess I need to write to the CCCD to enable notifications — is there a way to do that through Blueprints?

Apologies for the late response only just saw this.

Use the subscribe for notifications node and pass in the related characteristic ID. You will then get data through the event that you pass in as a callback. This will continue until you stop the notifications or disconnect.

Check the manufacturer for how they implement their data, but due to most ID’s being reserved to avoid clashes I expect they will use this one.

00002a37-0000-1000-8000-00805f9b34fb - Heart Rate Measurement ID
Bluetooth GATT Services & Characteristics · GitHub - Handy github with a list of common characertistic id’s

gatt-xml/org.bluetooth.characteristic.heart_rate_measurement.xml at master · oesmith/gatt-xml · GitHub - This repro has the data layouts in a readable xml format, this is the one for that characteristic

They layout bit wise is as follows:
(uint8) 8 bits - Flags
– The first bit is for the heart rate data size, 0 being 8 bit, 1 being 16 bit
– The next 2 bits are for contact status, 3 means its working (Check the xml for what the others mean)
– The next bit is for if energy expenditure
– The next bit is for RR-Interval bit
(uint8) 8 bits or (uint16) 16 bits - Heart rate (Depend on if the flag is 0 or 1)

The following are only available if the flag is set:

(uint16) 16 bits - Energy expended
(uint16) 16 bits - RR-Interval

If your numbers seem off check if its using big endian or little endian.

Hopefully this helps :slight_smile: