I've recently picked up a device that happened to use a CH340 USB chip on it. Of course, for this to be able to work on the Raspberry Pi, I'd need to install the required driver for it.
I found the driver on this website, and followed the instructions on this github repository.
Unfortunately, this didn't work out, and it gave me the following error.
make -C /lib/modules/4.1.19-v7+/build
M=/home/pi/Downloads/CH341SER_LINUX
make[1]: *** /lib/modules/4.1.19-v7+/build: No such file or directory. Stop.
Makefile:5: recipe for target 'default' failed
make: *** [default] Error 2
I've tried making a build directory in the /lib/modules/4.1.19-v7+/ directory, but all it does is search for a non-existant Makefile.
Here's what the Makefile looks like for anyone who would like to check it out.
ifeq ($(KERNELRELEASE), )
KERNELDIR := /lib/modules/$(shell uname -r)/build
PWD :=$(shell pwd)
default:
$(MAKE) -C $(KERNELDIR) M=$(PWD)
clean:
rm -rf .tmp_versions Module.symvers *.mod.c *.o *.ko .*.cmd Module.markers modules.order
load:
modprobe usbserial
insmod ch34x.ko
unload:
rmmod ch34x
else
obj-m := ch34x.o
endif
I can't figure out what I'm doing wrong here, but I really need this driver to be installed.
This may be some useful information:
lsusb
brings up this for the device:QinHeng Electronics HL-340 USB-Serial adapter
.- I'm using a Raspberry Pi 2 with Raspbian Wheezy installed.
- The actual device I'm using is a clone Arduino Nano device from amazon.
- I'm trying to upload code to the Arduino using
ino
.
If any more information is needed, let me know.