libblepp icon indicating copy to clipboard operation
libblepp copied to clipboard

Setting scan parameters: Operation not permitted

Open xloem opened this issue 5 years ago • 2 comments

$ examples/lescan
error 1611577006.276827: Setting scan parameters: Operation not permitted
terminate called after throwing an instance of 'BLEPP::HCIScanner::IOError'
  what():  Setting scan parameters: Operation not permitted
Aborted (core dumped)

It looks like libblepp nees to be used with sudo in a default setup for me. Is this an inherent limitation of the non-dbus approach?

xloem avatar Jan 25 '21 12:01 xloem

I don't know the answer to your question, but this post gave me a work-around.

Assuming you have libcap installed, the following line will give the lescan_simple the permissions it needs: sudo setcap 'cap_net_raw,cap_net_admin+eip' lescan_simple

There could very well be better fixes to the sudo issue, but this is doing the job for me until I find one.

pearson avatar Jun 25 '21 00:06 pearson

Thanks for the workaround. I'd always used sudo. I assumed dbus was needed for communication with a daemon running as root.

edrosten avatar Jul 10 '21 23:07 edrosten