edrosten / libblepp

Modern clean C++ Bluetooth Low Energy on Linux without the Bluez DBUS API
Other
241 stars 63 forks source link

where and how to start? #72

Open steven-varga opened 1 year ago

steven-varga commented 1 year ago

Cool project! -- my goal is to write a plugin to synergy variant barrier and looking for library that is suitable for this purpose. Can anyone confirm libblepp suitable to create a HID service or HID over GATT profile (HOGP) ?

Unfortunately after compiled the examples on a LinuxMint 20.3 Lenovo X1 and running the examples with sudo I am getting:

ivarga@ivargalinux:~/src/libblepp/examples$ sudo ./lescan
warn  1686933312.244332: Received I/O error while setting scan parameters.
warn  1686933312.244353: Switching off HCI scanner
error 1686933312.245387: Error disabling scan:: Input/output error
terminate called after throwing an instance of 'BLEPP::HCIScanner::IOError'
  what():  Error disabling scan:: Input/output error
Aborted

The bluez stack is bluetoothctl: 5.63; what could I be doing wrong?

DeboBurro commented 10 months ago

Same issue here. Scan doesn't seem to work. Environments:

Logs of different tries:

burro@debo-burro:~/personal/bluetooth-libraries/libblepp$ ./build/examples/lescan
error 1701906534.613009: Error obtaining HCI device ID
terminate called after throwing an instance of 'BLEPP::HCIScanner::HCIError'
  what():  Error obtaining HCI device ID
Aborted
burro@debo-burro:~/personal/bluetooth-libraries/libblepp$ ./build/examples/lescan_simple 
error 1701906559.874822: Error obtaining HCI device ID
terminate called after throwing an instance of 'BLEPP::HCIScanner::HCIError'
  what():  Error obtaining HCI device ID
Aborted
burro@debo-burro:~/personal/bluetooth-libraries/libblepp$ ./build/examples/lescan_simple 
error 1701906575.501442: Setting scan parameters: Operation not permitted
terminate called after throwing an instance of 'BLEPP::HCIScanner::IOError'
  what():  Setting scan parameters: Operation not permitted
Aborted
burro@debo-burro:~/personal/bluetooth-libraries/libblepp$ sudo !!
sudo ./build/examples/lescan_simple 
warn  1701906595.637207: Received I/O error while setting scan parameters.
warn  1701906595.637222: Switching off HCI scanner
error 1701906595.638335: Error disabling scan:: Input/output error
terminate called after throwing an instance of 'BLEPP::HCIScanner::IOError'
  what():  Error disabling scan:: Input/output error
Aborted