最終更新:2022-06-21 (火) 09:51:22 (668d)  

BlueZ 5.51
Top / BlueZ 5.51

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, by default, iOS devices will 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 will need to disable the battery service in BlueZ, use the following steps.
  • Open the bluetooth service file. Depending on your system, it will be located either at /usr/lib/systemd/system/bluetooth.service, or /etc/systemd/system/bluetooth.target.wants/bluetooth.service. Use your favorite text editor like vim or nano to edit these files. In addition, you may need sudo 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:
    ExecStart=/usr/lib/bluetooth/bluetoothd -P battery
  • Save the file.
  • Run systemctl daemon-reload and systemctl restart bluetooth to apply the changes to the Bluetooth service After that, BlueZ should be able to connect to iOS devices without prompting and Ditto Apps should be able to communicate over BLE between iOS and Linux.