GAMEPAD problem
I hope someone at least can give me some tips what to do to make my USB gamepad get to life.
Ubuntu 8.04
Kernel Linux 2.6.24-16-rtai
Pentium 4, 2.4G
USB Gamepad - Logitech F310
I think I've read all I could find on the net related but not much of a help.
In general, when I plug in gamepad, I can see it in Device Manager (good that I've installed it, it is great help).
I've followed instruction to set it up manually:
cd /dev/input
sudo MAKEDEV js
sudo modprobe joydev (loaded different modules)
All I am trying to do is to use gamepad to run my desktop CNC finding that keyboard is not always the best for manual operation.
But I cannot get ANY signal from gamepad.
I know about small X-D switch on the back of gamepad. Only after few switching between X and D I get to see gamepad in device manager as
'POINTING DEVICE' , device file /dev/input/event4 - it changes from USB device to MOUSE
All other tests do not show any signal from gamepad. It works in WIndows, it is brand new.
I've used
jstest
cat
jscalibrator
evtest
od
evtest stops at line
Event type 4 (?)
Testing ... (interrupt to exit)
and it stays there
In jstest I see all axis and buttons but all is 0. Do not get any change when I move joysticks or buttons.
Also used halmeter, can see all pins, but no any change when I open any of pins (signals).
I know this is not enough information, but if anyone is willing and has knowledge I can show whatever is needed.
I am not versed in Linux, just using it to run EMC2 and was surprised to find out how difficult is to make something like gamepad to run.
thanks for reading
Please Log in or Create an account to join the conversation.
PNCconf is a configuration for linuxcnc for Mesa products but one one page is a joystick option.
In that option it helps to do the basic set up and testing to see if the joystick will work.
On the third page (External Controls) there is a n option USB joystick Jogging.
check it and click on details.
You'll see add device, test device and search for rules.
click add device rule follow the prompts
you have to remember the device name and type it in the device name prompt (usually one word will do but make sure its fairly unique)
then click test device
If all goes well a hameter dialog will open with a bunch of pins showing click one and the meter should change when you push the right button.
Then at least you know it does work!
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Rick G: I've read simple pendant and after basically forsing Gamepad to be recognized (sudo MAKEDEV js) and connecting and disconnecting gamepad and flipping back X-D switch several times I see controller icon changes in device manager so I know system can see it.
When I do LESS ..... (as shown in Simple Remote Pendant) I get a similar output:
I: Bus=0003 Vendor=046d Product=c216 Version=0111
N: Name="Logitech Logitech Dual Action"
P: Phys=usb-0000:00:0d.2-4.1/input0
S: Sysfs=/devices/pci0000:00/0000:00:0d.2/usb5/5-4/5-4.1/5-4.1:1.0/input/input8
U: Uniq=9CB7CB73
H: Handlers=event4 js0
B: EV=1b
B: KEY=fff 0 0 0 0 0 0 0 0 0
B: ABS=30027
B: MSC=10
As I've said I don't know Linux in depth to make much of use of all of those numbers.
It is certainly fun to learn but not much time.
To add to this - after me started playing with gamepad my mouse doesn't function properly. It looks like buttons got mixed. After I plug mouse in and out it works fine. So something is crossed here - similar thing with gamepad, to make it visible (properly) I have to plug it in, unplug, and change X-D switch few times.
This looks like something to be resolved at system level ...
And I still do net get any signal from gamepad - axis are all 0 and buttons do not change state ...
Please Log in or Create an account to join the conversation.
Did you see this at the bottom of the page?
If your system won't recognize the joypad you might have to look at hal_input man page and perhaps modify the permissions to access the device. Prepared a one line file as per the description in the man page.
SUBSYSTEM=="input", mode="0660", group="plugdev"
Name the file 51-plugdev.rules and save it in /etc/udev/rules.d
also
I believe as Chris stated PNCcnfg can create the rule for you.
Don't forget Halui
Rick G
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
PNCConf - is this available for 8.04? Couldn't find how to install.
hidcomp is ubuntu 10 -
Reluctant yet to upgrade to 10 -
Please Log in or Create an account to join the conversation.
John
Please Log in or Create an account to join the conversation.
Now I know I DO have output from gamepad (Logitech F310) since I can see it in
jstest
Again, having DEVICE MANAGER helps a lot since I can see gamepad there.
This time, device is shown as
Generix X-Box pad
and under properties I can see:
linux.device_file /dev/input/event5
Not 100% sure yet, but it made the difference at what USB connector I've connected gamepad. Again, not 100% sure that it matter.
Normally under windows, mode button, when pushed, would lit GREEN. This mode button is to swap hat and left joystick.
On other two PC (old ones) this LED would not always lit depending where I stick gampepad. Do not believe it has to do anything with power
consumption.
Now I got answer to my question how to install "Pncconf" - it comes with Live CD.
Now I am trying to add rule in udevs ...
Thanks again to all.
Once I finish, I'll try to submit for other Logitech users.
Please Log in or Create an account to join the conversation.
I don't think joydev is part of the solution.
The instructions in wiki.linuxcnc.org/cgi-bin/wiki.pl?Simple_Remote_Pendant ought to work. It sounds like you have an identical joypad to the example!
To test with the simplest possible system, open a terminal and type
halrun
You will then get a halcmd prompt, and type
halcmd> loadusr -W hal_input -KRAL Dual
Then
halcmd> show pin
If you get a nice list of joypad pins, then all is well, and you can use those pins in the HAL file, as described, to perform specific LinuxCNC actions.
If you get an error after the loadusr line, or there are no pins, then you probably need to setup the plugdev rules, though as is is showing up in /proc/bus/devices this is unlikely to be a problem in your case.
My impression is that you haven't got as far as trying to add the joystick to your HAL config yet, and are expecting it to work as a jog device as if it were emulating cursor keys.
Please Log in or Create an account to join the conversation.