AnsweredAssumed Answered

How to use USB OTG as gadget HID

Question asked by chandra sekhar on Apr 15, 2017
Latest reply on Apr 21, 2017 by chandra sekhar


I am using one USB OTG port as device. I can confirm that the OTG port is working when using Mfgtool for flashing images.

When building the kernel the USB gadget can be configured to only Gadget mass storage and UTP. 

After flashing the images and booting, I want the same port to be used as either gadget serial or gadget HID. But we configured the USB as gadget mass storage. If I give other option such as CONFIG_GADGET_SERIAL or HID I am unable to flash the images. 

What is the right option to make it as GADGET MASS STORAGE and GADGET SERIAL?

I tried building the kernel and modules in separate builds, but when I try to do modprobe g_serial

 modprobe g_serial
modprobe: can't load module libcomposite (kernel/drivers/usb/gadget/g_serial.ko): invalid module format 

I am getting this error.