2

I'm running an up to date version of Buster on a Pi 3B+ (v1.3) and my Python program dies with

txdbus.error.remoteerror:
org.freedesktop.DBus.Error.AccessDenied: Rejected send message

errors unless I run under root (e.g. sudo python3 myblepgm.py) at which point it completes fine.

Checking the groups defined in /etc/group, I cannot see an obvious one that 'pi' could join to give access to Bluetooth / BLE devices.

I am loath to run the program long term under root if it's not needed (and would be happy to create a specific user for this), so does anyone know what rights / groups the program and user need?

1 Answers1

4

I'm not sure this will help, but:

I found during a recent exercise that user pi is not necessarily a member of the BT group. In my case, this was cured as follows:

$ sudo usermod -G bluetooth -a pi

You may need a reboot after making this change.

Seamus
  • 23,558
  • 5
  • 42
  • 83