How to send/receive a feature report with hidraw.

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

 



Hi,

there must be something that either I am missing or that is missing in
hidraw, I'd bet on the latter _this_time_ :)

I was trying to add "proper" association support for the Sony Sixaxis
Controller, "proper" means without libusb detaching and reattaching the
hid driver which is not particularly nice to evdev or to the user.

In order to do that, the following steps are needed:
 1. I need to _read_ the feature report 0xf2 out of the device in order
    to know its bdaddr so I can tell it to the bluetooth subsystem
 2. I need to  _write_ the feature report 0xf5 to the device in order to
    set the master bdaddr into the controller

I cannot do that with hiddev because the reports above are not listed in
the device HID descriptor and hence they get filtered out.

So the choices are hidraw or a custom sysfs kernel interface.
I decided to give a try to hidraw first, but:
 1. I was not able to find a way to read a specific report
 2. I can only write output reports, see in hidraw.c::hidraw_write()
    ret = dev->hid_output_raw_report(dev, buf, count,
          HID_OUTPUT_REPORT);
              ^^^^^^

If it is confirmed that hidraw can't do what I need, yet, then I'll
propose the aforementioned custom sysfs interface under hid-sony which
works quite well.

Thanks,
   Antonio

P.S. I am not subscribed to linux-usb, please CC me if you get the mail
from there.

-- 
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

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?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

Attachment: pgpaUY7JLSf8h.pgp
Description: PGP signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux