public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Bastien Nocera <hadess@hadess.net>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] Sony PS3 sixaxis & bluez
Date: Mon, 26 Nov 2007 17:38:01 +0000	[thread overview]
Message-ID: <1196098681.10878.486.camel@cookie.hadess.net> (raw)
In-Reply-To: <1196057724.4217.71.camel@aeonflux>


On Mon, 2007-11-26 at 07:15 +0100, Marcel Holtmann wrote:
> Hi Bastien,
> 
> > > With the current bluez-utils version (3.22 or CVS), the PS3 bluetooth 
> > > controller (Sixaxis) is
> > > not recognized.
> > 
> > The input service doesn't support device initiated connections. See:
> > http://thread.gmane.org/gmane.linux.bluez.devel/12584/focus=12614
> 
> please remember that hidd file format is different from the input file
> format. I am serious here. It is different.
> 
> > Haaa. Once I get the capabilities right in my sixaxis patch (I'll be
> > able to compare the hidd generated output with the one from my patch), I
> > think I'll be able to use udev to automatically add the device as
> > supported via Bluetooth once connected via USB.
> 
> I haven't spend any time on this, but here is how it should work. We
> need a udev rule that detects the PS3 controller and then runs an
> application.

That was always the plan for sixpair2.c

>  This application has to find the local Bluetooth adapter
> and get its BD_ADDR.

Not done yet, but low-prio (you need to pass it on the command-line
right now).

>  Then it has to read the adapter address and
> controller address stored in the controller. This should be done via
> hidraw (or if possible via hiddev), because otherwise you have to
> disconnect the controller from the HID driver.

That's a problem. hiddev.h has some info on how to get the report
descriptors, but more example code is sorely missing. That's not my main
concern right now though (I'll dig this up when I get the sixaxis
working...).

>  If the stored adapter
> address is not one of the local Bluetooth adapters it should change it
> and add an entry into the input file.

Nod.

>  For this entry it needs the HID
> report descriptor. Best is to read this via USB (since it can change
> with a new generation of the controller), but it could also be hardcoded
> since currently it is fixed.

OK.

sixpair2.c has a couple of bugs:
- country is wrong
- version is wrong
- report is missing 4 bytes

I guess the later is the most important one. Once I get this working to
some level, I'll have a look at using hiddev instead.

Cheers


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  reply	other threads:[~2007-11-26 17:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-24  0:37 [Bluez-devel] Sony PS3 sixaxis & bluez Frédéric Blain
2007-11-25  2:02 ` Bastien Nocera
2007-11-24 14:00   ` Frédéric Blain
2007-11-26  6:17     ` Marcel Holtmann
2007-11-26  6:15   ` Marcel Holtmann
2007-11-26 17:38     ` Bastien Nocera [this message]
2007-11-26 18:59       ` Bastien Nocera
2007-11-26 21:04         ` Frédéric Blain
2007-11-27  8:32         ` Marcel Holtmann
2007-11-27 10:52           ` Bastien Nocera
2007-11-27 11:08             ` Marcel Holtmann
2007-11-26  5:55 ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1196098681.10878.486.camel@cookie.hadess.net \
    --to=hadess@hadess.net \
    --cc=bluez-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox