Teensy Joystick Enumeration?

Status
Not open for further replies.

adamwolf

New member
Hi folks,

I have a few museum exhibits in place that use a Teensy 3.0. I programmed them with Teensyduino 1.16. I create a USB joystick, and I'm running into what appears to be a regression when using Teensyduino 1.17 and 1.18. (I haven't been able to try 1.19 yet.)

The issue I am encountering appears to happen even with the built-in examples.

Using Teensyduino 1.16, the joystick enumerates as /dev/input/js0 on a multitude of Ubuntu machines, even fresh installs. Using newer versions than that, namely anything that supports the 3.1, it enumerates as /dev/input/js1.

Does this happen to other people? I've been using 3.0s in the meantime for new installations, but I'd like to get this figured out. Is this something where I can copy the USB descriptors from 1.16 to the newer versions? A client physically broke a board, and all I have on hand are 3.1s--so figuring this out saves me a pretty penny in overnight shipping fees for 3.0s!

Thanks folks!
 
As a quick fix, you can get the old versions by simply editing the download URL. Just copy the link (eg, in Firefox, right click and copy location) and change the 3 digit version number, then paste it into the address bar to start the download.
 
Thanks Paul! The problem is that it doesn't appear that any versions that support the 3.1 have the "old" joystick behavior that I'm looking for. I saw another thread has a pre-release 1.20, and I may try that.

I also realize that this probably doesn't matter for many users, but unfortunately it matters to Blender.

Adam Wolf
 
Can you give me anything more to do on, other than Linux creates /dev/input/js0 vs /dev/input/js1 ?

If the device name created by the kernel+udev is really the only problem, can it be solved by a symbolic link or udev rule?
 
Can you give me anything more to do on, other than Linux creates /dev/input/js0 vs /dev/input/js1 ?

If the device name created by the kernel+udev is really the only problem, can it be solved by a symbolic link or udev rule?

I'm not on site with the device at the moment. I believe it is enumerating two joysticks, but the first one doesn't have any axes or buttons. I was hoping this was something known. I can post more details in a day or two.
 
Can you give me anything more to do on, other than Linux creates /dev/input/js0 vs /dev/input/js1 ?

If the device name created by the kernel+udev is really the only problem, can it be solved by a symbolic link or udev rule?

Hi,
I have the same problem as Adam.
I have a Teensy 3.1, I use Teensyduino 1.24 with Arduino 1.6.5.
When I try the Basic USB Joystick Example, Linux sees two joysticks.
Teensyduino Serial/Keyboard/Mouse/Joystick (/dev/input/js0) has 8 buttons
and 2 axes stuck at (-32767,-32767).
Teensyduino Serial/Keyboard/Mouse/Joystick (/dev/input/js1) is the good one.
I'm using Kubuntu 14.04 (Kernel 3.16).

