Return-Path: Date: Fri, 4 Feb 2011 23:34:27 +0100 From: Antonio Ospite To: linux-bluetooth@vger.kernel.org Cc: linux-input@vger.kernel.org, Alan Ott Subject: ID_SERIAL for udev bluetooth joystick events Message-Id: <20110204233427.09b32d7e.ospite@studenti.unina.it> Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Fri__4_Feb_2011_23_34_27_+0100_QT9kd2x8w.qDjRfR" Sender: linux-input-owner@vger.kernel.org List-ID: --Signature=_Fri__4_Feb_2011_23_34_27_+0100_QT9kd2x8w.qDjRfR Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, I have a question about udev events generated by a bluetooth joystick: when the bt joystick generates the joystick event, 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=3DSony_PLAYSTATION_R_3_Controller in the input and joystick events, but when I connect it via bt, I get: ID_SERIAL=3DBroadcom_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=3Dusb when connecting via bt, but I can live with that since I can differenciate usb and bt operation using ID_USB_DRIVER=3Dusbhid versus ID_USB_DRIVER=3Dbtusb Some insight of what I am trying to achieve with udev: 1. Monitor new joystick devices. 2. If ID_SERIAL !=3D 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=3Dusbhid 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=3DSony PLAYSTATION(R)3 Controller bt -> HID_NAME=3DPLAYSTATION(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 --=20 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? --Signature=_Fri__4_Feb_2011_23_34_27_+0100_QT9kd2x8w.qDjRfR Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk1MfvMACgkQ5xr2akVTsAHrJACZATgbtyofq4wSwPH/bhEuEVW3 XZcAn3B+JpNbQh2/KNAk6BFE7Pq+yiSR =5Q3b -----END PGP SIGNATURE----- --Signature=_Fri__4_Feb_2011_23_34_27_+0100_QT9kd2x8w.qDjRfR--