Re: [PATCH 8/9] plugins/sixaxis: Add support for DualShock 4/PS4 cable pairing

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

 



On Wed, 2017-09-27 at 11:12 +0200, Szymon Janc wrote:
> Hi Bastien,
> 
> On Monday, 4 September 2017 20:12:11 CEST Bastien Nocera wrote:
> > From: Juha Kuikka <juha.kuikka@xxxxxxxxx>
> > 
> > This patch adds support for "pairing" a Dualshock4 controller over
> > USB
> > into the sixaxis plugin, similarly to what the Sixaxis/PS3
> > controller
> > supported.
> > 
> > Actual bonding happens on first connection, but the device will be
> > marked as trusted when the agent replies.
> > 
> > This patch is based on DS4 supprt for sixpair tool by t0xicCode:
> > https://github.com/t0xicCode/sixpair/commit/975c38cb6cd61a2f0be3507
> > 14f0f64ce
> > f5f0432c ---
> >  plugins/sixaxis.c | 73
> > ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file
> > changed, 72
> > insertions(+), 1 deletion(-)
> > 
> > diff --git a/plugins/sixaxis.c b/plugins/sixaxis.c
> > index b62834d72..eb15acb92 100644
> > --- a/plugins/sixaxis.c
> > +++ b/plugins/sixaxis.c
> > @@ -83,10 +83,34 @@ static int sixaxis_get_device_bdaddr(int fd,
> > bdaddr_t
> > *bdaddr) return 0;
> >  }
> > 
> > +static int ds4_get_device_bdaddr(int fd, bdaddr_t *bdaddr)
> > +{
> > +	uint8_t buf[7];
> > +	int ret;
> > +
> > +	memset(buf, 0, sizeof(buf));
> > +
> > +	buf[0] = 0x81;
> > +
> > +	ret = ioctl(fd, HIDIOCGFEATURE(sizeof(buf)), buf);
> > +	if (ret < 0) {
> > +		error("ds4: failed to read device address (%s)",
> > +		      strerror(errno));
> 
> Lets prefix all sixaxis error/info logs with "sixaxis:"

Sure, I'll make some changes to mention whether the sixaxis or DS4
variant of the call was made.

Nothing else?
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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