No controller found (linux)

Installation and usage on Linux / Installation unter Linux
User avatar
lerneaen_hydra
Posts: 8
Joined: 29 May 2008 10:21
Location: Sweden
Contact:

No controller found (linux)

Post by lerneaen_hydra »

Hello all,

I'm having some trouble running heli-x on linux with any type of usb joystick. I get a "no controller found" error. The KDE joystick panel seems to detect the joysticks well (/dev/input/js0, I've even tested doing a chmod ugo=rwx /dev/input/js0, and it still gives a "no controller found" error), and I can see that the axes move correctly, so the hardware works. The log file from heli-x says;

Code: Select all

Application started
3D Environment created
Using openGLLayer JOGL_AWT
Found 11 display modes
Trying to open xml File files/Application/ViewSettings.xml
Using display mode 1024x768x?x?
Scenegraph created
Listener Volume: 1.0
Trying to open xml File files/Application/SoundSettings.xml
Listener Volume: 0.8
Sound configuration read
Trying to open xml File files/Application/CameraSettings.xml
View initialized
Trying to open xml File files/Application/EnvironmentSettings.xml
Environment initialized
Loading: net.java.games.input.LinuxEnvironmentPlugin
Failed to open device (/dev/input/event7): Failed to open device /dev/input/event7 (13)

Failed to open device (/dev/input/event6): Failed to open device /dev/input/event6 (13)

Failed to open device (/dev/input/event5): Failed to open device /dev/input/event5 (13)

Failed to open device (/dev/input/event3): Failed to open device /dev/input/event3 (13)

Failed to open device (/dev/input/event4): Failed to open device /dev/input/event4 (13)

Failed to open device (/dev/input/event1): Failed to open device /dev/input/event1 (13)

Failed to open device (/dev/input/event2): Failed to open device /dev/input/event2 (13)

Failed to open device (/dev/input/event0): Failed to open device /dev/input/event0 (13)

No Joystick found
Trying to open xml File files/Application/ApplicationSettings.xml
Visible set true
Keyboard and mouse registered
Application successfully initialized
Stopping HELI-X
and when running the script in a terminal I get;

Code: Select all

hydra@hydra-zeus:~/Desktop/HELI-X$ ./runHELI-X.sh
java.lang.UnsatisfiedLinkError: net.java.games.input.LinuxJoystickDevice.nGetAxisMap(J)[B
        at net.java.games.input.LinuxJoystickDevice.nGetAxisMap(Native Method)
        at net.java.games.input.LinuxJoystickDevice.getDeviceAxisMap(LinuxJoystickDevice.java:200)
        at net.java.games.input.LinuxJoystickDevice.<init>(LinuxJoystickDevice.java:70)
        at net.java.games.input.LinuxEnvironmentPlugin.enumerateJoystickControllers(LinuxEnvironmentPlugin.java:406)
        at net.java.games.input.LinuxEnvironmentPlugin.enumerateControllers(LinuxEnvironmentPlugin.java:233)
        at net.java.games.input.LinuxEnvironmentPlugin.<init>(LinuxEnvironmentPlugin.java:113)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at java.lang.Class.newInstance0(Class.java:355)
        at java.lang.Class.newInstance(Class.java:308)
        at net.java.games.input.DefaultControllerEnvironment.getControllers(DefaultControllerEnvironment.java:157)
        at ch.ntb.HeliX.controller.FlightController.<init>(FlightController.java:86)
        at ch.ntb.HeliX.simulation.Simulation.initController(Simulation.java:164)
        at ch.ntb.HeliX.application.Application.<init>(Application.java:153)
        at ch.ntb.HeliX.application.Application$1.run(Application.java:757)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
I'm running kubuntu 7.10 (2.6.22-14 and java 1.6.0_03). If I click OK on the error box then heli-x loads and seems to work, other than my unability to control the helicopter (so graphics/3d works correctly).

If anyone has any ideas I'd be much obliged.

(Unfortunately my german is not very good, so I would prefer english replies if possible).
daybyter
Posts: 15
Joined: 26 May 2008 09:00

Re: No controller found (linux)

Post by daybyter »

Running something like 'cat /proc/bus/usb/devices' in a console shows the controller? It's recognized as a joystick?
User avatar
Joerg
Posts: 169
Joined: 25 May 2008 18:51
Location: ungefähr Karlsruhe
Contact:

Re: No controller found (linux)

Post by Joerg »

Hi,

I'd suspect that you're still having a problem due to insufficient permissions. Try a

Code: Select all

chmod o+rw /dev/input/e*
chmod o+rw /dev/input/j*
(changing all events and js's in the input directory to be read- and writable). This shoudl fix (at least) the
console wrote:Failed to open device (/dev/input/event7): Failed to open device /dev/input/event7 (13)
messages. HTH!
Heli-X unter Mac OS X 10.5 auf einem 20" iMac
in echt: Thunder Tiger Mini Titan E325 + Gaui EP100
User avatar
lerneaen_hydra
Posts: 8
Joined: 29 May 2008 10:21
Location: Sweden
Contact:

Re: No controller found (linux)

Post by lerneaen_hydra »

Thanks for the help so far, however it still doesn't seem to work.

After performing the chmod operations the errors in the log are gone, however it still can't find any controllers. Log file;

Code: Select all

Application started
3D Environment created
Using openGLLayer JOGL_AWT
Found 11 display modes
Trying to open xml File files/Application/ViewSettings.xml
Using display mode 1024x768x?x?
Scenegraph created
Listener Volume: 1.0
Trying to open xml File files/Application/SoundSettings.xml
Listener Volume: 0.8
Sound configuration read
Trying to open xml File files/Application/CameraSettings.xml
View initialized
Trying to open xml File files/Application/EnvironmentSettings.xml
Environment initialized
Loading: net.java.games.input.LinuxEnvironmentPlugin
No Joystick found
Trying to open xml File files/Application/ApplicationSettings.xml
Visible set true
Keyboard and mouse registered
Application successfully initialized
Funnily enough running /proc/bus/usb/ is completely empty, there is nothing there with both controllers plugged in (a logitech gamepad and an E-sky simulator controller), both of which work correctly in the kcontrol program.

Any ideas?
User avatar
Michael
Posts: 1825
Joined: 25 May 2008 16:11
Location: Germany
Contact:

Re: No controller found (linux)

Post by Michael »

Are you running a 64 bit system? There are typing errors:

Please look in libs\jinput\linux-amd46
Plaese rename it into libs\jinput\linux-amd64

Within this directory there is a file jinput-linux64.so Perhaps it is necessary to rename it into jinput-linux.so

Sorry.

Michael
User avatar
lerneaen_hydra
Posts: 8
Joined: 29 May 2008 10:21
Location: Sweden
Contact:

Re: No controller found (linux)

Post by lerneaen_hydra »

Hmm, no, I'm running a 32bit system. Relatively standard install.

EDIT: I just tried doing the same thing on another machine (kubuntu 8.04, 2.6.24-17, java 1.6.0_06-b02), and it gave the same error messages. (as before the controller was found by kcontrol and was apparently called /dev/input/js0, so I don't see why it doesn't work.
Last edited by lerneaen_hydra on 30 May 2008 09:14, edited 1 time in total.
daybyter
Posts: 15
Joined: 26 May 2008 09:00

Re: No controller found (linux)

Post by daybyter »

Could you check your kernel log. Could be something like
less /var/log/messages
or
dmesg | less
The kernel should mention somewhere, that a controller was found and what driver is used for it. Could be, that the gaming lib doesn't support this driver type, but we have to check first, what kind of device your Linux actually recognizes...
User avatar
lerneaen_hydra
Posts: 8
Joined: 29 May 2008 10:21
Location: Sweden
Contact:

Re: No controller found (linux)

Post by lerneaen_hydra »

/var/log/messages and dmesg both give;

Code: Select all

May 30 10:14:51 hydra-zeus kernel: [ 2726.196000] usb 2-1: new low speed USB device using ohci_hcd and address 7
May 30 10:14:51 hydra-zeus kernel: [ 2726.408000] usb 2-1: configuration #1 chosen from 1 choice
May 30 10:14:51 hydra-zeus kernel: [ 2726.424000] input: ADC as /class/input/input9
May 30 10:14:51 hydra-zeus kernel: [ 2726.424000] input: USB HID v1.00 Joystick [ADC] on usb-0000:00:02.0-1
daybyter
Posts: 15
Joined: 26 May 2008 09:00

Re: No controller found (linux)

Post by daybyter »

There's an app called 'joystick', that can create the required devices to access your joystick, in case they are missing. There's also an app called jstest, that might help to figure out, where your joystick device actually is...

http://linux.die.net/man/1/jstest
User avatar
lerneaen_hydra
Posts: 8
Joined: 29 May 2008 10:21
Location: Sweden
Contact:

Re: No controller found (linux)

Post by lerneaen_hydra »

I tried installing jstest (belonging to joystick) and it seems to output the controller's values for 'jstest --normal /dev/input/js0'. I couldn't seem to find any explicit function for creating devices for the joystick, though it would seem that if it can read /dev/input/js0 that it should work, however I still get the same error when running heli-x.

EDIT: after reading this thread viewtopic.php?f=22&t=11 it would appear that everything should work (I have the e-sky 0905A controller). The reason for it not working is beyond me...
Post Reply