Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hardware: simple utility for send hex commands to usb device
03-14-2008, 02:43 AM,
#12
 
Finally, I have made some progress getting my Logitech Driving Force Pro wheel working on Linux. I found this information from a contact at Logitech who has requested to remain unnamed. He has disclosed to me some information regarding the Logitech Driving Force Pro and G25 steering wheels.

First off, the DFP and G25 identify themselves as USB VenderID/ProductID 0x046d:0xc294 when they are first plugged in. This is the ID of the original Driving Force or Formula Force wheel, and when identifying as this ID the wheels are in a backwards compatible legacy mode, essentially emulating the DF. In order to use all of the features in the DFP and G25 they must be sent a command to switch them to their native mode. The command for DFP native mode is [0xf8, 0x01], and the command for G25 native mode is [0xf8, 0x10]. The G25 can also operate in DFP legacy mode using the DFP native mode command.

Once sent this native mode command the wheels can be sent other commands to change features such as wheel axis range. The DFP takes two commands for range switching. [0xf8, 0x02] switches the wheel to 200 degree mode, and [0xf8, 0x03] switches the wheel to 900 degree mode. The G25 also accepts these commands with similar results. Note: actually, I have found that at least in the case of the DFP, it will accept the range commands before being set into native mode.

The G25 also accepts the range setting mechanism I was trying to reverse engineer in the post above. The command is actually formulated like:
Code:
int16_t range = 900  // 16-bit integer representing degrees to set range to
command = [0xf8, 0x81, range & 0x00ff, range & 0xff00, 0, 0, 0]

Now here's a bit of confusion. The Logitech Windows drivers and Profiler accept this command for the DFP and translate it into the regular DFP commands and sets 200 or 900 mode. This makes it seem that the DFP firmware accepts the G25 commands, which it does not. This is all the traffic seen, however, when using USB Snoop[y] on Windows with the DFP. To get around this, one must use regedit to change a value in the Windows registry at:
Code:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Enum\USB\Vid_046d&Pid_c298\*
Once this is located you must assign rights to your user to those nodes, then edit the "LowerFilters" key in each of the nodes. Where you see "WmHidLo usbsnoop" or "wmhidlo usbsnoop", reverse the order so that usbsnoop comes first. Now the output of USB Snoop[y] will show the actual commands sent across the bus to the DFP instead of just what the Logitech drivers "allow" to be seen.

Back to the topic of the DFP, I have tested out setting the wheel in 900 degree mode on Linux. First off, as I posted above I never could get avl's usb tool to work for my wheel. I finally figured out that if I plugged the wheel directly into one of the USB ports on my computer instead of the USB hub on my monitor, the "usbtool" program worked just fine. Once I figured this out, I was able to successfully send it commands to switch to native mode, 200 degree mode and 900 degree mode.

When the wheel is plugged in, a device /dev/input/js1 is created (js0 is my gamepad). When I send it any command, this device disappears. I thought at first this was because of the switch to native mode; that since the device simulates a USB unplug/replug and shows up as a different device ID not supported by the joydev driver, it does not recreate the js1 device. However, the js1 device also disappears if I only send it the [0xf8, 0x03] command to switch to 900 degree mode (which seems to work even if not in native mode).

Clearly, some changes need to be made to the Linux joystick driver to properly support the DFP and G25. In addition to the above mentioned problem of the disappearing joystick device, in order to change from a combined gas/brake axis to separated independent gas/brake axes, the driver must add "virtual axes", this is not provided by the wheel devices' firmware at all.

I'll be contacting the linux-input folks with this information soon and hopefully some progress can be made towards better support for the DFP and G25 in Linux. After consulting them for direction I hope to work on a patch and some user-land tools to easily change settings on the wheels.
Reply


Messages In This Thread
[No subject] - by thelusiv - 12-30-2007, 05:05 AM
[No subject] - by avl - 12-30-2007, 06:14 AM
[No subject] - by thelusiv - 12-30-2007, 06:36 AM
[No subject] - by avl - 12-30-2007, 08:05 AM
[No subject] - by thelusiv - 12-31-2007, 08:14 AM
[No subject] - by avl - 12-31-2007, 08:44 AM
[No subject] - by thelusiv - 01-03-2008, 06:19 PM
[No subject] - by thelusiv - 02-09-2008, 05:58 AM
[No subject] - by thelusiv - 02-21-2008, 02:50 AM
[No subject] - by thelusiv - 02-21-2008, 04:29 AM
[No subject] - by thelusiv - 03-14-2008, 02:43 AM
[No subject] - by rm - 03-17-2008, 12:43 PM
[No subject] - by thelusiv - 03-17-2008, 01:12 PM
[No subject] - by rm - 03-17-2008, 02:03 PM
[No subject] - by thelusiv - 03-17-2008, 02:36 PM
[No subject] - by rm - 03-17-2008, 03:15 PM
[No subject] - by thelusiv - 03-17-2008, 06:10 PM
/dev/js0 disappeared - by tof8pool - 04-21-2008, 12:29 PM
[No subject] - by joevenzon_phpbb2_import3 - 09-28-2008, 08:02 PM
[No subject] - by bunder - 10-11-2008, 07:08 PM
[No subject] - by tof8pool - 10-12-2008, 05:47 AM
[No subject] - by bunder - 10-12-2008, 08:20 AM
[No subject] - by Rich43 - 10-18-2008, 10:41 PM
[No subject] - by bunder - 10-19-2008, 06:01 AM
[No subject] - by Rich43 - 10-19-2008, 03:32 PM
[No subject] - by tof8pool - 10-20-2008, 01:58 AM
[No subject] - by Rich43 - 10-20-2008, 11:32 AM
[No subject] - by tof8pool - 10-20-2008, 01:10 PM
[No subject] - by Rich43 - 10-21-2008, 03:22 PM
[No subject] - by Rich43 - 10-21-2008, 03:53 PM
[No subject] - by tof8pool - 10-22-2008, 02:10 AM
[No subject] - by Rich43 - 10-25-2008, 08:58 PM
[No subject] - by tof8pool - 10-26-2008, 01:16 PM
[No subject] - by joevenzon_phpbb2_import3 - 10-27-2008, 10:43 PM
[No subject] - by eXSs - 10-28-2008, 09:03 AM
[No subject] - by tof8pool - 11-02-2008, 06:09 AM
[No subject] - by cgaudry - 12-22-2008, 05:40 PM
[No subject] - by Simey - 03-11-2009, 06:50 AM
[No subject] - by joevenzon_phpbb2_import3 - 05-01-2009, 07:59 PM
[No subject] - by thelusiv - 05-01-2009, 08:21 PM
[No subject] - by cgaudry - 11-05-2009, 02:41 PM
[No subject] - by joevenzon_phpbb2_import3 - 11-06-2009, 01:51 AM
[No subject] - by cgaudry - 11-07-2009, 07:12 AM
[No subject] - by cgaudry - 11-13-2009, 04:02 PM
[No subject] - by joevenzon_phpbb2_import3 - 11-16-2009, 11:44 PM
[No subject] - by bopApocalypse - 11-17-2009, 11:53 PM
Automatic G25 recognition - by IvanVimes - 11-30-2009, 10:09 AM
[No subject] - by joevenzon_phpbb2_import3 - 12-01-2009, 12:06 AM
G25 udev rules - by tof8pool - 03-21-2010, 11:26 AM
[No subject] - by Blackylol - 05-10-2010, 04:53 PM
[No subject] - by joevenzon_phpbb2_import3 - 05-10-2010, 10:25 PM
[No subject] - by Metaphysicist - 11-22-2010, 04:21 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)