[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <01b66305-4dc2-3825-eb59-c0882b662bab@infradead.org>
Date: Sat, 2 Jul 2022 22:11:35 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: Greg T <greg.iforce@...il.com>, linux-kernel@...r.kernel.org
Cc: linux-input@...r.kernel.org,
Dmitry Torokhov <dmitry.torokhov@...il.com>
Subject: Re: |Question] iforce Boeder Force Feedback Wheel
[add INPUT]
On 7/1/22 03:39, Greg T wrote:
> 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.
--
~Randy
Powered by blists - more mailing lists