Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hardware: simple utility for send hex commands to usb device
09-27-2008, 01:22 PM,
#21
G25 all axes / buttons AND force feedback
Here is my experience and some little tricks.

First of all, I had to modify my kernel source code. I'm not a kernel developper, so I don't know If all the modification were needed.

All those modifications shouldn't break anything as they are only new declarations, no logic has been modified.
My kernel is a 2.6.25

In your /usr/src/linux/drivers/hid/hid-ff.c, add this line near line 60 :
{ 0x46d, 0xc299, hid_lgff_init }, /* Logitech G25 */
the file should look like this :
Quote:#ifdef CONFIG_LOGITECH_FF
{ 0x46d, 0xc211, hid_lgff_init }, /* Logitech Cordless rumble pad */
{ 0x46d, 0xc219, hid_lgff_init }, /* Logitech Cordless rumble pad 2 */
{ 0x46d, 0xc283, hid_lgff_init }, /* Logitech Wingman Force 3d */
{ 0x46d, 0xc286, hid_lgff_init }, /* Logitech Force 3D Pro Joystick */
{ 0x46d, 0xc294, hid_lgff_init }, /* Logitech Formula Force EX */
{ 0x46d, 0xc295, hid_lgff_init }, /* Logitech MOMO force wheel */
{ 0x46d, 0xc299, hid_lgff_init }, /* Logitech G25 */
{ 0x46d, 0xca03, hid_lgff_init }, /* Logitech MOMO force wheel */
#endif


In your /usr/src/linux/drivers/hid/hid-lgff.c, add this near line 58 :
{ 0x046d, 0xc299, ff_joystick },
the file should look like this :
Quote:static const struct dev_type devices[] = {
{ 0x046d, 0xc211, ff_rumble },
{ 0x046d, 0xc219, ff_rumble },
{ 0x046d, 0xc283, ff_joystick },
{ 0x046d, 0xc286, ff_joystick },
{ 0x046d, 0xc294, ff_joystick },
{ 0x046d, 0xc295, ff_joystick },
{ 0x046d, 0xc299, ff_joystick },
{ 0x046d, 0xca03, ff_joystick },
};


In your /usr/src/linux/drivers/hid/hid-quirks.c add this line near line 316 :
#define USB_DEVICE_ID_LOGITECH_WHEELG25 0xc299
and this line near line 608 :
{ USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WHEELG25, HID_QUIRK_NOGET },
the file should look like this:
Quote:#define USB_DEVICE_ID_LOGITECH_HARMONY_64 0xc14f
#define USB_DEVICE_ID_LOGITECH_EXTREME_3D 0xc215
#define USB_DEVICE_ID_LOGITECH_WHEEL 0xc294
#define USB_DEVICE_ID_LOGITECH_WHEELG25 0xc299
#define USB_DEVICE_ID_LOGITECH_ELITE_KBD 0xc30a
#define USB_DEVICE_ID_LOGITECH_KBD 0xc311
#define USB_DEVICE_ID_S510_RECEIVER 0xc50c
#define USB_DEVICE_ID_S510_RECEIVER_2 0xc517
#define USB_DEVICE_ID_LOGITECH_CORDLESS_DESKTOP_LX500 0xc512
and this :
Quote: { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVMC, HID_QUIRK_NOGET },
{ USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET },
{ USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_EXTREME_3D, HID_QUIRK_NOGET },
{ USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WHEEL, HID_QUIRK_NOGET },
{ USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WHEELG25, HID_QUIRK_NOGET },
{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0, HID_QUIRK_NOGET },
{ USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE, HID_QUIRK_NOGET },
{ USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET },
{ USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_TURBOX_KEYBOARD, HID_QUIRK_NOGET },
{ USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_DUAL_USB_JOYPAD, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },

Once your new kernel has been compiled and booted, we can play a little bit with udev to make it run the commands needed to have /dev/jsX recreated when using usbtool.

Create a file named /etc/udev/rules.d/99-G25.rules which content is :
Quote:KERNEL=="event*", MODE="660", GROUP="games"
BUS=="usb", SYSFS{product}=="G25 Racing Wheel", SYSFS{idVendor}=="046d", ACTION=="remove", RUN+="/etc/init.d/usbhid restart"
BUS=="usb", SYSFS{product}=="G25 Racing Wheel", SYSFS{idVendor}=="046d", ACTION=="add", RUN+="/etc/init.d/usbhid start"

then create a file named /etc/init.d/usbhid which content is :
Quote:#!/bin/sh
#

start() {
/sbin/modprobe usbhid
}

stop() {
/sbin/modprobe -r joydev usbhid
}

case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo "Usage: /etc/init.d/usbhid {start|stop|restart}"
exit 1
esac
At least run udevadm control --reload_rules

Now when U use usbtool to toggle your G25 wheel to extended mode, you should still have force feedback working and your /dev/jsX file should already have been recreated.

With those tips I'm able to drive in vdrift with all axes and force feedback.

Sorry, if some of my sentences are not very easy to understand, english is not my native language.
Hope this helps
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
G25 all axes / buttons AND force feedback - by tof8pool - 09-27-2008, 01:22 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)