- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using SDK 3.4.0 and writing an application that uses the Smartbridge API. Looking at the details of the API in smartbridge_stack_if.c/h I do NOT see a way to register the callbacks to app_scan_complete_callback and app_scan_report_callback.
I do see the callback app_scan_complete_callback being called in: static void smartbridge_scan_result_callback( wiced_bt_ble_scan_results_t *p_scan_result, uint8_t *p_adv_data ) at the end of the scan, but no API to set the callback.
I added the following registration function in smartbridge_stack_if.c so I can register a callback from the main application in order to get the notification when the scanning is completed after scan_settings.duration_second. I will do the same for the scan report callback so I can get access to the report at the application level as well.
//Extra function for callback
void smartbridge_bt_interface_register_scan_complete_callback(wiced_bt_smart_scan_complete_callback_t ptr_app_scan_complete_callback)
{
WPRINT_LIB_INFO(( "[SmartBridge] smartbridge_bt_interface_register_scan_complete_callback - 0x%04x\n", ptr_app_scan_complete_callback));
app_scan_complete_callback = ptr_app_scan_complete_callback;
}
Please comment.
- Labels:
-
SDK 3.x
-
Wifi+Bluetooth
- Tags:
- api calls
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content