Features/PlayStationBDRemote

= PlayStation 3 Blu-ray Disc Remote =

Questions and Comments
What's the best way to implement a driver?
 * With hidd running an input device gets created, but nothing except a SYN event gets reported there (checked with evtest ). This is because the HID descriptor does not define anything except an 11-byte data input package.
 * Some ideas might be taken from CWiid project.

Someone else started to tinker with this some time ago. I can't find more than the first version of a python script. This won't run on Fedora PPC because of an endianness bug in pybluez. And  needs to be stopped to get it working.

Test Script
Here's a python script I wrote for testing purposes:
 * [[Image:PlayStation_BDRemote_bd-remote.py]] bd-remote.py]

It's based on WillWoods' wiimote script.

Output of Command Line Tools
Inquiring ... 00:19:C1:2D:91:F2	clock offset: 0x30b3	class: 0x00250c

Requesting information ... BD Address: 00:19:C1:2D:91:F2 Device Name: BD Remote Control LMP Version: 2.0 (0x3) LMP Subversion: 0x229 Manufacturer: Broadcom Corporation (15) Features: 0xbc 0x02 0x04 0x38 0x08 0x00 0x00 0x00  

Sequence Attribute 0x0000 - ServiceRecordHandle UINT32 0x00010000 Attribute 0x0001 - ServiceClassIDList Sequence UUID16 0x1124 - HumanInterfaceDeviceService (HID) Attribute 0x0004 - ProtocolDescriptorList Sequence Sequence UUID16 0x0100 - L2CAP UINT16 0x0011 Sequence UUID16 0x0011 - HIDP Attribute 0x0005 - BrowseGroupList Sequence UUID16 0x1002 - PublicBrowseGroup Attribute 0x0006 - LanguageBaseAttributeIDList Sequence UINT16 0x656e UINT16 0x006a UINT16 0x0100 Attribute 0x0009 - BluetoothProfileDescriptorList Sequence Sequence UUID16 0x1124 - HumanInterfaceDeviceService (HID) UINT16 0x0100 Attribute 0x000d - AdditionalProtocolDescriptorLists Sequence Sequence Sequence UUID16 0x0100 - L2CAP UINT16 0x0013 Sequence UUID16 0x0011 - HIDP Attribute 0x0100 String BD Remote Control Attribute 0x0101 String BD Remote Control Attribute 0x0102 String Sony Computer Entertainment Inc Attribute 0x0200 UINT16 0x0100 Attribute 0x0201 UINT16 0x0111 Attribute 0x0202 UINT8 0x0c Attribute 0x0203 UINT8 0x21 Attribute 0x0204 Bool True Attribute 0x0205 Bool True Attribute 0x0206 Sequence Sequence UINT8 0x22 Data 05 01 09 05 a1 01 85 01 15 00 26 ff 00 75 08 95 0b 06 00 ff 09 01 81 00 85 01 95 0b 09 01 b1 00 85 02 95 0b 09 01 b1 00 85 03 95 0b 09 01 b1 00 85 04 95 0b 09 01 b1 00 85 05 95 0b 09 01 b1 00 85 06 95 0b 09 01 b1 00 c0 00 Attribute 0x0207 Sequence Sequence UINT16 0x0409 UINT16 0x0100 Attribute 0x0208 Bool False Attribute 0x0209 Bool True Attribute 0x020a Bool True Attribute 0x020b UINT16 0x0100 Attribute 0x020c UINT16 0x1f40 Attribute 0x020d Bool False Attribute 0x020e Bool False

HID Descriptor
See attribute 0x0206 of the first sequence of  output. Decoded with Device Class Definition spec available at www.usb.org. 05 01		Usage Page (Generic Desktop) 09 05		Usage ID (Game Pad) a1 01		Collection (Application) 85 01			Report ID (1) 15 00			Logical Minimum (0) 26 ff 00		Logical Maximum (255) 75 08			Report Size (8) 95 0b			Report Count (11) 06 00 ff		Usage Page (Vendor Defined Page 1) 09 01			Usage (Vendor Usage 1) 81 00			Input (Data,Array,Absolute) 85 01			Report ID (1) 95 0b			Report Count (11) 09 01			Usage (Vendor Usage 1) b1 00			Feature (Data,Array,Absolute) 85 02			Report ID (2) 95 0b			Report Count (11) 09 01			Usage (Vendor Usage 1) b1 00			Feature (Data,Array,Absolute) 85 03			Report ID (3) 95 0b			Report Count (11) 09 01			Usage (Vendor Usage 1) b1 00			Feature (Data,Array,Absolute) 85 04			Report ID (4) 95 0b			Report Count (11) 09 01			Usage (Vendor Usage 1) b1 00			Feature (Data,Array,Absolute) 85 05			Report ID (5) 95 0b			Report count (11) 09 01			Usage (Vendor Usage 1) b1 00			Feature (Data,Array,Absolute) 85 06			Report ID (6) 95 0b			Report count (11) 09 01			Usage (Vendor Usage 1) b1 00			Feature (Data,Array,Absolute) c0		End Collection 00

Key Mapping

 * Retrieved with
 * Packet length: 13 bytes
 * Example:

Byte 0

 * Transaction and Report Type 0xA1
 * Transaction Type: DATA Request (0xA0)
 * Report Type: Input (0x01)

See Human Interface Device Profile spec available at www.bluetooth.com.

Byte 1

 * Report ID 0x01

Byte 5 - Mapping for single button presses

 * If none or more than one button is pressed it is 0xFF.

Byte 6-10

 * Fix at 0xFF

Byte 12

 * Very likely the battery status
 * With a pair of fresh 1.5V batteries this byte reports 0x05
 * A pair of 1.2V accumulators (probably not fully loaded) gives 0x03