Closed jadware closed 3 years ago
Your approach seems good to me.
Add the System.Devices.Aep.SignalStrength
property to the requestedProperties in BleWinrtDll.cpp#L268
Add a int32_t signalStrength;
property to the DeviceUpdate
struct at BleWinrtDll.h#L10.
Populate the field at DeviceWatcher_Updated and DeviceWatcher_Added with:
if (deviceInfoUpdate.Properties().HasKey(L"System.Devices.Aep.SignalStrength")) {
deviceUpdate.signalStrength = unbox_value<int32_t>(deviceInfoUpdate.Properties().Lookup(L"System.Devices.Aep.SignalStrength"));
}
Add a corresponding C# property at BleApi.cs#L26:
[MarshalAs(UnmanagedType.I4)]
public int nameUpdated;
For debugging you can use the DebugBle
cli-program or the Microsoft's Bluetooth Low Energy sample.
thanks!! working
It is working well for me, thank you. How might it be possible to get RSSI signal strength of the devices that are found in the scan? There may be a property System.Devices.Aep.SignalStrength that can be added to the requested properties list inside StartDeviceScan, but I am not sure how to retrieve its value afterwards.
Much appreciate your help if possible!