Shell
Shell
Add support for Linux to iOS connections.
BlueZ 5.51 and above try to automatically read the battery status/service of devices when they connect. However, iOS devices will default prevent BlueZ services from reading the battery service. As a result, BlueZ connection attempts will cause iOS devices to show a pairing prompt constantly. Therefore, we must disable the battery service in BlueZ using the following steps.- With your favorite editor, open the bluetooth service file. On Raspberry Pi OS it’s located: /usr/lib/systemd/system/bluetooth.service, on other versions it may be here: /etc/systemd/system/bluetooth.target.wants/bluetooth.service. You will probably need to use su permission to write to this file.
- Find the line beginning with ExecStart= and add -P battery to the end. Now the line should look like this:
Shell
Shell
bredr
mode, which is not supported for BLE communication between Linux and macOS. To address this, configure BlueZ
to operate in LE mode by modifying the configuration file: /etc/bluetooth/main.conf
. Add or uncomment in the [General] section to change the setting:
Shell
Run the following command to set BlueZ’ support for multiple advertisements.
Shell