How can ı enable cdc_acm driver?


how can ı enable cdc_acm driver on colimbri imx6 linux computer on module ?

which condig file am ı enable ?

for ex;

CONFIG_cdc_acm =y

but ı dont know which string and ı could not found this cdc_acm.c file on the device tree

thank you so much …

Did you have a look at the following article?

USB Device Mode

yes ı read this page.

1-) run this command and go to g1 directory.

cd /sys/kernel/config/usb_gadget/g1

2-) create a function with this commands …

    mkdir functions/acm.ACM0
    ln -s functions/acm.ACM0 configs/c.1

3-) than export this configuration

gadget-export g1 /etc/usbg/g1.schema

than restart my board but could not work for me …

however I read this page and run this command firstly

modprobe g_serial

output of command : modprobe: ERROR: could not insert 'g_serial': No such device

can you help me about this problem ? this is last step for us than we are proceed mass production

should I add this string on config file ?


All the required USB gadget function drivers are deployed by default as modules.

root@colibri-imx6:~# ls /lib/modules/3.14.52-v2.6b2+g9ace52b/kernel/fs/configfs/

root@colibri-imx6:~# ls /lib/modules/3.14.52-v2.6b2+g9ace52b/kernel/drivers/usb/gadget/
g_ether.ko             g_zero.ko              u_serial.ko            usb_f_ecm_subset.ko    usb_f_rndis.ko
g_mass_storage.ko      libcomposite.ko        usb_f_acm.ko           usb_f_mass_storage.ko  usb_f_serial.ko
g_serial.ko            u_ether.ko             usb_f_ecm.ko           usb_f_obex.ko          usb_f_ss_lb.ko

However we already deploy a systemd service called usbg which reads the gadget schema from /etc/usbg/g1.schema and at boot the modules should be automatically loaded for RNDIS and ACM class.

root@colibri-imx6:~# lsmod                                                                                                
Module                  Size  Used by
usb_f_rndis            11453  2
u_ether                 9159  1 usb_f_rndis
usb_f_acm               4105  2
u_serial                8499  1 usb_f_acm
libcomposite           28377  12 usb_f_acm,usb_f_rndis
configfs               20785  4 usb_f_acm,usb_f_rndis,libcomposite
galcore               207508  2

So loading of g_serial is not required as u_serial and usb_f_acm is loaded.

In case you have the service disabled or not using it with the configfs and libcomposite modules not loaded, the following should work.

modprobe configfs
modprobe libcomposite
modprobe g_serial

Directly loading the USB gadget serial driver will not work, since it has dependencies on the configfs and libcomposite modules.

root@colibri-imx6:~# modprobe g_serial
[   18.522776] g_serial gadget: Gadget Serial v2.4
[   18.527551] g_serial gadget: g_serial ready

You should now have the below.

root@colibri-imx6:~# ls /dev | grep -i "ttyGS"

Now connecting the USB client cable to X29 on Colibri Evaluation Board gives something on below lines

root@colibri-imx6:/sys/kernel/config/usb_gadget/g1# [ 2362.316443] ci_hdrc ci_hdrc.1: remove, state 4
[ 2362.320990] usb usb2: USB disconnect, device number 1
[ 2362.332674] ci_hdrc ci_hdrc.1: USB bus 2 deregistered
[ 2362.762404] g_serial gadget: high-speed config #2: CDC ACM config

On the host PC side, one should see the corresponding ttyACM0 port.

╭─sanchayan at Sanchayan-Arch in /home/sanchayan/Toradex/toradex-imx (toradex_imx_3.14.52_1.1.0_ga-next ✚5…2)
╰─λ ls /dev | grep -i "ACM"                                      0 < 09:58:46

One can now check simple communication between the ttyGS0 on module side and ttyACM0 on host side with echo and cat.

thank you for your reply .
but this command could not work for me again.

modprobe g_serial
 output of command : modprobe: ERROR: could not insert 'g_serial': No such device

my image version is

uname -a

-->> Linux colibri-imx6 3.14.28-dirty #1 SMP Wed Apr 20 10:33:45 EEST 2016 armv7l GNU/Linux

in the past I use 3.14.28-V2.5b3+g0632def but ı have to change config file than rebuild kernel .

just add this line on the config file


but now ı look over the config file this line CONFIG_USB_CONFIGFS=y is not exist in the colibri_imx6_defconfig file.

What changes did you exactly make to the kernel? Anything other than the above configs? On the default 2.5 Beta3, everything works out of the box here

