Right now I can successfully pair and connect a phone to my machine without any user interaction in this way:
$bluetoothctl
#power on
#discoverable on
#pairable on
#agent NoInputNoOutput
#default-agent
from my phone I search for the BT device and it pairs and connectly automatically. Now I have two problems:
it still asks to authorize services:
Authorize service
[agent] Authorize service 0000110e-0000-1000-8000-00805f9b34fb (yes/no):
but this is not good because I've specified NoInputNoOutput
!
- how to trust a device? It's enough to type
trust
but I need to do this automatically for the same reason.
In general, is there any reliable C++ library to handle bluetooth connections and common profiles like A2DP and HFP?
simple-agent
test script and removed the ask confirmation. – Roxie