Configure usb2 as g_serial in imx6

Hello Everyone,

I am new to linux, One of my application needs to have USB2 as serial port device i.e., imx6 SOM need to act as usb-to-serial device. So configured accordingly the device tree to set usbotg to “peripheral” and enabled device gadget support in kernel level and built an Linux image and deployed to SOM.

Every time i use “modprobeg_serial” command , system echo’s udc-core: couldn’t find an available UDC - added [g_serial] to list of pending drivers.

In “usb_gadget/” there is rndis.usb0 instead of acm.usb0 directory , so rndis driver is enabled for usb in my knowledge.

Please give an an idea how to enable g_serial for usb.

Help me.

Thanks in advance.

Greetings @sri406!

Can you please provide the changes you made to the kernel and the device tree?
Also, which BSP version you’re using?

Note that depending on the version, there’s a configuration file in the rootfs itself that sets this USB port as RNDIS by default.

Make sure to check this post too.

Greetings gustavo.tx ,

Thanks for the reply.

I have include usb gadget support in my kernel and built it.
Can you please post me any article on how to change the default configuration of usb.
BSP version used is 5.2.0.

Thanks in advance.

Hello @sri406!

Did you also unload any RNDIS kernel module that might have been loaded? I’ll try to reproduce that on my side with that BSP version.