[Pkg-bluetooth-maintainers] Bug#626975: Bug#626975: bluez: getting a Logitech, Inc. diNovo Edge Keyboard working
Cristian Ionescu-Idbohrn
cristian.ionescu-idbohrn at axis.com
Mon Jun 6 10:36:50 UTC 2011
I hope this message will reach Marcel too, as it identifies bugs in the
upstream code.
On Mon, 6 Jun 2011, Cristian Ionescu-Idbohrn wrote:
>
> I'd like to get this problem out of the way. What can I do to help?
[snip]
> Secondly, _why_ hid2hci fails:
>
> error: switching device '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3.2/1-3.2.3' failed
>
> strace shows this:
>
> open("/dev/bus/usb/001/006", O_RDWR) = 3
> ioctl(3, HIDIOCINITREPORT, 0) = -1 ENOTTY (Inappropriate ioctl for device)
> close(3) = 0
> write(2, "error: switching device '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3.2/1-3.2.3' failed.\n", 94) = 94
> exit_group(1) = ?
Alright. It looks like I might have found out the cause for the
"Inappropriate ioctl for device" above. Seems the opened device file
"/dev/bus/usb/001/006":
crw-rw-r-- 1 root root 189, 5 Jun 6 09:53 /dev/bus/usb/001/006
_is_ the problem.
Opening "/dev/usb/hiddev0" instead:
crw------- 1 root root 180, 0 Jun 6 09:51 /dev/usb/hiddev0
enables the device:
kernel: [162517.412273] usb 1-3.2.1: new full speed USB device number 7 using ehci_hcd
kernel: [162517.509507] usb 1-3.2.1: New USB device found, idVendor=046d, idProduct=c709
kernel: [162517.509514] usb 1-3.2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
bluetoothd[2700]: HCI dev 0 registered
bluetoothd[2700]: Listening for HCI events on hci0
bluetoothd[2700]: HCI dev 0 up
bluetoothd[2700]: Adapter /org/bluez/2700/hci0 has been enabled
# hcitool dev
Devices:
hci0 00:1F:20:11:22:33
and strace confirms that:
open("/dev/usb/hiddev0", O_RDWR) = 3
ioctl(3, HIDIOCINITREPORT, 0) = 0
ioctl(3, HIDIOCSUSAGE, 0xbfe96a8c) = 0
ioctl(3, HIDIOCSUSAGE, 0xbfe96a8c) = 0
ioctl(3, HIDIOCSUSAGE, 0xbfe96a8c) = 0
ioctl(3, HIDIOCSUSAGE, 0xbfe96a8c) = 0
ioctl(3, HIDIOCSUSAGE, 0xbfe96a8c) = 0
ioctl(3, HIDIOCSUSAGE, 0xbfe96a8c) = 0
ioctl(3, HIDIOCSREPORT, 0xbfe96aa4) = 0
ioctl(3, HIDIOCSUSAGE, 0xbfe96a8c) = 0
ioctl(3, HIDIOCSUSAGE, 0xbfe96a8c) = 0
ioctl(3, HIDIOCSUSAGE, 0xbfe96a8c) = 0
ioctl(3, HIDIOCSUSAGE, 0xbfe96a8c) = 0
ioctl(3, HIDIOCSUSAGE, 0xbfe96a8c) = 0
ioctl(3, HIDIOCSUSAGE, 0xbfe96a8c) = 0
ioctl(3, HIDIOCSREPORT, 0xbfe96aa4) = 0
ioctl(3, HIDIOCSUSAGE, 0xbfe96a8c) = 0
ioctl(3, HIDIOCSUSAGE, 0xbfe96a8c) = 0
ioctl(3, HIDIOCSUSAGE, 0xbfe96a8c) = 0
ioctl(3, HIDIOCSUSAGE, 0xbfe96a8c) = 0
ioctl(3, HIDIOCSUSAGE, 0xbfe96a8c) = 0
ioctl(3, HIDIOCSUSAGE, 0xbfe96a8c) = 0
ioctl(3, HIDIOCSREPORT, 0xbfe96aa4) = 0
close(3) = 0
Still, hid2hci returns status code failure:
exit_group(1) = ?
This is another bug :(
int rc = 1;
is declared in 'main', never changes during the course of the program and
is returned on exit:
exit:
udev_device_unref(udev_dev);
udev_unref(udev);
return rc;
}
Cheers,
--
Cristian
More information about the Pkg-bluetooth-maintainers
mailing list