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

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 Answer 1


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.

  • Thanks for that - no idea why I missed that group when I listed them!
    – user115418
    Commented Dec 28, 2020 at 1:31
  • @Andyroo, was this on the lite version of the OS?
    – ukBaz
    Commented Dec 28, 2020 at 7:07
  • @ukBaz A bit of a mix it's the full version (without 'recommended software') but starting in command line mode as it ended up headless.
    – user115418
    Commented Dec 28, 2020 at 13:20
  • @Seamus I used getent group as Pi (and sudo less /etc/group) but was watching TV and working off my iPad at the time so the screen only has about 10 lines with the keyboard up! The group is there, I just missed it so was stuck where to start (blush).
    – user115418
    Commented Dec 28, 2020 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.