Hello,
Welcome to Microsoft Q&A!
But what puzzles me now is that why MircoSoft ble api could not set it, for it is a basic function for ble advertisement, and the restriction is weird...
After consulting the Bluetooth team, I got more information about this behavior. First of all, yes, the system reserves this type of advertisement and that is the reason for error.
As you could see in the document, there are other flags that are reserved by the system. The system reserves these flags because they are used as part of other APIs and the advertisement API does not allow it to interfere with other APIs on the system. Currently, Windows does not support low-level access to Bluetooth functionalities in general.
Also, the Bluetooth team said that: This particular policy might be revisited in the future in the case when extended advertisement is supported as each API has its own advertising set allocation. However, this remains blocked today.
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.
@Roy Li - MSFT
I found out what's wrong now, the flags of bluetooth advertisement should not be set by user. see:
https://learn.microsoft.com/en-us/uwp/api/windows.devices.bluetooth.advertisement.bluetoothleadvertisementpublisher?view=winrt-22621
Maybe it is readonly....But what puzzles me now is that why MircoSoft ble api could not set it, for it is a basic function for ble advertisement, and the restriction is weird...
I've checked the BluetoothLEAdvertisement.Flags Property, it's writeable and readable. But based on the document you posted, the system reserves this type of advertisement for system use and this should be the reason for the behavior.
I'll consult the BLE team to see if I could get more detailed information about this.
@frank zhang I've consulted the BLE team and got a response about this. You could check my answer for the detailed explanation.
Sign in to comment