How to get the list of BLE connected peer devices with UWP API.

熊谷 瞭 31 Reputation points
2022-04-18T07:23:52.53+00:00

Hi.

Could you tell me how to get the list of BLE connected peer devices with UWP API. I need to find the peer device that has my custom profile.

The background is bellow.
I try to develop a WPF application (with UWP API, Visual Studio 2019) that can communicate with my unique hardware device. The device has Bluetooth SIG profile and my custom profile.
Some users may wanna use the custom profile after the device had connected for using SIG profile. This is why my application should able to communicate the devices already connected, so then I need Bluetooth API that get list of peer devices and their services.

For now, I can't find such API in https://learn.microsoft.com/en-us/uwp/api/windows.devices.bluetooth?view=winrt-22000.
If you have, could you tell me that.

Best Regards.

R.Kumagai

Developer technologies | Universal Windows Platform (UWP)
Developer technologies | Windows Presentation Foundation
0 comments No comments
{count} vote

Answer accepted by question author
  1. Nico Zhu (Shanghai Wicresoft Co,.Ltd.) 12,871 Reputation points
    2022-04-19T06:55:57.707+00:00

    Hi,
    Welcome to Microsoft Q&A!

    I'm afraid there is no such api to list of BLE connected peer devices. It could only list paired device but DeviceInformationKind does not contain Peer device type. Please refer to official code sample here.

    Currently UWP has PeerFinder class could use to enables you to discover other instances of your app on nearby devices. However it can't used to list paired device.

    Thank you.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.