Our great sponsors
-
BLEPS
PowerShell module for interacting with Bluetooth Low Energy (BLE) devices implementing the Generic Attribute Profile (GATT/GAP)
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Thanks to u/hmmwhatsthisdo/ work on BLEPS , I've managed to create a [Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementWatcher] in order to receive Bluetooth Low Energy advertisements.
full code: (requires Microsoft.Windows.SDK.NET.dll that can be found ( here ) )
The method you are trying to use (ToArray)) expects IBuffer as input whereas BluetoothLEAdvertisement.DataSections returns IList. So that is not going to work. You would need a method that can take IList and transform it to something with a concrete type instead of interface. Here is the issue described https://github.com/PowerShell/PowerShell/issues/9816