Emulate an USB HUB
Emulate an USB HUB
Hi there...
I am currently trying to emulate an USB-Hub and connect/disconnect several other devices (which would have to be emulated aswell). So far I have been able to present the Hub to the host and get it to request port states. The thing I am currently confused about is emulating the connect/disconnect of devices to my emulated hub. Anyone round here ever done sth like that.
Any help would be greatly appreciated.
maui
I am currently trying to emulate an USB-Hub and connect/disconnect several other devices (which would have to be emulated aswell). So far I have been able to present the Hub to the host and get it to request port states. The thing I am currently confused about is emulating the connect/disconnect of devices to my emulated hub. Anyone round here ever done sth like that.
Any help would be greatly appreciated.
maui
Re: Emulate an USB HUB
Hi,
I'm also working on emulating an USB HUB. I got the USB HUB to be found by Linux. Here's my dmesg output:
As you can see, Linux can't get the USB HUB Descriptor. How did you get V-USB to answer with the USB HUB Descriptor?
I think we're both working on the same project, would you mind PMing me with some contact info (MSN, GTalk, IRC or something) so we can work on this together?
I'm also working on emulating an USB HUB. I got the USB HUB to be found by Linux. Here's my dmesg output:
Code: Select all
[33547.616587] usb 5-1: new low speed USB device using uhci_hcd and address 83
[33547.774569] usb 5-1: configuration #1 chosen from 1 choice
[33547.779024] hub 5-1:1.0: USB hub found
[33552.785401] hub 5-1:1.0: config failed, can't read hub descriptor (err -22)
As you can see, Linux can't get the USB HUB Descriptor. How did you get V-USB to answer with the USB HUB Descriptor?
I think we're both working on the same project, would you mind PMing me with some contact info (MSN, GTalk, IRC or something) so we can work on this together?
Re: Emulate an USB HUB
I'm working on the same thing. I have everything working (hub, port connect, long descriptor) except the timing. The hub endpoint 1 always gets stuck in a stall condition after port 1 is enumerated because it can't be reached while usbDeviceAddr is set to the port 1 address. I'm using an attiny85 with the internal oscillator.
Re: Emulate an USB HUB
@crazyc did you need to patch something to get V-USB to answer the HUB descriptor? (second byte from wValue equals 0x29, AFAIK)
Are you guys working on a new code from scratch or just porting the existing AT90USB LUFA-based source code?
I'm working with an ATmega328p clocked with an external 20MHz crystal and trying to just port the existing source code.
p.s.: Since we're all working on the same thing, I think it would be wise if we join our efforts. We can setup a github repo or something.
Are you guys working on a new code from scratch or just porting the existing AT90USB LUFA-based source code?
I'm working with an ATmega328p clocked with an external 20MHz crystal and trying to just port the existing source code.
p.s.: Since we're all working on the same thing, I think it would be wise if we join our efforts. We can setup a github repo or something.
Last edited by yapoid on Mon Sep 13, 2010 5:00 pm, edited 1 time in total.
Re: Emulate an USB HUB
I have an Arduino Mega1280 and also trying to get it working. Did you build the hardware with the zener diodes ?
Re: Emulate an USB HUB
Yes. Two 3v6 diodes: one between D+ and GND, the other one between D- and GND. My microcontroller is running with 5V, powered by the USB port.
Re: Emulate an USB HUB
I have an ATmega64 and also trying to make this. Can anybody share their stuff, so it might be easier?
Re: Emulate an USB HUB
I just patched up version on github. Search for a fork with vusb. It's working for the arduino mega, should be relatively simple to patch to work for other boards/chips.
Re: Emulate an USB HUB
hey xen0,
Just tried your port and it works like a charm. Thanks a lot for your effort !
Just tried your port and it works like a charm. Thanks a lot for your effort !
Re: Emulate an USB HUB
Is hub emulation example code available? Thanks.