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.
An additional point, we've also confirmed that the devices are not transmitting duplicates. The copies are being generated on the receiving side.
@User10101010 , Could you provide the related code about your problem? It will be better for me to make a test.
@Jack J Jun , I have a stripped down version of the project that produces the same issue. What's the easiest way to share it?
@User10101010 ，If you want to upload your project, you could upload your project to Onedrive or GitHub and share the link here.
@Jack J Jun , please find the project files here: https://github.com/mhopkinsSERG/MultiDeviceConnect
Sign in to comment