I want to automatically accept Bluetooth pairings with any device that wants to connect, I tried all answers (without python ones) from this question: Automatically accept bluetooth pairings But they don't work for me, if I try to connect to Raspberry Pi, it connects for 10 seconds and then disconnects and prints error aborted by local. I have Raspberry Pi Zero 2 W. I am running latest Raspberry Pi OS.
On my computer when I run bluetoothctl - B8:27:EB:9C:DB:9E is Raspberry Pi
[bluetooth]# connect B8:27:EB:9C:DB:9E
Attempting to connect to B8:27:EB:9C:DB:9E
[CHG] Device B8:27:EB:9C:DB:9E Connected: yes
[CHG] Device B8:27:EB:9C:DB:9E UUIDs: 00001108-0000-1000-8000-00805f9b34fb
[CHG] Device B8:27:EB:9C:DB:9E UUIDs: 0000110a-0000-1000-8000-00805f9b34fb
[CHG] Device B8:27:EB:9C:DB:9E UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
[CHG] Device B8:27:EB:9C:DB:9E UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
[CHG] Device B8:27:EB:9C:DB:9E UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device B8:27:EB:9C:DB:9E UUIDs: 00001112-0000-1000-8000-00805f9b34fb
[CHG] Device B8:27:EB:9C:DB:9E UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device B8:27:EB:9C:DB:9E UUIDs: 00001800-0000-1000-8000-00805f9b34fb
[CHG] Device B8:27:EB:9C:DB:9E UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Device B8:27:EB:9C:DB:9E UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
[CHG] Device B8:27:EB:9C:DB:9E ServicesResolved: yes
Failed to connect: org.bluez.Error.Failed br-connection-unknown
[CHG] Device B8:27:EB:9C:DB:9E ServicesResolved: no
[CHG] Device B8:27:EB:9C:DB:9E Connected: no
[CHG] Device B8:27:EB:9C:DB:9E Connected: yes
[CHG] Device B8:27:EB:9C:DB:9E Connected: no
[DEL] Device B8:27:EB:9C:DB:9E raspberrypi
[NEW] Device B8:27:EB:9C:DB:9E raspberrypi
[DEL] Device B8:27:EB:9C:DB:9E raspberrypi
Raspberry pi log:
[NEW] Device 04:42:1A:5A:42:1B mnxd
[CHG] Device 04:42:1A:5A:42:1B Connected: no
> HCI Event: Simple Pairing Complete (0x36) plen 7 #1 [hci0] 29.091890
Status: Authentication Failure (0x05)
Address: 04:42:1A:5A:42:1B (OUI 04-42-1A)
@ MGMT Event: Authentication Failed (0x0011) plen 8 {0x0001} [hci0] 29.091998
BR/EDR Address: 04:42:1A:5A:42:1B (OUI 04-42-1A)
Status: Authentication Failed (0x05)
> HCI Event: Disconnect Complete (0x05) plen 4 #2 [hci0] 29.092843
Status: Success (0x00)
Handle: 12
Reason: Remote User Terminated Connection (0x13)