jfedor2 / hid-remapper

USB input remapping dongle
Other
1.12k stars 134 forks source link

Only one device inputs picked up when connected to USB hub #78

Open jarrodharvey opened 1 year ago

jarrodharvey commented 1 year ago

I'm using an adafruit feather rp2040. The remapper can pick up the presence of one device but not two; if I plug in a hub with two devices attached only one will register. This applies for both software (the monitoring tab) and hardware (the light on the rp2040 that flashes when an input is passing through it).

The device that "connects" seems to be random, but if I connect a hub with one device plugged in then that device will be detected and any subsequent devices plugged into the hub will be ignored.

The hubs that I have tested with so far have not had an external power supply, although I have ordered a hub with an external power supply off Amazon to see if power draw is an issue and will find out once it arrives.

jarrodharvey commented 1 year ago

Update: I have attempted to use a custom board ordered from JLCBCB connected to a hub with an external power supply. Still no luck, unfortunately.

Those who have had success with hubs: how did you do it?

jfedor2 commented 1 year ago

In my experience some hubs work and others don't, there's no trick to it.

I'm not sure if I've seen this behavior where only one connected device works though, usually when it doesn't work, it just doesn't work at all.

jarrodharvey commented 1 year ago

Thanks jfedor2. Do you have an example of a working hub that you use?

jfedor2 commented 1 year ago

Not sure how much this helps because I got these hubs a long time ago and they might be hard to track down, but these two work:

PXL_20230803_190741539

PXL_20230803_190718427

They show up as:

058f:9254 Alcor Micro Corp. Hub

and:

1a40:0101 Terminus Technology Inc. Hub

I also have a UGREEN hub that works partially: it only works if I plug devices into the hub when the hub is already plugged into the remapper.

jarrodharvey commented 1 year ago

Thanks for digging those up jfedor.

I wonder if this has something to do with those hubs being on a European standard or maybe a bit older. Some googling reveals usually either they're out of stock or not available in my country.

I was ever to find a UGREEN one on Amazon so hopefully that one works. Fingers crossed.

miwagner1 commented 8 months ago

Insignia NS-PH3A4AT USB 3.0 4-port Travel Hub does not work from Best Buy. Time to keep buying until one works.

Product ID: 0x0817 Vendor ID: 0x2109 (VIA Labs, Inc.) Version: 90.13 Serial Number: 000000000 Speed: Up to 5 Gb/s Manufacturer: VIA Labs, Inc.

jarrodharvey commented 8 months ago

I should provide an update of my own - I still haven't found a hub that works.

It's not strictly a usb hub, but there is a device called the Microsoft Accessory Hub that is compatible with this, though. You are extremely limited by what you can plug into it - you can only plug in 3.5mm devices or products designed explicitly by Microsoft for the purpose of connecting to it. This information is somewhat valuable to me. While it might not be useful to many people, I'm putting it out there just in case it is.

miwagner1 commented 8 months ago

I should provide an update of my own - I still haven't found a hub that works.

It's not strictly a usb hub, but there is a device called the Microsoft Accessory Hub that is compatible with this, though. You are extremely limited by what you can plug into it - you can only plug in 3.5mm devices or products designed explicitly by Microsoft for the purpose of connecting to it. This information is somewhat valuable to me. While it might not be useful to many people, I'm putting it out there just in case it is.

It could be that it’s hating on something being 3.0 or too much power draw (memories when I had to use a usb 2.0 hub…. Long thrown away 😅 when I managed to avoided the power consumption message on my old iPhone 4).

This hub information may help a lot and as that accessory is USB 2.0 full speed only (and now I kinda want one… down the rabbit hole I go). I’m going to pick up some more very basic usb 2.0 hubs tomorrow for testing and dig around to see if I can’t find my old lightning to usb adapter to test these hubs at the stores with to see if they give me a power draw message. I’m going to buy the ones that don’t and see if they work. (I still have that old fiio mini usb battery dac to test with)

Unfortunately I am not sure how to debug this yet as I am rather new to the microcontroller scene as I bought this for my kensington expert mouse after I had early stages of carpal tunnel (burning wrist before the next stage of numbness). The Kingston software UI can’t see my trackball when my work dock is plugged in (but the engine still works 🤯)which lead me here.

Thank you soo much for making this project. It has already improved my life.

jfedor2 commented 8 months ago

I realize the hub situation is not optimal. I hope to do something about it in the future.

If you've ordered boards from JLCPCB before, we do now have a custom board with a hub built in. So that's at least one configuration that's sort of guaranteed to work (though not 100% - I've found that for example a SpaceMouse Compact doesn't work when plugged into this built-in hub, even though it works with a simple HID Remapper directly).

miwagner1 commented 8 months ago

IMG_3733

I’ll be testing tomorrow at some stores after work. I found everything I needed to test out my theory.

Without the 3.0 hub, my trackball is working with the feather rp2040 with iPhone 11 assistive touch 😮.

miwagner1 commented 8 months ago

Best Buy essentials™ - 4-Port USB 2.0 Hub - Black Model:BE-PH2A4AT SKU:6453994 IMG_3735

Works without any issues so far. I wonder if anyone has gotten any 3.0 hubs to work or if it’s 2.0 only.

Edit, found your Wireshark YouTube video. When work slows down I’ll get a capture to assist with debugging this issue (you should be able to do a play back at least on Linux to simulate the devices to the rp2040). Also ordered a Seeed Studio XIAO nRF52840 just for hid-remaper and to unbrick my nRF52840 MDK USB Dongle 😅)

alanbork commented 3 weeks ago

Has any progress on this been made? I'd really like build a tool to combine two gamepads into one, and of course if there's two gamepads it's going to have to include a hub.

jfedor2 commented 3 weeks ago

Has any progress on this been made? I'd really like build a tool to combine two gamepads into one, and of course if there's two gamepads it's going to have to include a hub.

Just find a hub that works or use one of our custom boards.