You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The app builds ok and I can run it on a remote PC with Remote Machine Debuging. The app starts ok and in scenario1_Discovery enumerates a BluetoothLE Heart Rate Moniter (HRM).
I select the HRM and go to scenario2_Client, click connect and the HRM connects.
The Service comboBox shows and I can click on HeartRateService ok.
The Characteristic comboBox shows but when I click on HeartRateMeasurement characteristic the program crashes with Exception error and the following message:
Exception thrown at 0x76734402 (KernelBase.dll) in BluetoothLE.exe: WinRT originate error - 0x80004002 : 'No such interface supported'.
Exception thrown at 0x76734402 in BluetoothLE.exe: Microsoft C++ exception: winrt::hresult_no_interface at memory location 0x03A9CEA0.
The bug is at the line auto selectedItem = ServiceList().SelectedItem().as<ComboBoxItem>();
There shoud be CharacteristicList instead of ServiceList : auto selectedItem = CharacteristicList().SelectedItem().as<ComboBoxItem>();
Sorry. The Bluetooth team wrote the C# sample, and I translated it to C++/WinRT. I'm good with C++/WinRT but I don't work on Bluetooth, so I just translate it as best I can and sometimes I mess up.
I'm writing a program to automatically test a BluetoothLE device I have developed. To get started I downloaded the BluetoothLE sample app from https://github.com/microsoft/Windows-universal-samples/tree/master/Samples/BluetoothLE and got the cs program working ok, however I cannot get the c++ program to work.
The app builds ok and I can run it on a remote PC with Remote Machine Debuging. The app starts ok and in scenario1_Discovery enumerates a BluetoothLE Heart Rate Moniter (HRM).
I select the HRM and go to scenario2_Client, click connect and the HRM connects.
The Service comboBox shows and I can click on HeartRateService ok.
The Characteristic comboBox shows but when I click on HeartRateMeasurement characteristic the program crashes with Exception error and the following message:
It appears to fail on line 313 of Scenario2_Client.cpp
selectedCharacteristic = selectedItem ? selectedItem.Tag().as() : nullptr;
Scenario2_Client.cpp:
Can I get help solving this problem please. I'm new to c++ so finding it difficult.
Win 10.0.18363.836
VS Community 2019 Version 16.6.1
Thanks, Greg
The text was updated successfully, but these errors were encountered: