question

User10101010-6436 avatar image
0 Votes"
User10101010-6436 asked User10101010-6436 commented

Bluetooth Low Energy Duplicate Notifications

Hello, I've recently discovered an issue with Bluetooth Low Energy on Windows 10 using UWP libraries as part of a C# WinForms application. Connection and data transfer to a our custom PCBs work as expected until multiple devices are connected. Each device connection is managed in a separate instance of a BLE Comms class implementing Windows.Devices.Bluetooth.

When more than one device is connected the GattCharacteristic.ValueChanged event handler is triggered multiple times per device depending on the number of devices connected. For example if two devices are connected, we receive 2 copies of the same notification, if three devices are connected we receive 3 copies. The copies have been confirmed to be so through use of different dummy data on each of the devices and count variables within the notification data.

I have checked that this is not due to multiple erroneous subscriptions. Additionally, this behaviour also occurs in Matlab, although it manifests slightly differently i.e. two copies appear for every notification when only a single device is connected. A colleague and I have tested this on separate machines with both programs and multiple BLE dongles producing the same behaviour.

This leads me to believe there may be some form of driver issue as the system attempts to manage multiple connections or a bug in the UWP BLE library. If anybody has useful experience/input relating to this issue it would be much appreciated.

windows-uwpwindows-forms
· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

An additional point, we've also confirmed that the devices are not transmitting duplicates. The copies are being generated on the receiving side.

0 Votes 0 ·
JackJJun-MSFT avatar image JackJJun-MSFT User10101010-6436 ·

@User10101010-6436, Could you provide the related code about your problem? It will be better for me to make a test.

0 Votes 0 ·

@JackJJun-MSFT , I have a stripped down version of the project that produces the same issue. What's the easiest way to share it?

0 Votes 0 ·
Show more comments

0 Answers