系统自带的ko文件好像有点问题,直接插上设备,会提示出错!
cp210x的驱动依赖于 usbserial.ko才能运行!!
# dmesg | tail 查看系统最后的运行日志,会提示相关文件没有打开
万能解决方法:
- 先卸载usbserial.ko 和 cp210x.ko驱动 rmmod命令
- 下载官方源码make,替换系统的cp210x.ko(替换前先保存个副本,习惯)
- https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers
针对不同的内核版本驱动不一样,ubuntu16.04是4.8.0-36-generic - 查看《CP210x_VCP_Linux_4.x_Release_Notes.txt》使用说明
- Ubuntu:
make ( your cp210x driver )
cp cp210x.ko to /lib/modules/4.8.0-36-generic/kernel/drivers/usb/serial
insmod /lib/modules/<kernel-version/kernel/drivers/usb/serial/usbserial.ko
insmod cp210x.ko - 插上设备验证,2~3s后,# ls /dev/ttyUSB* 会有个ttyUSB*文件设备加载成功!!