debian - Automate Bluetooth Pairing/Trusting in Bluez5 -
i've been working on making rpi 2 function car bluetooth receiver , well, except have no idea how automate pairing of bluetooth devices in bluez5. in past would've used bluetooth agent , simple script, seems have gone out window move 4 -> 5. nature of setup means have no kb/mouse on rpi once in car, needs automated setup can scan rpi, , if hard-coded pin correct, trusting of device needs automatically done, no cli input. i've searched on web seems using bluetoothctl works them, in particular setup i'd able have friends pair own phones, having trust devices rpi out of car isn't ideal. i'm not sure why using simple script not possible bluez5. think can it. below 1 example how. download bluez5 source , edit test/simple-agent . comment out lines of code shown below: def requestauthorization(self, device): print("requestauthorization (%s)" % (device)) #auth = ask("authorize? (yes/no): ") #if (auth == ...