Characteristics not found (WarbleGatt_Win10::find_characteristic always return nullptr)

edited July 2020 in C++

OS: Windows 10
Mode: MetaWear CPro
Model Number: 2
Firmware: 1.2.2
Hardware: 0.3

Steps:
1. I'm using the C++ API (https://github.com/mbientlab/MetaWear-SDK-Cpp) and successfully connecting to the device with Warble (https://github.com/mbientlab/Warble).
2. I successfully get a bowrd from mbl_mw_metawearboard_create.
3. I set mbl_mw_metawearboard_set_time_for_response(board, 1000).
4. Calling mbl_mw_metawearboard_initialize eventually gets to the MblMwBtleConnection::enable_notifications callback function where I successfully construct the uuid string (compared to the string string_to_guid returns from WarbleGatt_Win10::find_characteristic in the debugger which looks identical), but WarbleGatt_Win10::find_characteristic always returns nullptr. Stepping throught the WarbleGatt_Win10::find_characteristic function shows that there is a map of characteristics but the value that I get from the MblMwBtleConnection::enable_notifications is not in there.

If I ignore the failed MblMwBtleConnection::enable_notifications callback and try to make the LED blink, the following code:

mbl_mw_led_load_preset_pattern(&pattern, MBL_MW_LED_PRESET_BLINK);
mbl_mw_led_write_pattern(board, &pattern, MBL_MW_LED_COLOR_BLUE);

just throws std::out_of_range.

Comments

  • Is there are way for you to test your code with currently supported hardware? Ours APIs don't support the MWCPRO anymore.

Sign In or Register to comment.