mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* |Question] iforce Boeder Force Feedback Wheel
@ 2022-07-01 10:39 Greg T
  2022-07-03  5:11 ` Randy Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Greg T @ 2022-07-01 10:39 UTC (permalink / raw)
  To: linux-kernel

I'm trying to make a Boeder Force Feedback Wheel work using its serial 
interface (/dev/ttyS0).

1. As iforce-main.c identifies it as "Unknown I-Force Device 
[%04x:%04x]", I think those placeholders should be replaced by vendor 
and product ids, but aren't.

2. Here's a patch to make it recognized:

--- drivers/input/joystick/iforce/iforce-main.c.orig	2022-06-14 19:21:30.000000000 +0200
+++ drivers/input/joystick/iforce/iforce-main.c	2022-06-30 18:52:38.022039742 +0200
@@ -50,6 +50,7 @@
 	{ 0x046d, 0xc291, "Logitech WingMan Formula Force",		btn_wheel, abs_wheel, ff_iforce },
 	{ 0x05ef, 0x020a, "AVB Top Shot Pegasus",			btn_joystick_avb, abs_avb_pegasus, ff_iforce },
 	{ 0x05ef, 0x8884, "AVB Mag Turbo Force",			btn_wheel, abs_wheel, ff_iforce },
+	{ 0x05ef, 0x8886, "Boeder Force Feedback Wheel",		btn_wheel, abs_wheel, ff_iforce },
 	{ 0x05ef, 0x8888, "AVB Top Shot Force Feedback Racing Wheel",	btn_wheel, abs_wheel, ff_iforce }, //?
 	{ 0x061c, 0xc0a4, "ACT LABS Force RS",                          btn_wheel, abs_wheel, ff_iforce }, //?
 	{ 0x061c, 0xc084, "ACT LABS Force RS",				btn_wheel, abs_wheel, ff_iforce },

3. There's a problem that the GAS and BRAKE values (in jstest) start 
from -32767, not 0, and it causes menus in games like RVGL to 
malfunction and you have to press the pedal halfway while using a 
menu with keyboard as a really unpleasant workaround.
The below patches eliminate that problem, but I'm not sure if it's a 
kernel or user space problem or just my ignorance. (With its Windows 
9x driver, by default, both pedals are on the Y-axis, but move away 
from 0 in the opposite directions.)

--- drivers/input/joystick/iforce/iforce-main.c.orig	2022-06-14 19:21:30.000000000 +0200
+++ drivers/input/joystick/iforce/iforce-main.c	2022-07-01 09:49:58.344970061 +0200
@@ -350,7 +351,7 @@
 		case ABS_THROTTLE:
 		case ABS_GAS:
 		case ABS_BRAKE:
-			input_set_abs_params(input_dev, t, 0, 255, 0, 0);
+			input_set_abs_params(input_dev, t, 0, 511, 0, 0);
 			break;
 
 		case ABS_RUDDER:

--- drivers/input/joystick/iforce/iforce-packets.c.orig	2022-06-14 19:21:30.000000000 +0200
+++ drivers/input/joystick/iforce/iforce-packets.c	2022-07-01 09:58:10.061354919 +0200
@@ -178,8 +178,8 @@
 	case 0x03:	/* wheel position data */
 		input_report_abs(dev, ABS_WHEEL,
 				 (__s16) get_unaligned_le16(data));
-		input_report_abs(dev, ABS_GAS,   255 - data[2]);
-		input_report_abs(dev, ABS_BRAKE, 255 - data[3]);
+		input_report_abs(dev, ABS_GAS,   510 - data[2]);
+		input_report_abs(dev, ABS_BRAKE, 510 - data[3]);
 
 		iforce_report_hats_buttons(iforce, data);
 
4. Force feedback seems to work from fftest (at least some of the 
functions), but when using ff in RVGL or VDrift, the system freezes 
and I can't find anything related in journalctl after hard resetting. 
How should I debug this problem?

It's on Fedora release 34. Kernel/iforce source is from 
https://gitlab.com/cki-project/kernel-ark/-/tree/fedora-5.17/drivers/input/joystick/iforce
and the kernel-devel-5.17.12-100.fc34.x86_64 package.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-04 18:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-01 10:39 |Question] iforce Boeder Force Feedback Wheel Greg T
2022-07-03  5:11 ` Randy Dunlap
2022-07-04  2:19   ` Greg T
2022-07-04 18:41     ` Greg T

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®