Troubleshooting

When all seems lost and nothing is working, this is the place to be! Below are some common issues found with developing with ABle and how to fix them. They are organized into general issues that are platform agnostic, then issues that are specific to a backend.

General

Linux

Ownership Error

If you see an error similar to this:

dbus_next.errors.DBusError: Connection ":1.2737" is not allowed to own the service "org.bluez.ABle" due to security policies in the configuration file

There is a permissions error in the config for bluetooth with DBus. When you start a peripheral server a service is created on DBus to expose objects to Bluez and be able to call Bluez’s own services. The error is caused because your user needs to have an explicit rule to own a service (eg. org.bluez.ABle) on the bus. Moreover the root user needs to be able to make calls to your service from Bluez, for example triggering a callback. Feel free to inspect the permissions file at /etc/dbus-1/system.d/bluetooth.conf. We also made a script in the scripts directory called permissions_fix.py that can make the modifications to the config for you! Run it with:

sudo python3 scripts/permissions_fix.py -u <Your Username>

If you specified a special name for your peripheral you will need to add a -p <name> to the calling of that script.