|
From: <py...@lo...> - 2005-04-13 13:00:31
|
Hi,
I'm sorry for bothering You, I hope it is the right list. So fat I read mos=
t=20
of it's history, and I guess (almost) all of what is related to logitech=20
devices.
I have Logitech Wingman Force 3D and I'm interested in getting to know how =
to=20
use it in own programs, also I think I could help in driver and library=20
development. Earlier I thought I have problems making it work, since only=20
"constant force" in fftest was giving a (hardly) noticable effect. Correct =
me=20
if I'm wrong, but is it the only effect implemented for this joystick (at=20
least at the moment) ?
If it is not (and I have done something wrong), first of all, my system:
Linux gentoo using 2.6.11 kernel (gentoo-sources-2.6.11-r6 - it has later=20
patches - 2.6.11.x applied)
gcc 3.4.3-20050110 (Gentoo Linux 3.4.3.20050110-r2, ssp-3.4.3.20050110-0,=20
pie-8.7.7)
uname -mo
x86_64 GNU/Linux
(but have tried on x86 as well, same effect)
In the kernel I have:
#
# USB Input Devices
#
CONFIG_USB_HID=3Dy
CONFIG_USB_HIDINPUT=3Dy
CONFIG_HID_FF=3Dy
CONFIG_HID_PID=3Dy
CONFIG_LOGITECH_FF=3Dy
CONFIG_THRUSTMASTER_FF=3Dy
CONFIG_USB_HIDDEV=3Dy
# CONFIG_USB_AIPTEK is not set
# CONFIG_USB_WACOM is not set
# CONFIG_USB_KBTAB is not set
# CONFIG_USB_POWERMATE is not set
# CONFIG_USB_MTOUCH is not set
# CONFIG_USB_EGALAX is not set
# CONFIG_USB_XPAD is not set
# CONFIG_USB_ATI_REMOTE is not set
#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=3Dy
CONFIG_KEYBOARD_ATKBD=3Dy
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
# CONFIG_KEYBOARD_NEWTON is not set
CONFIG_INPUT_MOUSE=3Dy
CONFIG_MOUSE_PS2=3Dy
# CONFIG_MOUSE_SERIAL is not set
# CONFIG_MOUSE_VSXXXAA is not set
CONFIG_INPUT_JOYSTICK=3Dy
# CONFIG_JOYSTICK_ANALOG is not set
# CONFIG_JOYSTICK_A3D is not set
# CONFIG_JOYSTICK_ADI is not set
# CONFIG_JOYSTICK_COBRA is not set
# CONFIG_JOYSTICK_GF2K is not set
# CONFIG_JOYSTICK_GRIP is not set
# CONFIG_JOYSTICK_GRIP_MP is not set
# CONFIG_JOYSTICK_GUILLEMOT is not set
# CONFIG_JOYSTICK_INTERACT is not set
# CONFIG_JOYSTICK_SIDEWINDER is not set
# CONFIG_JOYSTICK_TMDC is not set
CONFIG_JOYSTICK_IFORCE=3Dm
CONFIG_JOYSTICK_IFORCE_USB=3Dy
# CONFIG_JOYSTICK_IFORCE_232 is not set
CONFIG_JOYSTICK_WARRIOR=3Dm
# CONFIG_JOYSTICK_MAGELLAN is not set
# CONFIG_JOYSTICK_SPACEORB is not set
# CONFIG_JOYSTICK_SPACEBALL is not set
# CONFIG_JOYSTICK_STINGER is not set
# CONFIG_JOYSTICK_TWIDDLER is not set
# CONFIG_JOYSTICK_DB9 is not set
# CONFIG_JOYSTICK_GAMECON is not set
# CONFIG_JOYSTICK_TURBOGRAFX is not set
# CONFIG_JOYSTICK_JOYDUMP is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
CONFIG_INPUT_MISC=3Dy
CONFIG_INPUT_PCSPKR=3Dm
# CONFIG_INPUT_UINPUT is not set
Whe I connect joystick dmesg shows:
usb 4-2: new low speed USB device using uhci_hcd and address 3
drivers/usb/input/hid-core.c: timeout initializing reports
=46orce feedback for Logitech force feedback devices by Johann Deneux=20
<joh...@it...>
input: USB HID v1.00 Joystick [Logitech Inc. WingMan Force 3D] on=20
usb-0000:00:10.2-2
I started learning how to communicate with the device, I have c++ class=20
"Joystick" written mostly using HID howto. For now it can only read positio=
n=20
from the device (periodicaly, in separate thread), output some information=
=20
about the device, set gain and autocenter - so it is very far from finished=
,=20
however when it will be closer to the desired result, I think it could be=20
some "beginning" for more universal library.
I would be interested in adding (or helping to add) better support for=20
Logitech Wingman Force 3D (since it is the device I have at the moment).=20
Do You have any suggestions for beginner (not in programming, but in revers=
e=20
engineering) on how to find joystick's abilities (and how to connect them t=
o=20
specific commands)
Below a little more detailed version of what I can see using ffutils.
=46irstly I tried to see if I'm using propper event device, evtest shows:
# evtest /dev/input/event4
Input driver version is 1.0.0
Input device ID: bus 0x3 vendor 0x46d product 0xc283 version 0x106
Input device name: "Logitech Inc. WingMan Force 3D"
Supported events:
Event type 0 (Reset)
Event code 0 (Reset)
Event code 1 (Key)
Event code 3 (Absolute)
Event code 4 (?)
Event code 21 (ForceFeedback)
Event type 1 (Key)
Event code 288 (Trigger)
Event code 289 (ThumbBtn)
Event code 290 (ThumbBtn2)
Event code 291 (TopBtn)
Event code 292 (TopBtn2)
Event code 293 (PinkieBtn)
Event code 294 (BaseBtn)
Event type 3 (Absolute)
Event code 0 (X)
Value 0
Min 0
Max 255
Flat 15
Event code 1 (Y)
Value 0
Min 0
Max 255
Flat 15
Event code 5 (Rz)
Value 0
Min 0
Max 255
Flat 15
Event code 6 (Throttle)
Value 0
Min 0
Max 255
Flat 15
Event code 16 (Hat0X)
Value 0
Min -1
Max 1
Event code 17 (Hat0Y)
Value 0
Min -1
Max 1
Event type 4 (?)
Event code 4 (?)
Event type 21 (ForceFeedback)
Event code 82 (?)
Testing ... (interrupt to exit)
Event: time 1113119732.721622, type 4 (?), code 4 (?), value 65584
Event: time 1113119732.721624, type 3 (Absolute), code 0 (X), value 120
Event: time 1113119732.721624, type 4 (?), code 4 (?), value 65585
Event: time 1113119732.721624, type 3 (Absolute), code 1 (Y), value 100
Event: time 1113119732.721625, type 4 (?), code 4 (?), value -16777215
Event: time 1113119732.721626, type 4 (?), code 4 (?), value 65593
Event: time 1113119732.721627, type 4 (?), code 4 (?), value 65589
Event: time 1113119732.721627, type 3 (Absolute), code 5 (Rz), value 123
Event: time 1113119732.721629, type 4 (?), code 4 (?), value 65590
Event: time 1113119732.721629, type 3 (Absolute), code 6 (Throttle), value =
93
Event: time 1113119732.721629, type 4 (?), code 4 (?), value -16777215
Event: time 1113119732.721630, type 0 (Reset), code 0 (Reset), value 0
Event: time 1113119732.729614, type 4 (?), code 4 (?), value 65585
Event: time 1113119732.729614, type 3 (Absolute), code 1 (Y), value 99
Event: time 1113119732.729616, type 0 (Reset), code 0 (Reset), value 0
Event: time 1113119732.737613, type 4 (?), code 4 (?), value 65589
Event: time 1113119732.737613, type 3 (Absolute), code 5 (Rz), value 124
Event: time 1113119732.737614, type 0 (Reset), code 0 (Reset), value 0
Event: time 1113119732.745610, type 4 (?), code 4 (?), value 65589
Event: time 1113119732.745611, type 3 (Absolute), code 5 (Rz), value 125
Event: time 1113119732.745612, type 0 (Reset), code 0 (Reset), value 0
so I guess it's ok, but than I tried fftest, what I see after running it
# fftest /dev/input/event4
=46orce feedback test program.
HOLD FIRMLY YOUR WHEEL OR JOYSTICK TO PREVENT DAMAGES
Device /dev/input/event4 opened
Axes query:
Effects: Constant
Number of simultaneous effects: 8
Upload effects[0]: Invalid argument
Upload effects[2]: Invalid argument
Upload effects[3]: Invalid argument
Upload effects[4]: Invalid argument
Upload effects[5]: Invalid argument
Enter effect number, -1 to exit
when I press 1, I get hardly noticable change in joystick force, but no oth=
er=20
numbers seem to work.=20
Thanks in advance,
Micha=B3
|