Comment 7 for bug 1366061

Revision history for this message
Sebastien Bacher (seb128) wrote : Re: [bluetooth] can't connect to car (auth error - Peugeot)

Ok, I had a look with that and discussed it a bit with Mathieu

lp:~mathieu-tl/ubuntu-system-settings/agent-rework has the bits to fix it but is incomplete

The issue is that currently the code registers a device-specific agent, when selecting a device and trying to pair it (i.e when selecting a device in the list and clicking on it and selecting "connect").

In the car pairing scenario though what was just described is not the case, the phone sits on the bluetooth panel and the car issues a RequestPinCode(). With the current code it means no agent is registered which leads to the errors in the bluetoothd log
"No agent available for request type 0"

The new code from Mathieu calls "RegisterAgent" which means an agent is available, it does on DBUS_ADAPTER_AGENT_PATH though (to not conflict with the per-device agent) or the bluetooth constructor only calls registerObject(DBUS_AGENT_PATH) which means the setup is not correct. Changing the "RegisterAgent" agent is to DBUS_AGENT_PATH is enough to make pairing works.

In summary we need to add the "RegisterAgent" call and properly register the object, then things should work. Matthieu is looking at doing those changes