Ubuntu下cp210x用不了的烂事儿

本文描述了在VirtualBox环境下安装Ubuntu22/23时遇到的USB转串口问题,包括删除不必要的依赖包如brltty、cp210x驱动编译错误,以及一系列尝试后发现重启和清理部分库后/dev/ttyUSB0暂时出现,但不稳定的问题。
摘要由CSDN通过智能技术生成

VirtualBox下,安装Ubuntu22/23,USB转串口如何也搞不定。

sudo apt-get purge brltty
然后不行。。。

去下载cp210x驱动,编译报错一堆,不是一个void/int的事儿了。。。也不知道怎么改

然后原本ubuntu23.10.1下就有cp210x驱动,但是怎么弄都不行。

怎么弄都不行,崩溃

不行再试试

sudo apt-get purge brltty

然后说已经没了,但是XXXXXX还在也没用了。。

根据提示,把四五个相关的全部删掉,删光,ttyUSB0就出来了。

盲人显示器对盲人很友好,但使用USB转串口的招谁惹谁了。

Ubuntu23.10.1

Ubuntu22.04 

两个虚拟环境都测试可以了。

根据提示,没用的七七八八:

sudo apt-get purge libbrlapi0.8

sudo apt-get purge libpcre2-32-0

sudo apt-get purge python3-brlapi

sudo apt-get purge python3-louis

sudo apt-get purge python3-pyatspi

sudo apt-get purge python3-speechd

sudo apt-get purge python3-xdg

然后重启,然后重新插拔,然后/dev/ttyUSB0就有了。

不知道有啥后果呢,过几天再看,这破事儿搞疯了我了。

不行的,一波操作之后只能使ttyUSB0存在2分钟然后还是会消失。。不知道什么在搞鬼。仅做参考。

This bundle contains a modified CP210x driver for the 4.10.0 kernel (Ubuntu 17.04). It contains: - Support for the CP2102N NOTE: This driver is an example of how to perform GPIO operations within the CP210x driver since the driver on kernel.org does not support GPIO at this time. This driver has only been written and tested on the Linux 3.13.0 kernel on Ubuntu 14.04. This driver is a modified version of the existing driver in the Linux 3.13.0 kernel, which is maintained at kernel.org. It is recommened to use the driver there that matches your specific kernel version: www.kernel.org Build instrutions: Ubuntu: 1. make ( your cp210x driver ) 2. cp cp210x.ko to /lib/modules//kernel/drivers/usb/serial 3. insmod /lib/modules/<kernel-version/kernel/drivers/usb/serial/usbserial.ko 4. insmod cp210x.ko RedHat: 1. yum update kernel* //need to update the kernel first otherwise your header won't match 2. yum install kernel-devel kernel-headers //get the devel and header packages. 3. reboot //your build link should be fixed after your system come back 4. make ( your cp210x driver ) // should be able to build successfully at this point 5. cp cp210x.ko to /lib/modules//kernel/drivers/usb/serial 6a. insmod /lib/modules/<kernel-version/kernel/drivers/usb/serial/usbserial.ko 6. insmod cp210x.ko 7. sudo chmod 666 /dev/ttyUSB0 8. sudo chmod 666 /dev/ttyUSB1 GPIO example: This shows how to use the two IOCTLs to set GPIO state. Build instructions: 1. g++ cp210x_gpio_example.c -o cp210x_gpio_example 2. ./cp210x_gpio_example
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值