Issue with USB mouse and joysticks which present as USB keyboards

Discussion of keyboards, gamepads, joysticks and other input related peripherals.
lagomorph
Posts: 15
Joined: Mon Jul 06, 2020 2:18 pm
Has thanked: 2 times
Been thanked: 1 time

Issue with USB mouse and joysticks which present as USB keyboards

Unread post by lagomorph »

I have a main USB keyboard and two different joystick -> USB keyboard devices (a 2600 daptor-II and an X-Arcade). When I have either or both of the joystick -> USB keyboard devices connected, I can't use the USB mouse. Disconnecting them makes the mouse work again. I've tried removing the .cfg files for the devices with the same result. It appears that just plugging either in is a problem. I have the same issue with three different USB mice I've tried. Is there something simple I'm missing?
lagomorph
Posts: 15
Joined: Mon Jul 06, 2020 2:18 pm
Has thanked: 2 times
Been thanked: 1 time

Re: Issue with USB mouse and joysticks which present as USB keyboards

Unread post by lagomorph »

So, this appears to be an issue with plugging the mouse into my USB hub board. If I plug the mouse into a separate powered USB hub and plug the hub into the hub board it works fine. If I pull power to the hub it stops working. At this point I was pretty sure it was a power issue. I'm using the standard DE-10 2A standard power supply. When I replaced the supply with a beefy, regulated one I had the same issue. With all devices connected and the hub unpowered I was measuring a steady state of about 1.14A or so. It jumps a bit higher and lower at times but I never saw it as high as 1.2A. I'd think this should be fine. So maybe it's an issue with my USB hub board. The hub board is the 8 port one from Alexey Melnikov v2.1. I'm drawing a total of less than 250mA from the hub ports. Any ideas?
User avatar
aberu
Core Developer
Posts: 1192
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 247 times
Been thanked: 411 times
Contact:

Re: Issue with USB mouse and joysticks which present as USB keyboards

Unread post by aberu »

What are VID:PID for all the USB Keyboard and two joystick devices? lsusb in the shell will list them off. Maybe it's not as low-level a problem as you are initially thinking.

also I think i remember there being problems with the X-Arcade in general because they don't use standard device identifiers. Sorg has talked about it in another thread. I think there was an issue for it, it seems to treat it as one controller instead of being treated as a keyboard, and this can cause issues.

viewtopic.php?f=32&t=448

https://github.com/MiSTer-devel/Main_MiSTer/issues/276
birdybro~
lagomorph
Posts: 15
Joined: Mon Jul 06, 2020 2:18 pm
Has thanked: 2 times
Been thanked: 1 time

Re: Issue with USB mouse and joysticks which present as USB keyboards

Unread post by lagomorph »

Thanks for the reply. I don't notice an issue with the functioning of the X-Arcade, just the mouse. I'm using the X-Arcade in keyboard mode so it attaches as a USB keyboard.

With the powered 4 port USB hub attached and the mouse attached to it (I've added the device descriptions to the output):

# lsusb
Bus 003 Device 001: ID 1d6b:0003 (USB/IP Virtual Host Controller)
Bus 002 Device 001: ID 1d6b:0002 (USB/IP Virtual Host Controller)
Bus 001 Device 007: ID 05ac:0304 (Apple Optical USB Mouse)
Bus 001 Device 006: ID 0409:005a (USB hub, 4 port)
Bus 001 Device 005: ID aa55:0102 (X-Arcade 2)
Bus 001 Device 004: ID 04d8:f947 (2600-daptor II)
Bus 001 Device 003: ID 413c:2003 (Dell USB Keyboard)
Bus 001 Device 002: ID 1a40:0201 (USB 2.0 Hub, 7 port)
Bus 001 Device 001: ID 1d6b:0002 (DWC OTG Controller)

If I disconnect power to the powered 4 port hub, the attached mouse and the hub itself drop off:

# lsusb
Bus 003 Device 001: ID 1d6b:0003
Bus 002 Device 001: ID 1d6b:0002
Bus 001 Device 005: ID aa55:0102
Bus 001 Device 004: ID 04d8:f947
Bus 001 Device 008: ID 413c:2003
Bus 001 Device 002: ID 1a40:0201
Bus 001 Device 001: ID 1d6b:0002

If I power up the MiSTer without the powered 4 port hub and plug the mouse directly into the hub board with the other devices I get the same output as when the 4 port hub power is disconnected, that is, no mouse detected. It *seems* like a power issue but it doesn't seem to be drawing much current.
Post Reply