Here are more info :
X.org log :
Information [ 48515.902] (II) config/udev: Adding input device Teensyduino Serial/Keyboard/Mouse/Joystick (/dev/input/event16)
Information [ 48515.902] (**) Teensyduino Serial/Keyboard/Mouse/Joystick: Applying InputClass "evdev keyboard catchall"
Information [ 48515.902] (II) Using input driver 'evdev' for 'Teensyduino Serial/Keyboard/Mouse/Joystick'
Information [ 48515.902] (**) Teensyduino Serial/Keyboard/Mouse/Joystick: always reports core events
Information [ 48515.902] (**) evdev: Teensyduino Serial/Keyboard/Mouse/Joystick: Device: "/dev/input/event16"
Information [ 48515.902] (--) evdev: Teensyduino Serial/Keyboard/Mouse/Joystick: Vendor 0x16c0 Product 0x487
Information [ 48515.902] (--) evdev: Teensyduino Serial/Keyboard/Mouse/Joystick: Found keys
Information [ 48515.902] (II) evdev: Teensyduino Serial/Keyboard/Mouse/Joystick: Configuring as keyboard
Information [ 48515.902] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5:1.2/0003:16C0:0487.00BD/input/input144/event16"
Information [ 48515.902] (II) XINPUT: Adding extended input device "Teensyduino Serial/Keyboard/Mouse/Joystick" (type: KEYBOARD, id 12)
Information [ 48515.902] (**) Option "xkb_rules" "evdev"
Information [ 48515.902] (**) Option "xkb_model" "pc105"
Information [ 48515.902] (**) Option "xkb_layout" "fr"
Information [ 48515.902] (**) Option "xkb_variant" "oss"
Information [ 48515.908] (II) config/udev: Adding input device Teensyduino Serial/Keyboard/Mouse/Joystick (/dev/input/event17)
Information [ 48515.908] (**) Teensyduino Serial/Keyboard/Mouse/Joystick: Applying InputClass "evdev pointer catchall"
Information [ 48515.908] (II) Using input driver 'evdev' for 'Teensyduino Serial/Keyboard/Mouse/Joystick'
Information [ 48515.908] (**) Teensyduino Serial/Keyboard/Mouse/Joystick: always reports core events
Information [ 48515.908] (**) evdev: Teensyduino Serial/Keyboard/Mouse/Joystick: Device: "/dev/input/event17"
Information [ 48515.908] (--) evdev: Teensyduino Serial/Keyboard/Mouse/Joystick: Vendor 0x16c0 Product 0x487
Information [ 48515.908] (--) evdev: Teensyduino Serial/Keyboard/Mouse/Joystick: Found 12 mouse buttons
Information [ 48515.908] (--) evdev: Teensyduino Serial/Keyboard/Mouse/Joystick: Found scroll wheel(s)
Information [ 48515.908] (--) evdev: Teensyduino Serial/Keyboard/Mouse/Joystick: Found relative axes
Information [ 48515.908] (--) evdev: Teensyduino Serial/Keyboard/Mouse/Joystick: Found x and y relative axes
Information [ 48515.908] (--) evdev: Teensyduino Serial/Keyboard/Mouse/Joystick: Found absolute axes
Information [ 48515.908] (--) evdev: Teensyduino Serial/Keyboard/Mouse/Joystick: Found x and y absolute axes
Information [ 48515.908] (II) evdev: Teensyduino Serial/Keyboard/Mouse/Joystick: Configuring as mouse
Information [ 48515.908] (II) evdev: Teensyduino Serial/Keyboard/Mouse/Joystick: Adding scrollwheel support
Information [ 48515.908] (**) evdev: Teensyduino Serial/Keyboard/Mouse/Joystick: YAxisMapping: buttons 4 and 5
Information [ 48515.908] (**) evdev: Teensyduino Serial/Keyboard/Mouse/Joystick: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
Information [ 48515.908] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5:1.3/0003:16C0:0487.00BE/input/input145/event17"
Information [ 48515.908] (II) XINPUT: Adding extended input device "Teensyduino Serial/Keyboard/Mouse/Joystick" (type: MOUSE, id 13)
Information [ 48515.908] (II) evdev: Teensyduino Serial/Keyboard/Mouse/Joystick: initialized for relative axes.
Information [ 48515.908] (WW) evdev: Teensyduino Serial/Keyboard/Mouse/Joystick: ignoring absolute axes.
Information [ 48515.908] (**) Teensyduino Serial/Keyboard/Mouse/Joystick: (accel) keeping acceleration scheme 1
Information [ 48515.908] (**) Teensyduino Serial/Keyboard/Mouse/Joystick: (accel) acceleration profile 0
Information [ 48515.908] (**) Teensyduino Serial/Keyboard/Mouse/Joystick: (accel) acceleration factor: 2.000
Information [ 48515.908] (**) Teensyduino Serial/Keyboard/Mouse/Joystick: (accel) acceleration threshold: 4
Information [ 48515.909] (II) config/udev: Adding input device Teensyduino Serial/Keyboard/Mouse/Joystick (/dev/input/js0)
Information [ 48515.909] (II) No input driver specified, ignoring this device.
Information [ 48515.909] (II) This device may have been added with another device file.
Information [ 48515.911] (II) config/udev: Adding input device Teensyduino Serial/Keyboard/Mouse/Joystick (/dev/input/mouse1)
Information [ 48515.911] (II) No input driver specified, ignoring this device.
Information [ 48515.911] (II) This device may have been added with another device file.
Information [ 48515.912] (II) config/udev: Adding input device Teensyduino Serial/Keyboard/Mouse/Joystick (/dev/input/js1)
Information [ 48515.912] (II) No input driver specified, ignoring this device.
Information [ 48515.912] (II) This device may have been added with another device file.
Information [ 48515.913] (II) config/udev: Adding input device Teensyduino Serial/Keyboard/Mouse/Joystick (/dev/input/event18)
Information [ 48515.913] (II) No input driver specified, ignoring this device.
Information [ 48515.913] (II) This device may have been added with another device file.

