Re: Race condition between DIS and HoG profiles

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

 



Hi Leigh,

On Fri, Aug 19, 2016 at 9:29 AM, Leigh Fiddes <leigh.fiddes@xxxxxxxxxx> wrote:
> Hi,
>
> In November 2012 an issue was identified in which the uhid device was
> being created before the DIS information had been retrieved. This cause
> the input device to not have the correct vendor and product identifiers.
> See the message http://www.spinics.net/lists/linux-bluetooth/msg31931.html
>
> The patch proposed was not included and I have not seen any discussion as to why.
>
> I am seeing this exact problem with Bluez 5.41 on Linux 4.1 with a
> Nordic nRF51 development board as the peripheral. Some snippets from the
> /var/log/messages show the result.
>
>
> Jan  1 00:02:54 bluetoothd[714]: src/device.c:device_probe_profiles() Probing profiles for device C0:58:9E:9D:A6:FF
> Jan  1 00:02:54 bluetoothd[714]: profiles/input/hog.c:hog_probe() path /org/bluez/hci0/dev_C0_58_9E_9D_A6_FF
> Jan  1 00:02:54 bluetoothd[714]: profiles/input/hog.c:hog_device_new() name=Nordic_Mouse vendor=0x0, product=0x0, version=0x0
>
> Jan  1 00:02:55 bluetoothd[714]: profiles/deviceinfo/deviceinfo.c:read_pnpid_cb() Vendor 1915 Product EEEE Version 0001
>
> Jan  1 00:02:57 kernel: [  179.706068] input: Nordic_Mouse as /devices/virtual/misc/uhid/0005:0000:0000.0001/input/input2
> Jan  1 00:02:57 kernel: [  179.706681] hid-generic 0005:0000:0000.0001:input: BLUETOOTH HID v0.00 Mouse [Nordic_Mouse] on 00:1A:7D:DA:71:13
> Jan  1 00:02:57 bluetoothd[714]: profiles/input/hog-lib.c:report_map_read_cb() HoG created uHID device
>
> interestingly, if I stop and restart bluetoothd without changing
> anything else the correct input is created, since the vendor, product
> and version are now valid
>
> Jan  1 00:04:14 kernel: [  256.476283] input: Nordic_Mouse as /devices/virtual/misc/uhid/0005:1915:EEEE.0002/input/input3
> Jan  1 00:04:14 bluetoothd[773]: profiles/input/hog-lib.c:report_map_read_cb() HoG created uHID device
> Jan  1 00:04:14 bluetoothd[773]: attrib/gattrib.c:g_attrib_unref() 0xad4e78: g_attrib_unref=2
> Jan  1 00:04:14 kernel: [  256.477313] hid-generic 0005:1915:EEEE.0002:input: BLUETOOTH HID v0.01 Mouse [Nordic_Mouse] on 00:1A:7D:DA:71:13
>
> Is this a problem for anyone else?

I guess this would be a problem only if the device requires a specific
driver, or are you saying it doesn't work the first time either? We
should be able to fix the this problem by checking the profile
priority and have DIS before HoG in case the generic HID driver
doesn't work.

-- 
Luiz Augusto von Dentz
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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