libblepp icon indicating copy to clipboard operation
libblepp copied to clipboard

getting error/exception whenever trying to stop() a running HCIScanner

Open vleeb opened this issue 3 years ago • 0 comments

Hi, thank you for this nice library. Whenever I try to stop() a running HCIScanner I am getting:

Error disabling scan:: Connection timed out
terminate called after throwing an instance of 'BLEPP::HCIScanner::IOError'
  what():  Error disabling scan:: Connection timed out

Am I doing anything wrong, or is this a bug? You have some nice examples for using the HCIScanner, but they do not use the stop() function at all.

I was able to fix this problem by using the err = hci_close_dev(hci_fd); within the stop() function instead of calling hci_le_set_scan_enable(...) there ... ... but then I had to move hci_open_dev(dev_id) from constructor() to start().

vleeb avatar Sep 07 '21 15:09 vleeb