Repeating BLE pairing requests

I am currently working on an IOS application that pairs with a raspberry pi advertising a UART BLE service. The application successfully discovers the peripheral and attempts to connect to it. However, I keep getting a pop up window from IOS with a request to pair with the device. If I press "cancel", the app disconnects from the peripheral. If I press "pair", the peripheral connects. However, the app continues sending me pairing requests. Is this a known bug with IOS? Is there any way to get around this issue?

I also just encountered this issue with RPi 4 trying to use NrfConnect or LightBlue on iOS. Have you been able to resolve this issue? I am stuck as well

One cause of this is that Linux tries to read the battery state from the iPhone, which triggers the pairing request. You can configure bluez to prevent this. One of my colleagues at Ditto wrote some docs to fix it, which the forum won't let me link directly, but I will copy-paste the main instructions here.

To disable auto Battery reading

  1. Open the bluetooth service file /usr/lib/systemd/system/bluetooth.service, or /etc/systemd/system/bluetooth.target.wants/bluetooth.service in a text editor. You may need sudo permission to write to this file.
  2. Add -P battery to the end of the ExecStart line to disable the Battery feature in bluetoothd. Your ExecStart should look something like ExecStart=/usr/lib/bluetooth/bluetoothd -P battery now.
  3. Save the file.
  4. Run systemctl daemon-reload and systemctl restart bluetooth to apply the changes to the Bluetooth service

Thank you so much thombles, this seems to have resolved the issue

Repeating BLE pairing requests
 
 
Q