I can't registrate a interupt event on an HID input device. There is no data update when I use
cat /dev/input/event0 |hexdump
while spinning the Logitech G29 ff Wheel or pressing a button (ps3-mode).
cat /proc/bus/input/devices
I: Bus=0003 Vendor=046d Product=c294
Version=0100 N: Name="Logitech G29 Driving Force Racing Wheel"
P: Phys=usb-3f980000.usb-1.3/input0
S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0>>> /0003:046D:C294.0001/input/input0
U: Uniq= H: Handlers=js0 event0
B: PROP=0 B: EV=1b
B: KEY=1fff0000 0 0 0 0 0 0 0 0 0
B: ABS=30027
B: MSC=10
Maybe there is a problem with the IN/OUT endpoint adress, because i could send ForceFeedback commands to the device and it works.
Bus 001 Device 005: ID 046d:c294 Logitech, Inc. Driving Force
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 16
idVendor 0x046d Logitech, Inc.
idProduct 0xc294 Driving Force
bcdDevice 13.50
iManufacturer 1
iProduct 2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 41
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 4
bmAttributes 0x80
(Bus Powered)
MaxPower 98mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.00
bCountryCode 33 US
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 157
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 10
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 10
How can I register button or axis events to j0/event0. Any tips please!
Thanks in advance.
Update 25.05.2016:
Update: After some trial and error I could now communicate with the device using usblib and libusb_interrupt_transfer(handle, ( 0x81 | LIBUSB_ENDPOINT_IN), data, sizeof(data), &actual_length, 0);
I could use both Endpoints, IN and OUT.
The next issue is that the HID Device Descriptor is UNAVAILABLE, So I get only 1 Byte of data for the steering angle and that is far to little for +-450deg.
How can I fix the missing HID Device Descriptor?
Update 26.05.2016:
At least I could fix the "UNAVAILABLE HID Device Descriptor" issue with a trick. Use dmesg
to have a look at the kernel output. Search for the USB device.
1: input: Logitech G29 Driving Force Racing Wheel as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/0003:046D:C294.0001/input/input0
2: logitech 0003:046D:C294.0001: input,hidraw0: USB HID v1.00 Gamepad [Logitech G29 Driving Force Racing Wheel] on usb-3f980000.usb-1.2/input0
I was searching for a sub path in the 1: kernel output 1-1.2:1.0. Unbind the USB device will fix the problem sudo bash -c "echo -n 1-1.2:1.0 >/sys/bus/usb/drivers/usbhid/unbind"
When I now call lsusb -vd 0x046D:0xC294
I will see the HID Device Descriptor.