Multiple g_zero gadgets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm using g_zero and dummy_hcd to test my userspace software dealing
with USB device I currently do not have.
Works great!
But for single g_zero instance ... is it possible to have two g_zero
devices seen in the system?

Here is what I get:

# Testing with dummy USB device

Get kernel sources and compile drivers/usb/gadget/udc/dummy_hcd.ko

Insert the __dummy_hcd.ko__.

[1045716.944645] dummy_hcd dummy_hcd.0: USB Host+Gadget Emulator,
driver 02 May 2005
[1045716.944648] dummy_hcd dummy_hcd.0: Dummy host controller
[1045716.944651] dummy_hcd dummy_hcd.0: new USB bus registered,
assigned bus number 6
[1045716.944688] usb usb6: New USB device found, idVendor=1d6b, idProduct=0002
[1045716.944690] usb usb6: New USB device strings: Mfr=3, Product=2,
SerialNumber=1
[1045716.944691] usb usb6: Product: Dummy host controller
[1045716.944692] usb usb6: Manufacturer: Linux 4.10.0-37-generic dummy_hcd
[1045716.944693] usb usb6: SerialNumber: dummy_hcd.0
[1045716.944835] hub 6-0:1.0: USB hub found
[1045716.944840] hub 6-0:1.0: 1 port detected


Now we can use __g_zero__ to mimic our desired USB device:

sudo modprobe g_zero idVendor=0x1313 idProduct=0x8089
iSerialNumber="M00407309" iManufacturer="Hinxx" iProduct="XOXO"

[1049425.211438] zero gadget: Gadget Zero, version: Cinco de Mayo 2008
[1049425.211439] zero gadget: zero ready
[1049425.437878] usb 6-1: new high-speed USB device number 4 using dummy_hcd
[1049425.681888] usb 6-1: New USB device found, idVendor=1313, idProduct=8089
[1049425.681891] usb 6-1: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[1049425.681892] usb 6-1: Product: XOXO
[1049425.681894] usb 6-1: Manufacturer: Hinxx
[1049425.681895] usb 6-1: SerialNumber: M00407309
[1049425.689802] zero gadget: high-speed config #3: source/sink


Thanks,
Hinko

-- 
.. the more I see the less I believe.., AE AoR
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux