Unable to install USB OTG g-serial kernel module

Moderators: Oren.R, Eran.M

brendan
Posts: 13
Joined: Fri Oct 21, 2016 2:16 am

Unable to install USB OTG g-serial kernel module

Postby brendan » Fri Mar 24, 2017 12:40 am

Using a MX6 VAR SOM Solo board and I am looking to enable USB OTG modules such as USB mass storage and USB serial.

The module exists and is apart of the Kernel however not loaded.

Code: Select all

root@var-som-mx6:~# modinfo g_serial
filename:       /lib/modules/4.1.15-6QP+gded07fc/kernel/drivers/usb/gadget/legacy/g_serial.ko
license:        GPL
author:         David Brownell
author:         Al Borchers
description:    Gadget Serial v2.4
srcversion:     8F7125A0F2C7BBE899B9371
depends:        libcomposite
intree:         Y
vermagic:       4.1.15-6QP+gded07fc SMP preempt mod_unload modversions ARMv7 p2v8
parm:           idVendor:USB Vendor ID (ushort)
parm:           idProduct:USB Product ID (ushort)
parm:           bcdDevice:USB Device version (BCD) (ushort)
parm:           iSerialNumber:SerialNumber string (charp)
parm:           iManufacturer:USB Manufacturer string (charp)
parm:           iProduct:USB Product string (charp)
parm:           use_acm:Use CDC ACM, default=yes (bool)
parm:           use_obex:Use CDC OBEX, default=no (bool)
parm:           n_ports:number of ports to create, default=1 (uint)


Whenever I try to insert the serial module I am faced with this error:

Code: Select all

root@var-som-mx6:~# modprobe g-serial
g_serial ci_hdrc.0: failed to start g_serial: -2
modprobe: ERROR: could not insert 'g_serial': Unknown symbol in module, or unknown parameter (see dmesg)


I am at a loss to why this occurs and was wondering if anyone could provide me with assistance.

Thanks

Eran.M
Posts: 140
Joined: Tue Jan 26, 2016 10:49 am

Re: Unable to install USB OTG g-serial kernel module

Postby Eran.M » Tue Mar 28, 2017 11:44 am

Hi Brendan.
Did you try running dmesg to get more info, as the error message suggests?

"modprobe g-serial" works for me with our recovery SD card v70 on VAR-SOLOCustomBoard.
Can you try with the same SD card?

Regards,
Eran

brendan
Posts: 13
Joined: Fri Oct 21, 2016 2:16 am

Re: Unable to install USB OTG g-serial kernel module

Postby brendan » Wed Mar 29, 2017 5:38 am

It turns out it was a problem on my end that caused that error message above. It was because I didn't supply it with a communication medium (usb_f_acm in this case).

The problem I am facing now however (which is related) is the fact that the USB UDC can only support either or; g_serial or g_mass_storage.

Code: Select all

root@var-som-mx6:~# modprobe g_serial
g_serial gadget: Gadget Serial v2.4
g_serial gadget: g_serial ready
root@var-som-mx6:~# g_serial gadget: high-speed config #2: CDC ACM config

root@var-som-mx6:~# modprobe g_mass_storage file=/dev/mmcblk0
udc-core: couldn't find an available UDC - added [g_mass_storage] to list of pending drivers


If I want both USB gadgets to be functional concurrently would g_multi be the best approach? I have read the documentation however have had some difficulties understanding it and how to overcome this issue.

Thank you.

Eran.M
Posts: 140
Joined: Tue Jan 26, 2016 10:49 am

Re: Unable to install USB OTG g-serial kernel module

Postby Eran.M » Wed Mar 29, 2017 7:44 am

- Compile and install the g_multi module (Use menuconfig or just add CONFIG_USB_G_MULTI=m to the defconfig).
- Run: modprobe g_multi file=MASS_STORAGE_DEV

brendan
Posts: 13
Joined: Fri Oct 21, 2016 2:16 am

Re: Unable to install USB OTG g-serial kernel module

Postby brendan » Thu Mar 30, 2017 1:43 am

Eran.M wrote:- Compile and install the g_multi module (Use menuconfig or just add CONFIG_USB_G_MULTI=m to the defconfig).
- Run: modprobe g_multi file=MASS_STORAGE_DEV


I'm getting the same issue when I'm trying to load the eMMC partition as the storage.

Code: Select all

root@var-som-mx6:~# modprobe g_multi file=/dev/mmcblk0
g_multi ci_hdrc.0: failed to start g_multi: -2
modprobe: ERROR: could not insert 'g_multi': Unknown symbol in module, or unknown parameter (see dmesg)


and dmesg gives me no further information apart from what is displayed above.

Eran.M
Posts: 140
Joined: Tue Jan 26, 2016 10:49 am

Re: Unable to install USB OTG g-serial kernel module

Postby Eran.M » Thu Mar 30, 2017 6:34 am

It works for me.

Didn't you say you already overcome this issue?

brendan
Posts: 13
Joined: Fri Oct 21, 2016 2:16 am

Re: Unable to install USB OTG g-serial kernel module

Postby brendan » Thu Mar 30, 2017 11:14 pm

Eran.M wrote:It works for me.

Didn't you say you already overcome this issue?


I had a similar issue (same error) when trying to load g_serial. It came down to the CDC module requiring to be loaded prior to g_serial being inserted. On its own g_serial and g_mass_storage works (just not concurrently). I am taking an educated guess that error that I am receiving above is due to g_multi combing g_ether, g_serial, and g_mass_storage together. I am not using g_ether hence why it is requiring it before g_multi is loaded.

Could you confirm that when you tested it that you are also using g_ether?

Is there a way I can use g_multi with only g_serial and g_mass_storage, and disregarding g_ether?

Thanks


Return to “Yocto”

Who is online

Users browsing this forum: No registered users and 1 guest