I am trying to connect a device to my Ubuntu 18.04 machine as well as to my Jetson Xavier with Jetpack 4.2. In this video a guy explains how he has done it for a previous version.

I am getting this error:

~$ sudo insmod /lib/modules/4.18.0-18-generic/kernel/drivers/usb/class/cdc-acm.ko 
insmod: ERROR: could not insert module /lib/modules/4.18.0-18-generic/kernel/drivers/usb/class/cdc-acm.ko: Invalid module format

Therefore I assumed it's not compatible with my version. (Thats what a warning prompted from the installingCDCACM.sh file said anyway...)

So I am not a complete beginner with linux but I have certainly never compiled a driver. I assume thats what I have to do to get it running, right?

I have found this .c and .h file for the cdc-acm driver here but I'm struggling to compile it with this tutorial. It's actually for raspberry pi cross-compiling so maybe not very suitable. This error shows up when compiling:

scripts/Makefile.build:330: recipe for target '/home/auser/acm_test/cdc-acm.o' failed
make[2]: *** [/home/auser/acm_test/cdc-acm.o] Error 1
Makefile:1534: recipe for target '_module_/home/auser/acm_test' failed
make[1]: *** [_module_/home/auser/acm_test] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.18.0-18-generic'
Makefile:7: recipe for target 'all' failed
make: *** [all] Error 2

Is this the right way or am I completely lost? Sadly the device connected before to the application on the desktop machine, but still never showed up as ttyACM0 (No clue why it worked anyway). After installing the script from the video once more even this stopped working. The Xavier with this strange Ubuntu Jetpack never connected at all.


The solution was to restore the original cdc-acm.ko file. The one from the tutorial is not suitable for 4.18. The installed driver is perfectly fine.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.