Re: Device-initiated HID connections: How to pair? (PS Move)

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

 



On Thu, 5 Jan 2012 14:07:25 +0100
Thomas Perl <th.perl@xxxxxxxxx> wrote:

> Hi,
> 
> I'm working on getting the PS Move Controller to work with Linux[1].
> Right now, I'm disabling bluetoothd's "input" plugin and listen to the
> two l2cap sockets directly, which is ugly and prevents using "normal"
> Bluetooth HID devices together with a PS Move controller. Ideally, I
> want bluetoothd to accept the connection and use Linux' hidraw
> interface to communicate with the controller. The GUI pairing in GNOME
> 3 doesn't work, no matter what PIN mode (automatic, 0000, do not pair)
> I select. On Windows, it works after pairing it without PIN, and OS X
> apparently allows the connection without any question or pairing.
>

I worked on the Sixaxis pairing and the mechanism should be similar
read below.

> Is there any way to tell bluetoothd "here's a Bluetooth address, and
> if you get a HID connection from it, accept the connection"? I added
> an entry "XX:XX:XX:XX:XX:XX [all]" to
> /var/lib/bluetooth/YY:YY:YY:YY:YY:YY/trusts, but this entry gets
> removed at first connection (the X-address being the controller's
> address and the Y-address being my host adapter's address) and I'm
> pretty sure that I'm not supposed to hand-edit files in
> /var/lib/bluetooth/ ;) When pressing the PS button on the controller
> (which tries to establish a Bluetooth connection with the host), I
> get:
> 
> bluetoothd[5487]: Refusing input device connect: No such file or directory (2)
>

Just setting the "trust" file is not enough TTBOMK, you have to set also
a "did" (device ID? ) file with the SDP record relative to the device.

> The pairing works about the same way as with the Sixaxis controller
> (use USB HID feature reports to "upload" the Bluetooth host address to
> the controller, and then the controller will connect to this address
> as HID device).
>

Are the Feature reports the same as the Sixaxis? (0xF2 to read the
device bdaddr and 0xF5 to read and write the master bdaddr?).

> I'd be also be grateful for any hints on where to start writing a
> patch if device-initiated HID connections are not supported - I dug
> around a bit in bluetoothd's input module code, but got stuck.
> 

Check out these patches for the BlueZ playstation-peripheral plugin:

http://ao2.it/tmp/__tmp_bluez_playstation-peripheral_plugin.patch

(apply with "git am" on top of 474c85f), in particular the
btd_device_set_trusted() bits (use a clean /var/lib/bluetooth for a
sane run).

The plugin supports only the sixaxis for now, but it is written
with other devices in mind. Tell me if you want me to add you to the CC
list when I submit them again for inclusion in BlueZ.

Regards,
   Antonio

P.S. Thomas you can contact me on IRC or via XMPP/Gtalk as well, look at
http://ao2.it/en/contact

-- 
Antonio Ospite
http://ao2.it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?

Attachment: pgp5Wkp_geLFZ.pgp
Description: PGP signature


[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