root@colibri-imx6:~# uname -a
Linux colibri-imx6 3.14.28-V2.5b3+g0632def #1 SMP Tue Dec 15 16:08:32 CET 2015 armv7l GNU/Linux
root@colibri-imx6:~# lsmod
Module                  Size  Used by
usb_f_rndis            11503  2 
u_ether                 9140  1 usb_f_rndis
usb_f_acm               4101  2 
u_serial                8423  1 usb_f_acm
libcomposite           27376  12 usb_f_acm,usb_f_rndis
configfs               20769  4 usb_f_acm,usb_f_rndis,libcomposite
root@colibri-imx6:~# ls /dev | grep -i "GS"

Note that it is not required to load the g_serial above as u_serial and usb_f_acm is already loaded.

I assume you followed the procedure here to update the kernel.

Did you deploy the modules from your own kernel build? The modules installed by default in the image will not work since the kernel version tag will not match. Can you give me the output of

root@colibri-imx6:~# ls /lib/modules/

EDIT: Also refer my earlier answer as I added some more details.


uname -a

Linux colibri-imx6 3.14.28-dirty #1 SMP Thu Apr 21 11:44:37 EEST 2016 armv7l GNU/Linux


Module                  Size  Used by
usb_f_rndis            11423  2
u_ether                 8980  1 usb_f_rndis
usb_f_acm               4105  2
u_serial                8307  1 usb_f_acm
libcomposite           27288  12 usb_f_acm,usb_f_rndis
configfs               20433  4 usb_f_acm,usb_f_rndis,libcomposite

ls /dev | grep -i "GS"


ls /lib/modules/


this commands outputs same with yours.

but ı combine telit gprs modem and toradex board via usb cable.

ı did this operation with my ubuntu pc this is work perfectly and ı connect ttyACM0 than commuınicate with gprs modem . but ı want to make this operation on toradex board. we must activate ttyACMx

I take an error again when I installed colibri default images or my dirty images …

    root@colibri-imx6:~# modprobe g_serial
    modprobe: ERROR: could not insert 'g_serial': No such device

this is my colibri_imx6_defconfig file

I just change the config file on my kernel with this steps

If I understand correctly you want to connect the GPRS modem to the Toradex module/board.
How are you connecting the GPRS module to the board exactly? Are you connecting this to the USB host or USB client port? CDC ACM USB class driver would not be required since it is only applicable for USB client. The GPRS modem should connect to the USB host.

While we have never tested a USB GPRS modem here, only a 3G USB dongle, the following should be applicable I believe.

You can check the details of USB device first by connecting it and using lsusb -v or usb-devices to check it’s vendor and product ID.

In the kernel, you would require the following configurations, assuming that the device would work with generic drivers.


With the above options, the modem should be recognised as one of ttyUSBx or ttyACMx. Except for PPPOE all are enabled as built-in or loadable modules by default. If your GPRS module connected on boot up does not result in ttyUSBx or ttyACMx, one would have to check exactly which driver is required or is the generic driver is expected to work?. Perhaps you can get a confirmation from Telit and also check which modules get loaded on host PC when you connect the GPRS modem.

You would also the need the user space packages ppp, usb-modeswitch and usb-modeswitch-data which would have to added to the image through OpenEmbedded.





You can find some information here on how to set up the scripts for ppp to use the modem.

Also note that g_serial will not load since u_serial and usb_f_acm are already loaded. Both g_serial and u_serial result in ttyGS0 and not ttyACM0. If you would like to verify, disable the systemd usbg.service.

systemctl disable usbg.service

Reboot the module and then load g_serial. One would still get ttyGS0.

set up image

hi ,

I want to connect internet via telit 3g modem. as you can see black one is close to us on photo.

this modem have a usb cable than ı attach this cable on my toradex module
but ı take this information line

root@colibri-imx6:~# [ 2459.873734] usb 1-1: new full-speed USB device number 6 using ci_hdrc

but ı hope ı will see this line or lines

[  154.227974] cdc_acm 2-1:1.0: ttyACM0: USB ACM device
[  154.228652] cdc_acm 2-1:1.2: ttyACM1: USB ACM device
[  154.229002] cdc_acm 2-1:1.4: ttyACM2: USB ACM device

if ı connect to the gprs modem from toradex board ı will test with minicom ,send at command on gprs modem than take a response …

in the past ı did this via rs232. but now ı want to do this via usb cable …

So the connection is to the USB host port, which is correct. As mentioned earlier can you please check the device with lsusb and usb-devices.

Can you check if all the relevant kernel configs mentioned earlier are enabled in the kernel on the module by checking the output of zcat /proc/config.gz?

Also please check which drivers are loaded on PC host when you connect the modem? Perhaps you can also check with Telit’s support or any available Telit software documentation.