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

Is it possible to receive data as non-root? #30

Open
aditi1prakash opened this issue Mar 16, 2022 · 3 comments
Open

Is it possible to receive data as non-root? #30

aditi1prakash opened this issue Mar 16, 2022 · 3 comments

Comments

@aditi1prakash
Copy link

Current example scripts need root access, is it possible to connect and receive data as non-root?

If not, then why is root access required?

@aditi1prakash aditi1prakash changed the title Receive data as non-root Is it possible to receive data as non-root? Mar 16, 2022
@davidroid
Copy link
Contributor

davidroid commented Apr 14, 2022

Hello @aditi1prakash,
Let's say no, unless some work to configure the Bluetooth stack. The following is what I've found on the Internet, but I've never tried it actually.

By default, on Linux, the Bluetooth protocol stack needs special privileges to interact with. These privileges are implemented through properties called "capabilities" (see man 7 capability for details), and the tool to assign capabilities is "setcap".

Since the Python version of the BlueSTSDK makes use of the bluepy library, it is the binary "bluepy-helper" that interacts with the Bluetooth protocol stack; hence, in case you want to do so, you should locate where it is installed and assign the proper capabilities to it. See also here.

Regards,
Davide

@aditi1prakash
Copy link
Author

Hi Davide,

Thanks for the inputs. I modified the capabilities of the bluepy-helper file.

After assigning the capabilities, the blue_st_sdk throws a 'ModuleNotFoundError' for Manager module.
image

The required capabilities are set for the bluepy-helper file.
image

Any thoughts on a fix/workaround would be helpful.

Regards,
Aditi Prakash

@davidroid
Copy link
Contributor

Hello @aditi1prakash,
Can you check the output of the following command, to see whether the SDK is there?

find / | grep blue_st_sdk

Thank you,
Davide

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

2 participants