Open joessu opened 2 years ago
I managed to connect the phone via bluetoothctl, it required i authorize some of the services via the ctl, maybe thats why the example didnt work? Test seems to have a loopback of the audio, debugging that now
So when i authorize services via bluetoothctl, it works, however the source of speaker and microphone switches to phone, which doesnt seem to be working. when i go into settings and switch it back to speaker and microphone, it works. I'm wondering if there is a misconfiguration with the phone source that is assigned during a call.
@joessu I think when you authorize via bluetoothctl, it does so using a new agent that is independent of anything that would be started by this library. That probably doesn't automatically set up the hands free profile you're looking for, which could explain the reason you have to manually modify some settings--is that on your phone, or on the computer?
From your description, it's hard to say why the phone shortly disconnects from the agent started by the example (and what bluetoothctl is doing differently) but the places to dig up more information would be in the bluez and ofono logs. It's been a while, but I think if you're using systemd it's something like journalctl -u bluetoothctl.service
and for ofono IIRC, you pass -d
when starting ofonod.
Thanks for the info, I set bluetooth-agent instead of simple-agent as the default agent, that works much better and doesnt require the above steps to have the phone connect and stay connected. I think timing in the example is still a bit odd as ofono doesnt find a child modem unless my phone is already connected.
Using the example.py, i'm able to get quite far, however i run into the following issue where my phone disconnects only after a few seconds of trying to connect.
I've tried several different capabilities, none of which give me the pincode option. I do get a passcode though, but after hitting the pair button, it fails and disconnects.