【已解决】BK7231N 广播码收包的问题
Posted: 2023年 Jun 8日 15:22
请问一下,bk7231n sdk版本3.7.1,ble收包扫描,没有扫描到数据,是什么原因啊?请大佬指教
Code: Select all
STATIC VOID_T __ble_central_event_callback(TAL_BLE_EVT_PARAMS_T *p_event)
{
TAL_PR_DEBUG("----------ble_central event callback-------");
TAL_PR_DEBUG("ble_central event is : %d", p_event->type);
switch(p_event->type)
{
case TAL_BLE_EVT_ADV_REPORT:
break;
default:
break;
}
// tal_ble_scan_stop();
}
STATIC VOID example_ble_central(VOID)
{
OPERATE_RET rt = OPRT_OK;
TAL_BLE_SCAN_PARAMS_T scan_cfg;
memset(&scan_cfg, 0, SIZEOF(TAL_BLE_SCAN_PARAMS_T));
/*ble_central init*/
TUYA_CALL_ERR_GOTO(tal_ble_bt_init(TAL_BLE_ROLE_CENTRAL, __ble_central_event_callback), __EXIT);
/*start scan*/
scan_cfg.type = TAL_BLE_SCAN_TYPE_ACTIVE;
scan_cfg.scan_interval = 0x400;
scan_cfg.scan_window = 0x400;
scan_cfg.timeout = 0;//0xFFFF;
scan_cfg.filter_dup = TLS_DISABLE;
TUYA_CALL_ERR_GOTO(tal_ble_scan_start(&scan_cfg), __EXIT);
TAL_PR_DEBUG("=============================>ble central init success");
__EXIT:
return;
}