Re: [PATCH BlueZ 2/2] plugins/sixaxis: Implement cable pairing for DualSense

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2025-06-03 at 21:35 +0300, Egor Vorontsov wrote:
> On Tue, 2025-06-03 at 11:38 -0400, Luiz Augusto von Dentz wrote:
> > Perhaps it is possible to write the link keys directly via cable
> > but
> > then we need the OOB data, etc, to generate the keys which in my
> > opinion it just extra work that doesn't really add anything if just
> > works, or autopair, is used.
> 
> In my experimental PoC I just generated a random 128-bit string and
> used it as the link key for both sides (placed into `LinkKey=' in
> BlueZ's `/info' and sent to DualSense over USB), which showed to be
> working perfectly.
> 
> > Is it not seamless right now? Doesn't it use 'just works'/autopair?
> 
> It is kind of seamless, but you still have to accept the pairing
> manually (e.g. be discoverable and with an active agent). In terms of
> security I'd say this behavior is indeed preferable (otherwise one
> could spoof the VID:PID and zero-click bond with the host), but it
> still requires two separate confirmations.
> 
> If we could generate a static key, place it to both devices BUT at the
> same time mark the device as unconfirmed/untrusted/etc. locally, so
> that it is still going to trigger one and only one interactive pairing
> confirmation, that'd be the intended design at least in my view.
> 
> Another possible way would be to automatically accept the first, dummy
> pairing request that doesn't bear a link key yet -- so no security risk
> there, but still more seamless experience for the user.

The way it's supposed to work right now, is that you get an
authorisation request when you plug the device in and the Bluetooth
panel is open. This is what it does with PS3 and PS4 controllers (after
my recent bug fixes for PS4 controllers).

Then, when you unplug the controller and click on the PS/Power button,
it's supposed to connect without any more confirmations or the need to
have the Bluetooth panel open. This is how it works with PS3
controllers which don't pair.

PS4 controllers expect to pair, so they need to be authorised again.
Unfortunately, Sony won't share any cable pairing information with
kernel drivers writers, so we can't easily reimplement this.

So a "pairing" dialogue after the "authorisation" dialogue is how it
works. Removing the first "authorisation" dialogue is out of the
question, that's what makes it possible to plug the controller for
charging without pairing it.

See the patchset that starts with:
adapter: Add btd_request_authorization_cable_configured()
that I sent in 2017 and implemented that cable pairing authorisation.





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux