0

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?.

Narrator
  • 113
  • 1
  • 3
  • 11
  • I have the same problem. Did you figure out a solution? – gregoiregentil Jun 06 '17 at 15:53
  • I was using same sock descriptor for reading the advertisement packets from other thread, try using dup of descriptor(sock) for reading and writing with original descriptor. – Narrator Jun 07 '17 at 17:52

0 Answers0