* Force Feedback support not recognized on Granite Devices Simucube
@ 2019-06-17 11:46 Bernd Steinhauser
2020-02-05 18:54 ` Bernd Steinhauser
0 siblings, 1 reply; 6+ messages in thread
From: Bernd Steinhauser @ 2019-06-17 11:46 UTC (permalink / raw)
To: linux-input; +Cc: linux-usb
[-- Attachment #1: Type: text/plain, Size: 2194 bytes --]
Resending this message to linux input as suggested.
Hi,
I own a Granite Devices Simucube force feedback wheel which I'd like to get
working under Linux.
The current status is that if I use a tool to check/test the FFB, it tells me
that the device does not support FFB.
I'm also using the device under Windows 7 and there it works without any special
driver, so it should work with USB HID FFB.
In principle, it supports the following effects (see link below):
- constant force
- friction
- damping
- spring
- sine wave
- square wave
- sawtooth
- triangle
The device advertises as MCS, Granite Devices SimuCUBE with id 16d0:0d5a, I'll
attach lsusb output.
Upon connection, the device is recognized and the output is:
[ 3271.812807] usb 1-2.4.2: new full-speed USB device number 10 using xhci_hcd
[ 3271.921182] usb 1-2.4.2: New USB device found, idVendor=16d0, idProduct=0d5a,
bcdDevice= 2.00
[ 3271.921184] usb 1-2.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3271.921185] usb 1-2.4.2: Product: SimuCUBE
[ 3271.921186] usb 1-2.4.2: Manufacturer: Granite Devices
[ 3271.921187] usb 1-2.4.2: SerialNumber: 0123456789
[ 3281.943990] input: Granite Devices SimuCUBE as
/devices/pci0000:00/0000:00:09.0/0000:04:00.0/usb1/1-2/1-2.4/1-2.4.2/1-2.4.2:1.0/0003:16D0:0D5A.0016/input/input48
[ 3281.944223] hid-generic 0003:16D0:0D5A.0016: unknown set_effect report layout
[ 3281.944228] hid-generic 0003:16D0:0D5A.0016: input,hiddev2,hidraw15: USB HID
v1.11 Joystick [Granite Devices SimuCUBE] on usb-0000:04:00.0-2.4.2/input0
I spent some time looking at the code and also other ffb code in usbhid, but
since I'm not really familiar with C I have a hard time figuring out why it
doesn't work out of the box and how to fix this, but I'd be happy to help
implementing/debugging it.
For a start, it would be really nice to find out what is reported, what the
report should look like and why it doesn't match.
Kind Regards,
Bernd
Links that might or might not be useful for general information:
https://granitedevices.com/wiki/SimuCUBE_technical_specifications
https://granitedevices.com/wiki/SimuCUBE_Firmware_User_Guide#DirectInput_Effect_Settings_and_Descriptions
[-- Attachment #2: lsusb-v.txt --]
[-- Type: text/plain, Size: 2406 bytes --]
Bus 001 Device 010: ID 16d0:0d5a MCS
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x16d0 MCS
idProduct 0x0d5a
bcdDevice 2.00
iManufacturer 1 Granite Devices
iProduct 2 SimuCUBE
iSerial 3 0123456789
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0029
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 1465
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 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
can't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
Device Status: 0x0001
Self Powered
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Force Feedback support not recognized on Granite Devices Simucube
2019-06-17 11:46 Force Feedback support not recognized on Granite Devices Simucube Bernd Steinhauser
@ 2020-02-05 18:54 ` Bernd Steinhauser
2022-06-26 9:59 ` Bernd Steinhauser
0 siblings, 1 reply; 6+ messages in thread
From: Bernd Steinhauser @ 2020-02-05 18:54 UTC (permalink / raw)
To: linux-input; +Cc: linux-usb
[-- Attachment #1: Type: text/plain, Size: 3832 bytes --]
On 17/06/2019 13:46, Bernd Steinhauser wrote:
> Resending this message to linux input as suggested.
>
> Hi,
>
> I own a Granite Devices Simucube force feedback wheel which I'd like to get
> working under Linux.
> The current status is that if I use a tool to check/test the FFB, it tells me
> that the device does not support FFB.
> I'm also using the device under Windows 7 and there it works without any
> special driver, so it should work with USB HID FFB.
> In principle, it supports the following effects (see link below):
> - constant force
> - friction
> - damping
> - spring
> - sine wave
> - square wave
> - sawtooth
> - triangle
>
> The device advertises as MCS, Granite Devices SimuCUBE with id 16d0:0d5a, I'll
> attach lsusb output.
> Upon connection, the device is recognized and the output is:
>
> [ 3271.812807] usb 1-2.4.2: new full-speed USB device number 10 using xhci_hcd
> [ 3271.921182] usb 1-2.4.2: New USB device found, idVendor=16d0,
> idProduct=0d5a, bcdDevice= 2.00
> [ 3271.921184] usb 1-2.4.2: New USB device strings: Mfr=1, Product=2,
> SerialNumber=3
> [ 3271.921185] usb 1-2.4.2: Product: SimuCUBE
> [ 3271.921186] usb 1-2.4.2: Manufacturer: Granite Devices
> [ 3271.921187] usb 1-2.4.2: SerialNumber: 0123456789
> [ 3281.943990] input: Granite Devices SimuCUBE as
> /devices/pci0000:00/0000:00:09.0/0000:04:00.0/usb1/1-2/1-2.4/1-2.4.2/1-2.4.2:1.0/0003:16D0:0D5A.0016/input/input48
> [ 3281.944223] hid-generic 0003:16D0:0D5A.0016: unknown set_effect report layout
> [ 3281.944228] hid-generic 0003:16D0:0D5A.0016: input,hiddev2,hidraw15: USB
> HID v1.11 Joystick [Granite Devices SimuCUBE] on usb-0000:04:00.0-2.4.2/input0
>
> I spent some time looking at the code and also other ffb code in usbhid, but
> since I'm not really familiar with C I have a hard time figuring out why it
> doesn't work out of the box and how to fix this, but I'd be happy to help
> implementing/debugging it.
> For a start, it would be really nice to find out what is reported, what the
> report should look like and why it doesn't match.
>
> Kind Regards,
> Bernd
>
> Links that might or might not be useful for general information:
> https://granitedevices.com/wiki/SimuCUBE_technical_specifications
> https://granitedevices.com/wiki/SimuCUBE_Firmware_User_Guide#DirectInput_Effect_Settings_and_Descriptions
>
Hi,
I would to catch up on this, as I found time to investigate this a bit more.
I also had a chat with one of the devs at GD and he told me that apparently the
PID field A7h (Start Delay) is the problematic thing here.
The hid-pidff.c driver requests this field:
#define PID_EFFECT_BLOCK_INDEX»·0
#define PID_DURATION»···»···1
#define PID_GAIN»···»···2
#define PID_TRIGGER_BUTTON»·3
#define PID_TRIGGER_REPEAT_INT»·4
#define PID_DIRECTION_ENABLE»···5
#define PID_START_DELAY»»···6
static const u8 pidff_set_effect[] = {
»···0x22, 0x50, 0x52, 0x53, 0x54, 0x56, 0xa7
};
but the device does not send it (I attached the descriptor from the device),
hence the driver complains about the unknown set_effect layout.
Now the thing is they tried adding the field, but in that case the Windows HID
driver will not recognize the device properly anymore as for some reason it
expects that field not to be set.
With that knowledge I tried again with the field 0xa7 removed (and some other
references to start delay) and in that case the device was recognized properly
and I could run some FFB tests successfully.
There was a warning about an unknown condition effect layout (as there are 2
missing fields in that one as well), but that should be a minor thing for the
moment.
I suspect that just removing the 0xa7 field (as I did) is not a proper solution
here, but is there an easy way to get this working with a bit of special handling?
Best Regards,
Bernd
[-- Attachment #2: report --]
[-- Type: text/plain, Size: 19182 bytes --]
Usage Page (Desktop), ; Generic desktop controls (01h)
Usage (Joystick), ; Joystick (04h, application collection)
Collection (Application),
Report ID (4),
Usage (Pointer), ; Pointer (01h, physical collection)
Collection (Physical),
Usage (X), ; X (30h, dynamic value)
Logical Minimum (0),
Logical Maximum (65535),
Physical Minimum (0),
Physical Maximum (65535),
Report Size (16),
Report Count (1),
Input (Variable),
Usage (Y), ; Y (31h, dynamic value)
Logical Minimum (0),
Logical Maximum (65535),
Physical Minimum (0),
Physical Maximum (65535),
Report Size (16),
Report Count (1),
Input (Variable),
Usage (Z), ; Z (32h, dynamic value)
Logical Minimum (0),
Logical Maximum (65535),
Physical Minimum (0),
Physical Maximum (65535),
Report Size (16),
Report Count (1),
Input (Variable),
Usage (Rx), ; Rx (33h, dynamic value)
Logical Minimum (0),
Logical Maximum (65535),
Physical Minimum (0),
Physical Maximum (65535),
Report Size (16),
Report Count (1),
Input (Variable),
Usage (Ry), ; Ry (34h, dynamic value)
Logical Minimum (0),
Logical Maximum (65535),
Physical Minimum (0),
Physical Maximum (65535),
Report Size (16),
Report Count (1),
Input (Variable),
Usage (Rz), ; Rz (35h, dynamic value)
Logical Minimum (0),
Logical Maximum (65535),
Physical Minimum (0),
Physical Maximum (65535),
Report Size (16),
Report Count (1),
Input (Variable),
Usage (Slider), ; Slider (36h, dynamic value)
Logical Minimum (0),
Logical Maximum (65535),
Physical Minimum (0),
Physical Maximum (65535),
Report Size (16),
Report Count (1),
Input (Variable),
Usage (Dial), ; Dial (37h, dynamic value)
Logical Minimum (0),
Logical Maximum (65535),
Physical Minimum (0),
Physical Maximum (65535),
Report Size (16),
Report Count (1),
Input (Variable),
Logical Minimum (0),
Logical Maximum (1),
Report Size (1),
Report Count (128),
Usage Page (Button), ; Button (09h)
Usage Minimum (01h),
Usage Maximum (80h),
Input (Variable),
End Collection,
Usage Page (PID), ; Physical interface device (0Fh)
Usage (92h),
Collection (Logical),
Report ID (2),
Usage (9Fh),
Usage (A0h),
Usage (A4h),
Usage (A5h),
Usage (A6h),
Logical Minimum (0),
Logical Maximum (1),
Physical Minimum (0),
Physical Maximum (1),
Report Size (1),
Report Count (5),
Input (Variable),
Report Count (3),
Input (Constant, Variable),
Usage (94h),
Logical Minimum (0),
Logical Maximum (1),
Physical Minimum (0),
Physical Maximum (1),
Report Size (1),
Report Count (1),
Input (Variable),
Usage (22h),
Logical Minimum (1),
Logical Maximum (40),
Physical Minimum (1),
Physical Maximum (40),
Report Size (7),
Report Count (1),
Input (Variable),
End Collection,
Usage (21h),
Collection (Logical),
Report ID (1),
Usage (22h),
Logical Minimum (1),
Logical Maximum (40),
Physical Minimum (1),
Physical Maximum (40),
Report Size (8),
Report Count (1),
Output (Variable),
Usage (25h),
Collection (Logical),
Usage (26h),
Usage (27h),
Usage (30h),
Usage (31h),
Usage (32h),
Usage (33h),
Usage (34h),
Usage (40h),
Usage (41h),
Usage (42h),
Usage (43h),
Usage (28h),
Logical Maximum (12),
Logical Minimum (1),
Physical Minimum (1),
Physical Maximum (12),
Report Size (8),
Report Count (1),
Output,
End Collection,
Usage (50h),
Usage (54h),
Usage (51h),
Logical Minimum (0),
Logical Maximum (32767),
Physical Minimum (0),
Physical Maximum (32767),
Unit (Seconds),
Unit Exponent (-3),
Report Size (16),
Report Count (3),
Output (Variable),
Unit Exponent (0),
Unit,
Usage (52h),
Logical Minimum (0),
Logical Maximum (255),
Physical Minimum (0),
Physical Maximum (10000),
Report Size (8),
Report Count (1),
Output (Variable),
Usage (53h),
Logical Minimum (1),
Logical Maximum (8),
Physical Minimum (1),
Physical Maximum (8),
Report Size (8),
Report Count (1),
Output (Variable),
Usage (55h),
Collection (Logical),
Usage Page (Desktop), ; Generic desktop controls (01h)
Usage (X), ; X (30h, dynamic value)
Logical Minimum (0),
Logical Maximum (1),
Report Size (1),
Report Count (1),
Output (Variable),
End Collection,
Usage Page (PID), ; Physical interface device (0Fh)
Usage (56h),
Report Count (1),
Output (Variable),
Report Count (6),
Output (Constant, Variable),
Usage (57h),
Collection (Logical),
Usage (000A0001h), ; Ordinal (0Ah)
Usage (000A0002h), ; Ordinal (0Ah)
Unit (Degrees),
Unit Exponent (-2),
Logical Minimum (0),
Logical Maximum (180),
Physical Minimum (0),
Physical Maximum (36000),
Unit,
Report Size (8),
Report Count (1),
Output (Variable),
Unit Exponent (0),
Unit,
End Collection,
Usage Page (PID), ; Physical interface device (0Fh)
Unit (Seconds),
Unit Exponent (-3),
Logical Minimum (0),
Logical Maximum (32767),
Physical Minimum (0),
Physical Maximum (32767),
Report Size (16),
Report Count (1),
Unit,
Unit Exponent (0),
End Collection,
Usage Page (PID), ; Physical interface device (0Fh)
Usage (5Ah),
Collection (Logical),
Report ID (2),
Usage (22h),
Logical Minimum (1),
Logical Maximum (40),
Physical Minimum (1),
Physical Maximum (40),
Report Size (8),
Report Count (1),
Output (Variable),
Usage (5Bh),
Usage (5Dh),
Logical Minimum (0),
Logical Maximum (255),
Physical Minimum (0),
Physical Maximum (10000),
Report Count (2),
Output (Variable),
Usage (5Ch),
Usage (5Eh),
Unit (Seconds),
Unit Exponent (-3),
Logical Maximum (32767),
Physical Maximum (32767),
Report Size (16),
Output (Variable),
Physical Maximum (0),
Unit,
Unit Exponent (0),
End Collection,
Usage (5Fh),
Collection (Logical),
Report ID (3),
Usage (22h),
Logical Minimum (1),
Logical Maximum (40),
Physical Minimum (1),
Physical Maximum (40),
Report Size (8),
Report Count (1),
Output (Variable),
Usage (23h),
Logical Minimum (0),
Logical Maximum (1),
Physical Minimum (0),
Physical Maximum (1),
Report Size (4),
Report Count (1),
Output (Variable),
Usage (58h),
Collection (Logical),
Usage (000A0001h), ; Ordinal (0Ah)
Usage (000A0002h), ; Ordinal (0Ah)
Report Size (2),
Report Count (2),
Output (Variable),
End Collection,
Logical Minimum (-128),
Logical Maximum (127),
Physical Minimum (-10000),
Physical Maximum (10000),
Usage (60h),
Report Size (8),
Report Count (1),
Output (Variable),
Physical Minimum (-10000),
Physical Maximum (10000),
Usage (61h),
Report Count (1),
Output (Variable),
Logical Minimum (0),
Logical Maximum (255),
Physical Minimum (0),
Physical Maximum (10000),
Usage (63h),
Usage (64h),
Report Size (8),
Report Count (2),
Output (Variable),
End Collection,
Usage (6Eh),
Collection (Logical),
Report ID (4),
Usage (22h),
Logical Minimum (1),
Logical Maximum (40),
Physical Minimum (1),
Physical Maximum (40),
Report Size (8),
Report Count (1),
Output (Variable),
Usage (70h),
Logical Minimum (0),
Logical Maximum (10000),
Physical Minimum (0),
Physical Maximum (10000),
Report Size (16),
Report Count (1),
Output (Variable),
Usage (6Fh),
Logical Minimum (-10000),
Logical Maximum (10000),
Physical Minimum (-10000),
Physical Maximum (10000),
Report Count (1),
Report Size (16),
Output (Variable),
Usage (71h),
Unit (Degrees),
Unit Exponent (-2),
Logical Minimum (0),
Logical Maximum (35999),
Physical Minimum (0),
Physical Maximum (35999),
Report Size (16),
Report Count (1),
Output (Variable),
Usage (72h),
Logical Minimum (0),
Logical Maximum (32767),
Physical Minimum (0),
Physical Maximum (32767),
Unit (Seconds),
Unit Exponent (-3),
Report Size (32),
Report Count (1),
Output (Variable),
Unit,
Unit Exponent (0),
End Collection,
Usage (73h),
Collection (Logical),
Report ID (5),
Usage (22h),
Logical Minimum (1),
Logical Maximum (40),
Physical Minimum (1),
Physical Maximum (40),
Report Size (8),
Report Count (1),
Output (Variable),
Usage (70h),
Logical Minimum (-10000),
Logical Maximum (10000),
Physical Minimum (-10000),
Physical Maximum (10000),
Report Size (16),
Report Count (1),
Output (Variable),
End Collection,
Usage (74h),
Collection (Logical),
Report ID (6),
Usage (22h),
Logical Minimum (1),
Logical Maximum (40),
Physical Minimum (1),
Physical Maximum (40),
Report Size (8),
Report Count (1),
Output (Variable),
Usage (75h),
Usage (76h),
Logical Minimum (-128),
Logical Maximum (127),
Physical Minimum (-10000),
Physical Maximum (10000),
Report Size (8),
Report Count (2),
Output (Variable),
End Collection,
Usage (68h),
Collection (Logical),
Report ID (7),
Usage (22h),
Logical Minimum (1),
Logical Maximum (40),
Physical Minimum (1),
Physical Maximum (40),
Report Size (8),
Report Count (1),
Output (Variable),
Usage (6Ch),
Logical Minimum (0),
Logical Maximum (10000),
Physical Minimum (0),
Physical Maximum (10000),
Report Size (16),
Report Count (1),
Output (Variable),
Usage (69h),
Logical Minimum (-127),
Logical Maximum (127),
Physical Minimum (0),
Physical Maximum (255),
Report Size (8),
Report Count (12),
Output (Variable, Buffered Bytes),
End Collection,
Usage (66h),
Collection (Logical),
Report ID (8),
Usage Page (Desktop), ; Generic desktop controls (01h)
Usage (X), ; X (30h, dynamic value)
Usage (Y), ; Y (31h, dynamic value)
Logical Minimum (-127),
Logical Maximum (127),
Physical Minimum (0),
Physical Maximum (255),
Report Size (8),
Report Count (2),
Output (Variable),
End Collection,
Usage Page (PID), ; Physical interface device (0Fh)
Usage (77h),
Collection (Logical),
Report ID (10),
Usage (22h),
Logical Minimum (1),
Logical Maximum (40),
Physical Minimum (1),
Physical Maximum (40),
Report Size (8),
Report Count (1),
Output (Variable),
Usage (78h),
Collection (Logical),
Usage (79h),
Usage (7Ah),
Usage (7Bh),
Logical Minimum (1),
Logical Maximum (3),
Report Size (8),
Report Count (1),
Output,
End Collection,
Usage (7Ch),
Logical Minimum (0),
Logical Maximum (255),
Physical Minimum (0),
Physical Maximum (255),
Output (Variable),
End Collection,
Usage (90h),
Collection (Logical),
Report ID (11),
Usage (22h),
Logical Maximum (40),
Logical Minimum (1),
Physical Minimum (1),
Physical Maximum (40),
Report Size (8),
Report Count (1),
Output (Variable),
End Collection,
Usage (96h),
Collection (Logical),
Report ID (12),
Usage (97h),
Usage (98h),
Usage (99h),
Usage (9Ah),
Usage (9Bh),
Usage (9Ch),
Logical Minimum (1),
Logical Maximum (6),
Report Size (8),
Report Count (1),
Output,
End Collection,
Usage (7Dh),
Collection (Logical),
Report ID (13),
Usage (7Eh),
Logical Minimum (0),
Logical Maximum (255),
Physical Minimum (0),
Physical Maximum (10000),
Report Size (8),
Report Count (1),
Output (Variable),
End Collection,
Usage (6Bh),
Collection (Logical),
Report ID (14),
Usage (22h),
Logical Minimum (1),
Logical Maximum (40),
Physical Minimum (1),
Physical Maximum (40),
Report Size (8),
Report Count (1),
Output (Variable),
Usage (6Dh),
Logical Minimum (0),
Logical Maximum (255),
Physical Minimum (0),
Physical Maximum (255),
Report Size (8),
Report Count (1),
Output (Variable),
Usage (51h),
Unit (Seconds),
Unit Exponent (-3),
Logical Minimum (0),
Logical Maximum (32767),
Physical Minimum (0),
Physical Maximum (32767),
Report Size (16),
Report Count (1),
Output (Variable),
Unit Exponent (0),
Unit,
End Collection,
Usage (ABh),
Collection (Logical),
Report ID (5),
Usage (25h),
Collection (Logical),
Usage (26h),
Usage (27h),
Usage (30h),
Usage (31h),
Usage (32h),
Usage (33h),
Usage (34h),
Usage (40h),
Usage (41h),
Usage (42h),
Usage (43h),
Usage (28h),
Logical Maximum (12),
Logical Minimum (1),
Physical Minimum (1),
Physical Maximum (12),
Report Size (8),
Report Count (1),
Feature,
End Collection,
Usage Page (Desktop), ; Generic desktop controls (01h)
Usage (Byte Count), ; Byte count (3Bh, dynamic value)
Logical Minimum (0),
Logical Maximum (511),
Physical Minimum (0),
Physical Maximum (511),
Report Size (10),
Report Count (1),
Feature (Variable),
Report Size (6),
Feature (Constant),
End Collection,
Usage Page (PID), ; Physical interface device (0Fh)
Usage (89h),
Collection (Logical),
Report ID (6),
Usage (22h),
Logical Maximum (40),
Logical Minimum (1),
Physical Minimum (1),
Physical Maximum (40),
Report Size (8),
Report Count (1),
Feature (Variable),
Usage (8Bh),
Collection (Logical),
Usage (8Ch),
Usage (8Dh),
Usage (8Eh),
Logical Maximum (3),
Logical Minimum (1),
Physical Minimum (1),
Physical Maximum (3),
Report Size (8),
Report Count (1),
Feature,
End Collection,
Usage (ACh),
Logical Minimum (0),
Logical Maximum (65535),
Physical Minimum (0),
Physical Maximum (65535),
Report Size (16),
Report Count (1),
Feature,
End Collection,
Usage (7Fh),
Collection (Logical),
Report ID (7),
Usage (80h),
Report Size (16),
Report Count (1),
Logical Minimum (0),
Physical Minimum (0),
Logical Maximum (65535),
Physical Maximum (65535),
Feature (Variable),
Usage (83h),
Logical Maximum (255),
Physical Maximum (255),
Report Size (8),
Report Count (1),
Feature (Variable),
Usage (A9h),
Usage (AAh),
Report Size (1),
Report Count (2),
Logical Minimum (0),
Logical Maximum (1),
Physical Minimum (0),
Physical Maximum (1),
Feature (Variable),
Report Size (6),
Report Count (1),
Feature (Constant, Variable),
End Collection,
Usage Page (FF00h), ; FF00h, vendor-defined
Usage (01h),
Collection (Application),
Usage (01h),
Report ID (107),
Report Size (8),
Report Count (60),
Logical Minimum (0),
Logical Maximum (255),
Output,
Usage (01h),
Report ID (108),
Input,
End Collection,
Usage Page (FF00h), ; FF00h, vendor-defined
Usage (01h),
Collection (Application),
Usage (01h),
Report ID (77),
Report Size (8),
Report Count (60),
Logical Minimum (0),
Logical Maximum (65535),
Output,
End Collection,
End Collection
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Force Feedback support not recognized on Granite Devices Simucube
2020-02-05 18:54 ` Bernd Steinhauser
@ 2022-06-26 9:59 ` Bernd Steinhauser
0 siblings, 0 replies; 6+ messages in thread
From: Bernd Steinhauser @ 2022-06-26 9:59 UTC (permalink / raw)
To: linux-input; +Cc: linux-usb
[-- Attachment #1: Type: text/plain, Size: 4842 bytes --]
On 2/5/20 19:54, Bernd Steinhauser wrote:
> On 17/06/2019 13:46, Bernd Steinhauser wrote:
>> Resending this message to linux input as suggested.
>>
>> Hi,
>>
>> I own a Granite Devices Simucube force feedback wheel which I'd like to get
>> working under Linux.
>> The current status is that if I use a tool to check/test the FFB, it tells me
>> that the device does not support FFB.
>> I'm also using the device under Windows 7 and there it works without any
>> special driver, so it should work with USB HID FFB.
>> In principle, it supports the following effects (see link below):
>> - constant force
>> - friction
>> - damping
>> - spring
>> - sine wave
>> - square wave
>> - sawtooth
>> - triangle
>>
>> The device advertises as MCS, Granite Devices SimuCUBE with id 16d0:0d5a,
>> I'll attach lsusb output.
>> Upon connection, the device is recognized and the output is:
>>
>> [ 3271.812807] usb 1-2.4.2: new full-speed USB device number 10 using xhci_hcd
>> [ 3271.921182] usb 1-2.4.2: New USB device found, idVendor=16d0,
>> idProduct=0d5a, bcdDevice= 2.00
>> [ 3271.921184] usb 1-2.4.2: New USB device strings: Mfr=1, Product=2,
>> SerialNumber=3
>> [ 3271.921185] usb 1-2.4.2: Product: SimuCUBE
>> [ 3271.921186] usb 1-2.4.2: Manufacturer: Granite Devices
>> [ 3271.921187] usb 1-2.4.2: SerialNumber: 0123456789
>> [ 3281.943990] input: Granite Devices SimuCUBE as
>> /devices/pci0000:00/0000:00:09.0/0000:04:00.0/usb1/1-2/1-2.4/1-2.4.2/1-2.4.2:1.0/0003:16D0:0D5A.0016/input/input48
>> [ 3281.944223] hid-generic 0003:16D0:0D5A.0016: unknown set_effect report layout
>> [ 3281.944228] hid-generic 0003:16D0:0D5A.0016: input,hiddev2,hidraw15: USB
>> HID v1.11 Joystick [Granite Devices SimuCUBE] on usb-0000:04:00.0-2.4.2/input0
>>
>> I spent some time looking at the code and also other ffb code in usbhid, but
>> since I'm not really familiar with C I have a hard time figuring out why it
>> doesn't work out of the box and how to fix this, but I'd be happy to help
>> implementing/debugging it.
>> For a start, it would be really nice to find out what is reported, what the
>> report should look like and why it doesn't match.
>>
>> Kind Regards,
>> Bernd
>>
>> Links that might or might not be useful for general information:
>> https://granitedevices.com/wiki/SimuCUBE_technical_specifications
>> https://granitedevices.com/wiki/SimuCUBE_Firmware_User_Guide#DirectInput_Effect_Settings_and_Descriptions
>>
> Hi,
>
> I would to catch up on this, as I found time to investigate this a bit more.
> I also had a chat with one of the devs at GD and he told me that apparently
> the PID field A7h (Start Delay) is the problematic thing here.
> The hid-pidff.c driver requests this field:
> #define PID_EFFECT_BLOCK_INDEX»·0
>
> #define PID_DURATION»···»···1
> #define PID_GAIN»···»···2
> #define PID_TRIGGER_BUTTON»·3
> #define PID_TRIGGER_REPEAT_INT»·4
> #define PID_DIRECTION_ENABLE»···5
> #define PID_START_DELAY»»···6
> static const u8 pidff_set_effect[] = {
> »···0x22, 0x50, 0x52, 0x53, 0x54, 0x56, 0xa7
> };
>
> but the device does not send it (I attached the descriptor from the device),
> hence the driver complains about the unknown set_effect layout.
> Now the thing is they tried adding the field, but in that case the Windows HID
> driver will not recognize the device properly anymore as for some reason it
> expects that field not to be set.
>
> With that knowledge I tried again with the field 0xa7 removed (and some other
> references to start delay) and in that case the device was recognized properly
> and I could run some FFB tests successfully.
> There was a warning about an unknown condition effect layout (as there are 2
> missing fields in that one as well), but that should be a minor thing for the
> moment.
>
> I suspect that just removing the 0xa7 field (as I did) is not a proper
> solution here, but is there an easy way to get this working with a bit of
> special handling?
>
> Best Regards,
> Bernd
Hi,
I would catch up on this. Removing the field 0xA7 as well as some references
fixes the issue. I wrote a patch to test that (see attachment) and with that
applied the FFB works fine on the device.
Now I guess just shipping this patch with the default Linux kernel isn't the way
to go, but due to my limited knowledge of writing C code, I don't think I can
write a special driver myself.
Any suggestions on how to properly handle such a case?
GD could in principle provide me with a firmware for the device that adds the
field 0xA7 and therefore would work with the default pidff driver code, but then
it would not work on Windows anymore with the default HID driver on Windows.
(They tried that.)
However, switching firmwares to be able to use it on different operating systems
shouldn't be necessary, right?
Kind Regards,
Bernd
[-- Attachment #2: sc1-ffb.diff --]
[-- Type: text/x-patch, Size: 1685 bytes --]
diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c
index fddac7c72f64..8684808c5967 100644
--- a/drivers/hid/usbhid/hid-pidff.c
+++ b/drivers/hid/usbhid/hid-pidff.c
@@ -57,9 +57,8 @@ the only field in that report */
#define PID_TRIGGER_BUTTON 3
#define PID_TRIGGER_REPEAT_INT 4
#define PID_DIRECTION_ENABLE 5
-#define PID_START_DELAY 6
static const u8 pidff_set_effect[] = {
- 0x22, 0x50, 0x52, 0x53, 0x54, 0x56, 0xa7
+ 0x22, 0x50, 0x52, 0x53, 0x54, 0x56
};
#define PID_ATTACK_LEVEL 1
@@ -311,7 +310,6 @@ static void pidff_set_effect_report(struct pidff_device *pidff,
pidff->effect_direction->value[0] =
pidff_rescale(effect->direction, 0xffff,
pidff->effect_direction);
- pidff->set_effect[PID_START_DELAY].value[0] = effect->replay.delay;
hid_hw_request(pidff->hid, pidff->reports[PID_SET_EFFECT],
HID_REQ_SET_REPORT);
@@ -326,8 +324,7 @@ static int pidff_needs_set_effect(struct ff_effect *effect,
return effect->replay.length != old->replay.length ||
effect->trigger.interval != old->trigger.interval ||
effect->trigger.button != old->trigger.button ||
- effect->direction != old->direction ||
- effect->replay.delay != old->replay.delay;
+ effect->direction != old->direction;
}
/*
@@ -736,7 +733,6 @@ static void pidff_autocenter(struct pidff_device *pidff, u16 magnitude)
pidff->set_effect[PID_TRIGGER_REPEAT_INT].value[0] = 0;
pidff_set(&pidff->set_effect[PID_GAIN], magnitude);
pidff->set_effect[PID_DIRECTION_ENABLE].value[0] = 1;
- pidff->set_effect[PID_START_DELAY].value[0] = 0;
hid_hw_request(pidff->hid, pidff->reports[PID_SET_EFFECT],
HID_REQ_SET_REPORT);
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: Force Feedback support not recognized on Granite Devices Simucube
2019-06-17 10:57 ` Oliver Neukum
@ 2019-06-17 11:36 ` Bernd Steinhauser
0 siblings, 0 replies; 6+ messages in thread
From: Bernd Steinhauser @ 2019-06-17 11:36 UTC (permalink / raw)
To: Oliver Neukum; +Cc: linux-usb, linux-input
On 17/06/19 12:57, Oliver Neukum wrote:
> Am Montag, den 17.06.2019, 12:35 +0200 schrieb Bernd Steinhauser:
>> The device advertises as MCS, Granite Devices SimuCUBE with id 16d0:0d5a, I'll attach lsusb output.
>> Upon connection, the device is recognized and the output is:
>>
>> [ 3271.812807] usb 1-2.4.2: new full-speed USB device number 10 using xhci_hcd
>> [ 3271.921182] usb 1-2.4.2: New USB device found, idVendor=16d0, idProduct=0d5a, bcdDevice= 2.00
>> [ 3271.921184] usb 1-2.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
>> [ 3271.921185] usb 1-2.4.2: Product: SimuCUBE
>> [ 3271.921186] usb 1-2.4.2: Manufacturer: Granite Devices
>> [ 3271.921187] usb 1-2.4.2: SerialNumber: 0123456789
>> [ 3281.943990] input: Granite Devices SimuCUBE as /devices/pci0000:00/0000:00:09.0/0000:04:00.0/usb1/1-2/1-2.4/1-2.4.2/1-2.4.2:1.0/0003:16D0:0D5A.0016/input/input48
>> [ 3281.944223] hid-generic 0003:16D0:0D5A.0016: unknown set_effect report layout
>> [ 3281.944228] hid-generic 0003:16D0:0D5A.0016: input,hiddev2,hidraw15: USB HID v1.11 Joystick [Granite Devices SimuCUBE] on usb-0000:04:00.0-2.4.2/input0
>>
>> I spent some time looking at the code and also other ffb code in usbhid, but since I'm not really familiar with C I have a hard time figuring out why it doesn't work out of the box and how to fix this, but I'd be happy to help implementing/debugging it.
>> For a start, it would be really nice to find out what is reported, what the report should look like and why it doesn't match.
> Hi,
>
> 1. this eport is more appropriate for linux-input. You should put it
> into CC
Greg told me to write to this list, but I'll CC them.
> 3. Your lsusb is incomplete (likely you need to run it as root), so
> nobody can say what's wrong with your descriptors.
I ran the command (lsusb -v -s 003:010) again as root, but the output remains
the same, especially the messages
can't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
remain.
Kind Regards,
Bernd
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Force Feedback support not recognized on Granite Devices Simucube
2019-06-17 10:35 Bernd Steinhauser
@ 2019-06-17 10:57 ` Oliver Neukum
2019-06-17 11:36 ` Bernd Steinhauser
0 siblings, 1 reply; 6+ messages in thread
From: Oliver Neukum @ 2019-06-17 10:57 UTC (permalink / raw)
To: linux-ml, linux-usb
Am Montag, den 17.06.2019, 12:35 +0200 schrieb Bernd Steinhauser:
>
> The device advertises as MCS, Granite Devices SimuCUBE with id 16d0:0d5a, I'll attach lsusb output.
> Upon connection, the device is recognized and the output is:
>
> [ 3271.812807] usb 1-2.4.2: new full-speed USB device number 10 using xhci_hcd
> [ 3271.921182] usb 1-2.4.2: New USB device found, idVendor=16d0, idProduct=0d5a, bcdDevice= 2.00
> [ 3271.921184] usb 1-2.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> [ 3271.921185] usb 1-2.4.2: Product: SimuCUBE
> [ 3271.921186] usb 1-2.4.2: Manufacturer: Granite Devices
> [ 3271.921187] usb 1-2.4.2: SerialNumber: 0123456789
> [ 3281.943990] input: Granite Devices SimuCUBE as /devices/pci0000:00/0000:00:09.0/0000:04:00.0/usb1/1-2/1-2.4/1-2.4.2/1-2.4.2:1.0/0003:16D0:0D5A.0016/input/input48
> [ 3281.944223] hid-generic 0003:16D0:0D5A.0016: unknown set_effect report layout
> [ 3281.944228] hid-generic 0003:16D0:0D5A.0016: input,hiddev2,hidraw15: USB HID v1.11 Joystick [Granite Devices SimuCUBE] on usb-0000:04:00.0-2.4.2/input0
>
> I spent some time looking at the code and also other ffb code in usbhid, but since I'm not really familiar with C I have a hard time figuring out why it doesn't work out of the box and how to fix this, but I'd be happy to help implementing/debugging it.
> For a start, it would be really nice to find out what is reported, what the report should look like and why it doesn't match.
Hi,
1. this eport is more appropriate for linux-input. You should put it
into CC
2. You indeed triggered this check:
/*
* Fill and check the pidff_usages
*/
static int pidff_init_fields(struct pidff_device *pidff, struct input_dev *dev)
{
int envelope_ok = 0;
if (PIDFF_FIND_FIELDS(set_effect, PID_SET_EFFECT, 1)) {
hid_err(pidff->hid, "unknown set_effect report layout\n");
return -ENODEV;
}
3. Your lsusb is incomplete (likely you need to run it as root), so
nobody can say what's wrong with your descriptors.
HTH
Oliver
^ permalink raw reply [flat|nested] 6+ messages in thread
* Force Feedback support not recognized on Granite Devices Simucube
@ 2019-06-17 10:35 Bernd Steinhauser
2019-06-17 10:57 ` Oliver Neukum
0 siblings, 1 reply; 6+ messages in thread
From: Bernd Steinhauser @ 2019-06-17 10:35 UTC (permalink / raw)
To: linux-usb
[-- Attachment #1: Type: text/plain, Size: 2129 bytes --]
Hi,
I own a Granite Devices Simucube force feedback wheel which I'd like to get working under Linux.
The current status is that if I use a tool to check/test the FFB, it tells me that the device does not support FFB.
I'm also using the device under Windows 7 and there it works without any special driver, so it should work with USB HID FFB.
In principle, it supports the following effects (see link below):
- constant force
- friction
- damping
- spring
- sine wave
- square wave
- sawtooth
- triangle
The device advertises as MCS, Granite Devices SimuCUBE with id 16d0:0d5a, I'll attach lsusb output.
Upon connection, the device is recognized and the output is:
[ 3271.812807] usb 1-2.4.2: new full-speed USB device number 10 using xhci_hcd
[ 3271.921182] usb 1-2.4.2: New USB device found, idVendor=16d0, idProduct=0d5a, bcdDevice= 2.00
[ 3271.921184] usb 1-2.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3271.921185] usb 1-2.4.2: Product: SimuCUBE
[ 3271.921186] usb 1-2.4.2: Manufacturer: Granite Devices
[ 3271.921187] usb 1-2.4.2: SerialNumber: 0123456789
[ 3281.943990] input: Granite Devices SimuCUBE as /devices/pci0000:00/0000:00:09.0/0000:04:00.0/usb1/1-2/1-2.4/1-2.4.2/1-2.4.2:1.0/0003:16D0:0D5A.0016/input/input48
[ 3281.944223] hid-generic 0003:16D0:0D5A.0016: unknown set_effect report layout
[ 3281.944228] hid-generic 0003:16D0:0D5A.0016: input,hiddev2,hidraw15: USB HID v1.11 Joystick [Granite Devices SimuCUBE] on usb-0000:04:00.0-2.4.2/input0
I spent some time looking at the code and also other ffb code in usbhid, but since I'm not really familiar with C I have a hard time figuring out why it doesn't work out of the box and how to fix this, but I'd be happy to help implementing/debugging it.
For a start, it would be really nice to find out what is reported, what the report should look like and why it doesn't match.
Kind Regards,
Bernd
Links that might or might not be useful for general information:
https://granitedevices.com/wiki/SimuCUBE_technical_specifications
https://granitedevices.com/wiki/SimuCUBE_Firmware_User_Guide#DirectInput_Effect_Settings_and_Descriptions
[-- Attachment #2: lsusb-v.txt --]
[-- Type: text/plain, Size: 2406 bytes --]
Bus 001 Device 010: ID 16d0:0d5a MCS
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x16d0 MCS
idProduct 0x0d5a
bcdDevice 2.00
iManufacturer 1 Granite Devices
iProduct 2 SimuCUBE
iSerial 3 0123456789
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0029
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 1465
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 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
can't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
Device Status: 0x0001
Self Powered
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-06-26 10:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-17 11:46 Force Feedback support not recognized on Granite Devices Simucube Bernd Steinhauser
2020-02-05 18:54 ` Bernd Steinhauser
2022-06-26 9:59 ` Bernd Steinhauser
-- strict thread matches above, loose matches on Subject: below --
2019-06-17 10:35 Bernd Steinhauser
2019-06-17 10:57 ` Oliver Neukum
2019-06-17 11:36 ` Bernd Steinhauser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).