Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting scan parameters: Operation not permitted #61

Open
xloem opened this issue Jan 25, 2021 · 2 comments
Open

Setting scan parameters: Operation not permitted #61

xloem opened this issue Jan 25, 2021 · 2 comments

Comments

@xloem
Copy link

xloem commented Jan 25, 2021

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

@pearson
Copy link

pearson commented Jun 25, 2021

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.

@edrosten
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants