Linux Hotplug development
 help / color / mirror / Atom feed
From: Antonio Ospite <ospite@studenti.unina.it>
To: linux-hotplug@vger.kernel.org
Cc: linux-input@vger.kernel.org, linux-bluetooth@vger.kernel.org
Subject: [RESEND] ID_SERIAL for udev bluetooth joystick events
Date: Thu, 10 Feb 2011 10:42:04 +0000	[thread overview]
Message-ID: <20110210114204.9639661d.ospite@studenti.unina.it> (raw)

[-- Attachment #1: Type: text/plain, Size: 1830 bytes --]

Hi,

I have a question about udev events generated by a bluetooth joystick:
when udev generates the joystick event for a bt joystick, the ID_SERIAL
property matches the one of the bt adapter not the one of the joystick.

For example (using "udevadm monitor --property"), when connecting the
Sony Sixaxis via usb I get:
ID_SERIAL=Sony_PLAYSTATION_R_3_Controller
in the input and joystick events, but when I connect it via bt, I get:
ID_SERIAL=Broadcom_Corp_ANYCOM_Blue_USB-200_250
which matches my bluetooth adapter.

Is this expected/known, or is it a bug?
I am using kernel 2.6.37, udev 164

For the records, I also get ID_BUS=usb when connecting via bt, but I can
live with that since I can differenciate usb and bt operation using
ID_USB_DRIVER=usbhid
versus
ID_USB_DRIVER=btusb

Some insight of what I am trying to achieve with udev:
  1. Monitor new joystick devices.
  2. If ID_SERIAL != Sony_PLAYSTATION_R_3_Controller, then STOP.
  3. Get the associated hidraw device node navigating the event tree.
  4. Set leds using the value from the ID_INPUT_JOYSTICK property.
  5. If ID_USB_DRIVER=usbhid do the needed pairing.

And with the current behaviour for ID_SERIAL I cannot enforce 2.
I could listen for the (hid) event and use HID_NAME which seems to be a
little more consistent:
usb -> HID_NAME=Sony PLAYSTATION(R)3 Controller
bt  -> HID_NAME=PLAYSTATION(R)3 Controller
and navigate the event hierarchy to get ID_INPUT_JOYSTICK, but that is
slightly more complicated, and I am curious about the ID_SERIAL
behavior anyways :)

Thanks,
  Antonio

-- 
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?

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

             reply	other threads:[~2011-02-10 10:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-10 10:42 Antonio Ospite [this message]
2011-02-21 22:45 ` [RESEND] ID_SERIAL for udev bluetooth joystick events Antonio Ospite

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=20110210114204.9639661d.ospite@studenti.unina.it \
    --to=ospite@studenti.unina.it \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-hotplug@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    /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