avatar
文章
11
标签
15
分类
6
Home
about
tags
categories
RL-learning
photos
LogoAttic的博客ubuntu platformio问题 返回首页
搜索
Home
about
tags
categories
RL-learning
photos

ubuntu platformio问题

发表于2025-12-09|更新于2026-01-06|ubuntuvscodeplatformio
|浏览量:

在使用ubuntu配置vscode 的 platformio插件时,常常需要魔法上网来下载依赖

我们可以直接配置好vscode的proxy来下载,也可以用手机热点来下载

然而废了大半天劲配置好网络之后我的platformio却连不上板子

1
lsusb
1
2
3
4
5
6
7
8
9
10
11
12
13
li@li-MS-7C94:~$ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 008: ID 8087:0032 Intel Corp. AX210 Bluetooth
Bus 001 Device 006: ID 1462:7c94 Micro Star International MYSTIC LIGHT
Bus 001 Device 004: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 009: ID 0d28:0204 NXP ARM mbed
Bus 001 Device 007: ID 1ea7:0064 SHARKOON Technologies GmbH 2.4GHz Wireless rechargeable vertical mouse [More&Better]
Bus 001 Device 005: ID 1a86:7523 QinHeng Electronics CH340 serial converter
Bus 001 Device 003: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 001 Device 002: ID 3151:4015 ROYUAN Gaming Keyboard
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

如上所示lsusb显示识别到了我有CH340(即我的esp32开发板)

但是tty串口设备里面却没有

1
ls /dev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
li@li-MS-7C94:~$ ls /dev
autofs input nvme1n1p6 tty23 tty6 ttyS8
block kmsg nvram tty24 tty60 ttyS9
bsg log port tty25 tty61
btrfs-control loop0 ppp tty26 tty62 udmabuf
bus loop1 psaux tty27 tty63 uhid
char loop10 ptmx tty28 tty7 uinput
console loop2 ptp0 tty29 tty8 urandom
core loop3 pts tty3 tty9 usb
cpu loop4 random tty30 ttyACM0 userfaultfd
cpu_dma_latency loop5 rfkill tty31 ttyprintk userio
cuse loop6 rtc tty32 ttyS0 vcs
disk loop7 rtc0 tty33 ttyS1 vcs1
dma_heap loop8 sda tty34 ttyS10 vcs2
dri loop9 sda1 tty35 ttyS11 vcs3
ecryptfs loop-control sda2 tty36 ttyS12 vcs4
fb0 mapper serial tty37 ttyS13 vcs5
fd mcelog sg0 tty38 ttyS14 vcs6
full mem shm tty39 ttyS15 vcsa
fuse mqueue snapshot tty4 ttyS16 vcsa1
gpiochip0 net snd tty40 ttyS17 vcsa2
gpiochip1 ng0n1 stderr tty41 ttyS18 vcsa3
hidraw0 ng1n1 stdin tty42 ttyS19 vcsa4
hidraw1 null stdout tty43 ttyS2 vcsa5
hidraw2 nvidia0 tty tty44 ttyS20 vcsa6
hidraw3 nvidia-caps tty0 tty45 ttyS21 vcsu
hidraw4 nvidiactl tty1 tty46 ttyS22 vcsu1
hidraw5 nvidia-modeset tty10 tty47 ttyS23 vcsu2
hpet nvidia-uvm tty11 tty48 ttyS24 vcsu3
hugepages nvidia-uvm-tools tty12 tty49 ttyS25 vcsu4
hwrng nvme0 tty13 tty5 ttyS26 vcsu5
i2c-0 nvme0n1 tty14 tty50 ttyS27 vcsu6
i2c-1 nvme0n1p1 tty15 tty51 ttyS28 vfio
i2c-2 nvme0n1p2 tty16 tty52 ttyS29 vga_arbiter
i2c-3 nvme1 tty17 tty53 ttyS3 vhci
i2c-4 nvme1n1 tty18 tty54 ttyS30 vhost-net
i2c-5 nvme1n1p1 tty19 tty55 ttyS31 vhost-vsock
i2c-6 nvme1n1p2 tty2 tty56 ttyS4 zero
i2c-7 nvme1n1p3 tty20 tty57 ttyS5 zfs
i2c-8 nvme1n1p4 tty21 tty58 ttyS6
initctl nvme1n1p5 tty22 tty59 ttyS7

这么长一串都没有ttyUSB之类的

之后拔插我的esp32开发板然后查看内核日志

1
sudo dmesg | tail -n 50
1
2
3
4
5
6
7
8
9
10
11
[  375.204403] usb 1-6.4: USB disconnect, device number 8
[ 379.529854] usb 1-6.4: new full-speed USB device number 9 using xhci_hcd
[ 379.774322] usb 1-6.4: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.64
[ 379.774329] usb 1-6.4: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 379.774332] usb 1-6.4: Product: USB Serial
[ 379.794042] ch341 1-6.4:1.0: ch341-uart converter detected
[ 379.794495] usb 1-6.4: ch341-uart converter now attached to ttyUSB0
[ 380.332411] input: BRLTTY 6.4 Linux Screen Driver Keyboard as /devices/virtual/input/input24
[ 380.440472] usb 1-6.4: usbfs: interface 0 claimed by ch341 while 'brltty' sets config #1
[ 380.441054] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
[ 380.441094] ch341 1-6.4:1.0: device disconnected

原来是被狗草的brltty 服务抢占了我的 CH340 串口设备,导致它刚被识别为 ttyUSB0,立刻又被 brltty 抢走并断开了。

现在直接卸载brltty,然后重启就能解决了

1
sudo apt remove brltty # 重启

brltty 是 为盲人或视力障碍用户提供的 braille(盲文)终端支持服务

文章作者: Attic
文章链接: https://osaerialrobot.top/2025/12/09/platformio/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Attic的博客!
ubuntuvscodestm32esp32platformio
cover of previous post
上一篇
ubuntu22.04安装docker
docker 安装首先卸载系统默认的的docker 1sudo apt remove docker docker-engine docker.io containerd runc 安装必要的库 1sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg lsb-release 1234567891011# 阿里源(推荐使用阿里的gpg KEY)curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg#添加 apt 源:#阿里apt源echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] ...
下一篇
强化学习基本概念及入门
if (typeof lightGallery !== 'undefined') { var options = { selector: '.gallery-item' }; lightGallery(document.getElementsByClassName('.article-gallery')[0], options); }
相关推荐
cover
2025-12-09
ubuntu22.04安装docker
docker 安装首先卸载系统默认的的docker 1sudo apt remove docker docker-engine docker.io containerd runc 安装必要的库 1sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg lsb-release 1234567891011# 阿里源(推荐使用阿里的gpg KEY)curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg#添加 apt 源:#阿里apt源echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] ...
2025-12-10
tmux常用命令
Tmux 常用命令合集1 会话(session)——“进/出/删/切”1234567891011121314151617# 新建默认会话tmux# 新建命名会话tmux new -s demo# 断开会话(保持后台运行)# 快捷键:Ctrl+b d# 查看所有会话tmux ls# 重接指定会话tmux a -t demo # a 是 attach 的简写# 强制销毁会话tmux kill-session -t demo 2 窗口(window)——“标签页”1234567891011121314# 新建窗口# 快捷键:Ctrl+b c# 切换窗口# 快捷键:Ctrl+b p / n / 0~9# 重命名当前窗口# 快捷键:Ctrl+b ,# 关闭当前窗口# 快捷键:Ctrl+b &# 查看窗口列表(可搜索)# 快捷键:Ctrl+b w 3 窗格(pane)——“分屏”1234567891011121314151617181920212223# 左右分屏# 快捷键:Ctrl+b %# 上下分屏# 快捷键:Ct...
cover
2025-12-26
Lazyvim 配置中的 tree-sitter兼容问题解决
参考 https://github.com/LazyVim/LazyVim/issues/6793 https://github.com/LazyVim/LazyVim/issues/4485 随着lazyvim和tree-sitter的更新,lazyvim自动拉取的tree-sitter版本过新无法启动 会报类似下面的错误 1[nvim-treesitter/install/c] error: Error during "tree-sitter build": /home/li/.nvm/versions/node/v24.12.0/lib/node_modules/tree-sitter-cli/tree-sitter: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.39' not found (required by /home/li/.nvm/versions/node/v24.12.0/lib/node_modules/tree-sitter-cli/tree-sitter) 这...
cover
2025-12-10
ubuntu软件推荐以及美化建议
macos 风格美化安装必要的工具和依赖12sudo apt updatesudo apt install -y gnome-tweaks gnome-shell-extensions sassc libglib2.0-dev-bin libxml2-utils 安装 WhiteSur 主题123456# 下载主题仓库git clone https://github.com/vinceliuice/WhiteSur-gtk-theme.git --depth=1cd WhiteSur-gtk-theme# 执行安装脚本(默认安装深色+浅色主题)./install.sh 12345# whitesur 图标主题cd ~git clone https://github.com/vinceliuice/WhiteSur-icon-theme.gitcd WhiteSur-icon-theme./install.sh 12345# 光标cd ~git clone https://github.com/vinceliuice/WhiteSur-cursors.gitcd WhiteSu...
avatar
Attic
帝都苦苦挣扎的PhD
文章
11
标签
15
分类
6
公告
机器人描述文件查看 学术会议查询
最新文章
test2026-01-23
Lazyvim 配置中的 tree-sitter兼容问题解决
Lazyvim 配置中的 tree-sitter兼容问题解决2025-12-26
collection2025-12-12
CoRL2025论文集
CoRL2025论文集2025-12-12
px4 ctrl for ROS22025-12-12
© 2025 - 2026 By Attic框架 Hexo 8.1.1|主题 Butterfly 5.5.3
赣ICP备2025057989号-1  |  京公网安备11011402054558号
搜索
数据加载中