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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

1,945件の閲覧回数
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

ラベル(4)
0 件の賞賛
返信
3 返答(返信)

1,494件の閲覧回数
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 件の賞賛
返信

1,494件の閲覧回数
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 件の賞賛
返信

1,494件の閲覧回数
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 件の賞賛
返信