libblepp
libblepp copied to clipboard
getting error/exception whenever trying to stop() a running HCIScanner
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().