CH341SER_LINUX icon indicating copy to clipboard operation
CH341SER_LINUX copied to clipboard

Unable to compile the latest CH341SER_LINUX driver for nodemcu

Open skyrocknroll opened this issue 9 years ago • 15 comments

make -C /lib/modules/4.4.0-28-generic/build  M=/home/yuva/embedded/CH341SER_LINUX  
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-28-generic'
  CC [M]  /home/yuva/embedded/CH341SER_LINUX/ch34x.o
/home/yuva/embedded/CH341SER_LINUX/ch34x.c: In function ‘wait_modem_info’:
/home/yuva/embedded/CH341SER_LINUX/ch34x.c:756:3: error: implicit declaration of function ‘interruptible_sleep_on’ [-Werror=implicit-function-declaration]
   interruptible_sleep_on( &priv->delta_msr_wait );
   ^
cc1: some warnings being treated as errors
scripts/Makefile.build:264: recipe for target '/home/yuva/embedded/CH341SER_LINUX/ch34x.o' failed
make[2]: *** [/home/yuva/embedded/CH341SER_LINUX/ch34x.o] Error 1
Makefile:1403: recipe for target '_module_/home/yuva/embedded/CH341SER_LINUX' failed
make[1]: *** [_module_/home/yuva/embedded/CH341SER_LINUX] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-28-generic'
Makefile:5: recipe for target 'default' failed
make: *** [default] Error 2

If you have received this error then clone the repo and execute make make load

skyrocknroll avatar Jul 02 '16 18:07 skyrocknroll

Awesome ! But after clone of me did fix the error on the make command, but when I make make load command, then

modprobe usbserial
modprobe: ERROR: could not insert 'usbserial': Operation not permitted
Makefile:9: recipe for target 'load' failed
make: *** [load] Error 1

How to fix it? My first time using linux (ubuntu 16:04), looking forward to your help

trinhduc avatar Oct 09 '16 23:10 trinhduc

@trinhduc You need to execute with sudo permissions

sudo make
sudo make load

skyrocknroll avatar Oct 10 '16 05:10 skyrocknroll

I made it ! Thanks you so much.

trinhduc avatar Oct 10 '16 11:10 trinhduc

What's is "clone of me"? I write: sudo make and say that:

make -C /lib/modules/4.4.0-64-generic/build M=/home/deivi/Descargas/CH341SER_LINUX make[1]: se ingresa al directorio «/usr/src/linux-headers-4.4.0-64-generic» CC [M] /home/deivi/Descargas/CH341SER_LINUX/ch34x.o /home/deivi/Descargas/CH341SER_LINUX/ch34x.c: In function ‘wait_modem_info’: /home/deivi/Descargas/CH341SER_LINUX/ch34x.c:756:3: error: implicit declaration of function ‘interruptible_sleep_on’ [-Werror=implicit-function-declaration] interruptible_sleep_on( &priv->delta_msr_wait ); ^ cc1: some warnings being treated as errors make[2]: *** [/home/deivi/Descargas/CH341SER_LINUX/ch34x.o] Error 1 make[1]: *** [_module_/home/deivi/Descargas/CH341SER_LINUX] Error 2 make[1]: se sale del directorio «/usr/src/linux-headers-4.4.0-64-generic» make: *** [default] Error 2

And then, I write: sudo make load

deivi@N150:~/Descargas/CH341SER_LINUX$ sudo make load modprobe usbserial insmod ch34x.ko insmod: ERROR: could not load module ch34x.ko: No such file or directory make: *** [load] Error 1

What am I making wrong?

Thanks!

deivi22 avatar Mar 05 '17 22:03 deivi22

@deivi22 install linux headers package for your system http://askubuntu.com/questions/75709/how-do-i-install-kernel-header-files

skyrocknroll avatar Mar 06 '17 06:03 skyrocknroll

My kernel is up to date, it is linux-headers-4.4.0-64-generic, and the driver supports versions of linux kernel range from 2.6.25 to 3.13.x... I have installed older version (3.13.0.24-generic) but it doesn't work... is it recommended uninstall the last version? Thank you so much!

deivi22 avatar Mar 07 '17 13:03 deivi22

I've managed to compile after downloading the latest version. But when I tried to run sudo make load, I got the following message:

$ sudo make load
modprobe usbserial
insmod ch34x.ko
insmod: ERROR: could not insert module ch34x.ko: Required key not available
Makefile:9: recipe for target 'load' failed
make: *** [load] Error 1

mondaini avatar Jun 03 '17 19:06 mondaini

when i Solve this ? make -C /lib/modules/3.13.0-24-generic/build M=/home/leaozinho/Downloads/DriveESP/CH341SER_LINUX
make[1]: Entrando no diretório /usr/src/linux-headers-3.13.0-24-generic' Building modules, stage 2. MODPOST 1 modules make[1]: Saindo do diretório /usr/src/linux-headers-3.13.0-24-generic'

juanengml avatar May 18 '18 05:05 juanengml

i try

➜ CH341SER_LINUX sudo make load modprobe usbserial modprobe: ERROR: could not insert 'usbserial': Unknown symbol in module, or unknown parameter (see dmesg) make: ** [load] Erro 1 ➜ CH341SER_LINUX

juanengml avatar May 18 '18 05:05 juanengml

I have a similar problem, did someone manage to get CH341SER running with the current raspbian? I get this error: insmod: ERROR: could not insert module ch34x.ko: Invalid module format

bug-i avatar May 23 '18 17:05 bug-i

I was getting

insmod: ERROR: could not insert module ch34x.ko: Device or resource busy

and just rebooted Ubuntu and it worked.

DanielArnett avatar Feb 16 '19 03:02 DanielArnett

I was getting

insmod: ERROR: could not insert module ch34x.ko: Device or resource busy

and just rebooted Ubuntu and it worked.

Funny. I am getting the same thing and try rebooting Ubuntu but it still doesn't work for me. Help, please.

IvanMejico avatar May 05 '19 05:05 IvanMejico

insmod: ERROR: could not insert module ch34x.ko: Operation not permitted.

I'm running it as root user, and all the files in the folder has 744 permission.

Any solutions to this error?

abhiabhi2306 avatar Aug 15 '20 08:08 abhiabhi2306