Kernel log:
07/14/15 09:42:05 PM usb 1-1.5 USB disconnect, device number 104
07/14/15 09:42:16 PM usb 1-1.5 new full-speed USB device number 105 using ehci-pci
07/14/15 09:42:16 PM usb 1-1.5 New USB device found, idVendor=16c0, idProduct=0487
07/14/15 09:42:16 PM usb 1-1.5 New USB device strings: Mfr=1, Product=2, SerialNumber=3
07/14/15 09:42:16 PM usb 1-1.5 Product: Serial/Keyboard/Mouse/Joystick
07/14/15 09:42:16 PM usb 1-1.5 Manufacturer: Teensyduino
07/14/15 09:42:16 PM usb 1-1.5 SerialNumber: 346420
07/14/15 09:42:16 PM cdc_acm 1-1.5 .0: This device cannot do calls on its own. It is not a modem.
07/14/15 09:42:16 PM cdc_acm 1-1.5 .0: ttyACM0: USB ACM device
07/14/15 09:42:16 PM input Teensyduino Serial/Keyboard/Mouse/Joystick as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5:1.2/0003:16C0:0487.00BD/input/input144
07/14/15 09:42:16 PM hid-generic 0003 6C0:0487.00BD: input,hidraw3: USB HID v1.11 Keyboard [Teensyduino Serial/Keyboard/Mouse/Joystick] on usb-0000:00:1a.0-1.5/input2
07/14/15 09:42:16 PM input Teensyduino Serial/Keyboard/Mouse/Joystick as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5:1.3/0003:16C0:0487.00BE/input/input145
07/14/15 09:42:16 PM hid-generic 0003 6C0:0487.00BE: input,hidraw4: USB HID v1.11 Mouse [Teensyduino Serial/Keyboard/Mouse/Joystick] on usb-0000:00:1a.0-1.5/input3
07/14/15 09:42:16 PM input Teensyduino Serial/Keyboard/Mouse/Joystick as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5:1.4/0003:16C0:0487.00BF/input/input146
07/14/15 09:42:16 PM hid-generic 0003 6C0:0487.00BF: input,hidraw5: USB HID v1.11 Joystick [Teensyduino Serial/Keyboard/Mouse/Joystick] on usb-0000:00:1a.0-1.5/input4
07/14/15 09:42:16 PM hid-generic 0003 6C0:0487.00BF: input,hidraw5: USB HID v1.11 Joystick [Teensyduino Serial/Keyboard/Mouse/Joystick] on usb-0000:00:1a.0-1.5/input4
07/14/15 09:43:58 PM usb 1-1.5 USB disconnect, device number 105

I tried Hamaluik's custom joystick (http://hamaluik.com/posts/making-a-custom-teensy3-hid-joystick/)
and only one joystick is seen, unfortunately the axis are not working very well, and I prefer use default joystick.

Thank you for your help!
jm
 
Status
Not open for further replies.
Back
Top