Ble application gets stuck when terminating scanning
I have a program that builds upon the p2p example.
The scanner starts when I press a button with
aci_gap_start_general_connection_establish_proc(HCI_SCAN_TYPE_ACTIVE, LE_Scan_Interval, LE_Scan_Window, PUBLIC_ADDR,0x00, 0);
If the button is held for 5 seconds after that I want to stop scanning
aci_gap_terminate_gap_proc(GAP_GENERAL_CONNECTION_ESTABLISHMENT_PROC)
But I will never get out of this function. It stops in
hci_cmd_resp_wait(HCI_TL_DEFAULT_TIMEOUT);
the termination will work when it is called from a
HCI_LE_ADVERTISING_REPORT_SUBEVT_CODE callback.
Anyone has any clue of why this is?
