Figure out information about BLE PHY (Primary and Secondary) looking at the advertisement

Balrog16 21 Reputation points
2022-02-17T10:36:38.733+00:00

When I use nRF Connect app on my phone, I see

175402-nrfconnect.png

While watching for advertisements (without connecting), the app shows information about PHY, particularly what's the scheme on primary and secondary!
How do we get the same information using winRT apis? I looked for this information in BluetoothLEAdvertisementWatcher Class? Is this possible on Windows with winRT APIs? Thank you!

Developer technologies | Universal Windows Platform (UWP)
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Nico Zhu (Shanghai Wicresoft Co,.Ltd.) 12,866 Reputation points
    2022-02-18T03:05:42.39+00:00

    Hello,
    Welcome to Microsoft Q&A!

    I have to say, there is no such api in BluetoothLEAdvertisement to retrieve PHY, currently it only contains ManufacturerData and BluetoothLEAdvertisementDataSection that used to store data. you may refer to official code sample to check if it was stored in the above sections.

    After researching, we find GetConnectionPhy method, it is introduced in windows 11, but it has limits When the device is not connected, the connection PHYs are invalid (all false) and only works for window 11 environment.

    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.


Your answer

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