I was writing client were I'm continuously enabling and disabling scan after each constant time intervals(e.g every 4sec),
Initially I will reset(down/up) the hci interface and adds filters then I will enable the scan using below API,
hci_le_set_scan_parameters(hci_ctlr.sock, stActive, htobs(Scan_Interval_Normal), htobs(Scan_Window_Normal),
own_type, filter_policy, 10000);
hci_le_set_scan_enable(hci_ctlr.sock, 0x01, filter_dup, 10000);
After sometime I will disabling scan using following
hci_le_set_scan_enable(hci_ctlr.sock, 0x00, filter_dup, 10000);
For the First time enabling scan works fine but after some intervals or first interval of disabling scan returns "time out error" or while enabling scan after first interval also returns "time out error" sometimes.
what might be the cause here ? Any suggestions?.