* Re: Improving drivers for Logitech Driving Force Pro and G25 wheels @ 2008-03-14 19:52 chris guirl [not found] ` <6b33c0ac0803172128p1d291a83w1bb8c3788a9e0ba0@mail.gmail.com> 0 siblings, 1 reply; 3+ messages in thread From: chris guirl @ 2008-03-14 19:52 UTC (permalink / raw) To: linux-input On Fri, Mar 14, 2008 at 5:42 AM, Jiri Kosina <jkosina@suse.cz> wrote: > thanks for your mail, I have added Jean-Philippe to CC, who has sent me > some time ago debugging information for this wheel, but I unfortunately > didn't yet had time to look into that in more detail. Which wheel, the DFP or the G25? Either way they are similar in many ways so better support for one would improve support for the other. I'm interested to see this information. There has been some discussion of the G25 on the forums at vdrift.net. > Regarding the HID code -- currently, all device-specific stuff for HID > devices is implemented as quirks in hid code -- please see > drivers/hid/hid-*quirks* and drivers/hid/usbhid/hid-quirks*. This is not a > solution that works well in long-term though, and Jiri Slaby (also added > to CC) is currently rewriting the HID core code, so that it will work as a > proper bus, so individual drivers could work nicely with that. Once this > is done, all the current quirks will be converted to HID-bus drivers. I've looked through the quirks code and I have some suggestions for things that can be changed. First, the Vendor/product IDs of the wheels are not present. When the devices power up they assume VID:PID 0x046d:0xc294 which there is a line for in drivers/hid/usbhid/hid-quirks.c: #define USB_DEVICE_ID_LOGITECH_WHEEL 0xc294 This is used by the Logitech Formula Force or Driving Force wheel, and a legacy mode on the DFP & G25. To use the DFP or G25 in their native modes, they must be sent a command [0xf8, 0x01] or [0xf8, 0x10] respectively. Once these wheels receive this command, they simulate a detach and reattach as 0x046d:0xc298 and 0x046d:0xc299 respectively. These VID:PID combinations are not handled in the kernel at all. At the very least they need to be assigned the same quirks as the Driving Force. When a Driving Force/Formula Force wheel is detected the device needs to be probed with the native mode commands to see if it will switch into DFP or G25 mode. If these modes work, then it is possible to send the wheels some other commands to enable full rotation of the wheel. By default only 200 degrees of rotation is available, but both the DFP and G25 can be switched to allow up to 900 degrees of rotation. I think there should be a user-land tool to change settings on the wheel such as this. > Depends on how massive your changes are going to be, you could either > coordinate with Jiri so that no effort is wasted, or you can just send me > a patch with simple quirks addition, and it will get converted into hidbus > driver later. If there is a rewrite due then it may be best to work with Jiri so I can make my changes work with his, no sense in patching twice. In addition to HID code, I think I'll need to make some changes to the joydev driver, as some other things need to be addressed (such as splitting the gas and brake axis up into separate, independent axes). Currently I am able to send raw commands to my DFP to make it change modes, but the /dev/input/jsX device disappears when I do this, so some other tweaks may be needed on the joystick end of things. I'll be out of town this weekend so not working on anything yet, but please send any ideas along as I hope to get started next week. Thanks. Chris ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <6b33c0ac0803172128p1d291a83w1bb8c3788a9e0ba0@mail.gmail.com>]
* Fwd: Improving drivers for Logitech Driving Force Pro and G25 wheels [not found] ` <6b33c0ac0803172128p1d291a83w1bb8c3788a9e0ba0@mail.gmail.com> @ 2008-03-18 4:30 ` Richie Ward 2008-03-19 17:43 ` chris guirl 0 siblings, 1 reply; 3+ messages in thread From: Richie Ward @ 2008-03-18 4:30 UTC (permalink / raw) To: linux-input I own a G25, Can you write out some of the knowledge you have acquired? On Fri, Mar 14, 2008 at 7:52 PM, chris guirl <thelusiv@gmail.com> wrote: > On Fri, Mar 14, 2008 at 5:42 AM, Jiri Kosina <jkosina@suse.cz> wrote: > > thanks for your mail, I have added Jean-Philippe to CC, who has sent me > > some time ago debugging information for this wheel, but I unfortunately > > didn't yet had time to look into that in more detail. > > Which wheel, the DFP or the G25? Either way they are similar in many > ways so better support for one would improve support for the other. > I'm interested to see this information. There has been some discussion > of the G25 on the forums at vdrift.net. > > > Regarding the HID code -- currently, all device-specific stuff for HID > > devices is implemented as quirks in hid code -- please see > > drivers/hid/hid-*quirks* and drivers/hid/usbhid/hid-quirks*. This is not a > > solution that works well in long-term though, and Jiri Slaby (also added > > to CC) is currently rewriting the HID core code, so that it will work as a > > proper bus, so individual drivers could work nicely with that. Once this > > is done, all the current quirks will be converted to HID-bus drivers. > > I've looked through the quirks code and I have some suggestions for > things that can be changed. First, the Vendor/product IDs of the > wheels are not present. When the devices power up they assume VID:PID > 0x046d:0xc294 which there is a line for in > drivers/hid/usbhid/hid-quirks.c: > > #define USB_DEVICE_ID_LOGITECH_WHEEL 0xc294 > > This is used by the Logitech Formula Force or Driving Force wheel, and > a legacy mode on the DFP & G25. To use the DFP or G25 in their native > modes, they must be sent a command [0xf8, 0x01] or [0xf8, 0x10] > respectively. Once these wheels receive this command, they simulate a > detach and reattach as 0x046d:0xc298 and 0x046d:0xc299 respectively. > These VID:PID combinations are not handled in the kernel at all. At > the very least they need to be assigned the same quirks as the Driving > Force. > > When a Driving Force/Formula Force wheel is detected the device needs > to be probed with the native mode commands to see if it will switch > into DFP or G25 mode. If these modes work, then it is possible to send > the wheels some other commands to enable full rotation of the wheel. > By default only 200 degrees of rotation is available, but both the DFP > and G25 can be switched to allow up to 900 degrees of rotation. I > think there should be a user-land tool to change settings on the wheel > such as this. > > > Depends on how massive your changes are going to be, you could either > > coordinate with Jiri so that no effort is wasted, or you can just send me > > a patch with simple quirks addition, and it will get converted into hidbus > > driver later. > > If there is a rewrite due then it may be best to work with Jiri so I > can make my changes work with his, no sense in patching twice. > > In addition to HID code, I think I'll need to make some changes to the > joydev driver, as some other things need to be addressed (such as > splitting the gas and brake axis up into separate, independent axes). > Currently I am able to send raw commands to my DFP to make it change > modes, but the /dev/input/jsX device disappears when I do this, so > some other tweaks may be needed on the joystick end of things. > > I'll be out of town this weekend so not working on anything yet, but > please send any ideas along as I hope to get started next week. > Thanks. > > Chris > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-input" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- Thanks, Richie Ward -- Thanks, Richie Ward ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Improving drivers for Logitech Driving Force Pro and G25 wheels 2008-03-18 4:30 ` Fwd: " Richie Ward @ 2008-03-19 17:43 ` chris guirl 0 siblings, 0 replies; 3+ messages in thread From: chris guirl @ 2008-03-19 17:43 UTC (permalink / raw) To: Richie Ward; +Cc: linux-input On Tue, Mar 18, 2008 at 12:30 AM, Richie Ward <richies@gmail.com> wrote: > I own a G25, Can you write out some of the knowledge you have acquired? First off a little info on the G25, and how it works on Windows (for those unfamiliar). The device allows up to 900 degrees of wheel rotation (with force feedback), it has a "H" style shifter, and it has three foot pedals (gas, brake and clutch). It has a total of six axes and nineteen buttons. How many axes/buttons are reported depends on what mode the wheel is in. It also has other settings like the limits of wheel rotation. The wheel can be set to only be allowed to turn as little as 40 degrees. On Windows, Logitech Profiler allows the user to change the wheel rotation range, along with other settings. When the wheel starts up, the Logitech drivers on Windows send a command to the device to put it into its native mode, so that all the axes/buttons are present. In Linux, when the wheel starts up, it is in legacy mode, and only four axes and twelve buttons are available. I believe this causes the clutch and shifter to not work as well, if I understand correctly. Also, the device is limited to its default wheel rotation range of 200 degrees, and the user-oriented tools to change wheel settings do not exist in Linux. Another thing missing from all the steering wheel drivers for Linux is the ability to separate the pedal axes. Basically, most steering wheels act by default as a generic HID joystick device with two axes, to ensure backwards-compatibility with games that only support joysticks with two axes. These two axes are the steering axis, and a combined brake/gas axis. When the two pedal axes are combined as one, the pedals do not act quite normally. When the brake is pressed by itself, the combined axis goes negative; while the gas is pressed by itself, the combined axis goes positive. When both pedals are pressed simultaneously they cancel each other out. To fix this, the Linux steering wheel drivers need to be able to change from combined to separated pedal axes with a user-controllable tool similar to the Logitech Profiler in Windows. For Logitech devices, the raw pedal data is available as a USB stream unreported when acting as a standard HID device. Through a contact at Logitech I have been given the information to fix the deficiencies in the current Linux steering wheel drivers as outlined above. I have posted a lot of this information already on the message boards at VDrift.net. This thread [1] contains a Python tool to send some commands to the DFP/G25. It was made for the G25 and apparently works well for it, but this and other functionality needs to be added to the kernel driver. It doesn't quite work for the DFP in my experience because of some other issues (see my previous posts). Much of the information I obtained was posted here [2]. I have some other details and tidbits that might be useful. There are some other threads on the VDrift forums with a good bit of information on the force-feedback and other details for the G25 and other wheels, I'll be happy to link it if anyone's interested. I haven't had much time lately to start hacking on this, but hopefully I will by this weekend at the latest. Chris [1] http://vdrift.net/Forum/viewtopic.php?t=866 [2] http://vdrift.net/Forum/viewtopic.php?p=7755#7755 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-03-19 19:36 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-03-14 19:52 Improving drivers for Logitech Driving Force Pro and G25 wheels chris guirl [not found] ` <6b33c0ac0803172128p1d291a83w1bb8c3788a9e0ba0@mail.gmail.com> 2008-03-18 4:30 ` Fwd: " Richie Ward 2008-03-19 17:43 ` chris guirl
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).