How do I establish 2 HID and 1 mass storage at same time ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I establish 2 HID and 1 mass storage at same time ?

1,640 Views
alexkuo
Contributor I

I need to establish 2 HID device and 1 mass storage using IMX6ULL14x14evk sample.

I already add some HID features from menuconfig. After using MFGTool, then I using  "insmod" command to add HID features(g_hid.ko) and mass storage(g_mass_storage.ko), only 1 HID or 1 mass storage can be found. How do I establish 2 HID and 1 mass storage at same time ?

Linux version: 4.9.11-1.0.0+gc27010d

EVK: imx6ull14x14evk

Command:

root@imx6ull14x14evk:/lib/modules/4.9.11-1.0.0+gc27010d/kernel/drivers/usb/gadget/legacy/#  insmod g_hid.ko

root@imx6ull14x14evk:/lib/modules/4.9.11-1.0.0+gc27010d/kernel/drivers/usb/gadget/legacy/#  insmod g_mass_storage.ko

Labels (4)
0 Kudos
3 Replies

1,189 Views
igorpadykov
NXP Employee
NXP Employee

Hi Alex

for such purpose it is necessary to create usb composite driver,

one can look at linux documentation and some examples

Creating a Linux Gadget USB Composite Device for i.MX28 

USB Gadget API for Linux — The Linux Kernel documentation 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,189 Views
alexkuo
Contributor I

Hi igor

 

If I use 2 devices configuration as below, do I need to create usb driver?
- Interface 0, EP1 IN/OUT, interrupt: vendor specific HID
- Interface 1, EP2 IN/OUT, bulk: Mass Storage, bulk-only transfer

 

Actually, it's too complex to create usb composite driver.

Does it have efficient way to modify USB descriptor for 1 HID and 1 Mass Storage at same time? 

 

I have trawled through many articles with no luck.
it's only way to create driver?

 

Thank you.

0 Kudos

1,189 Views
alexkuo
Contributor I

Hi igor

If I use 2 device configuration as below, do I need to create usb driver?
- Interface 0, EP1 IN/OUT, interrupt: vendor specific HID
- Interface 1, EP2 IN/OUT, bulk: Mass Storage, bulk-only transfer

Actually, it's too complex to create usb composite driver.

Does it have efficient way to modify USB descriptor for 1 HID and 1 Mass Storage at same time? 

I have trawled through many articles with no luck.
it's only way to create driver?

Thank you.

0 Kudos