Unable to open serial port /dev/ttyUSB0
ubuntu12.04使用USB转串口时出现权限不够问题,如下
Unable to open serial port /dev/ttyUSB0
权限不够
解决办法:
通过增加udev规则来实现。步骤如下:
创建文件/etc/udev/rules.d/70-ttyusb.rules
在文件内增加一行
KERNEL=="ttyUSB[0-9]*", MODE="0666"
重新插入USB转串口设备,普通用户就有权限访问了。
70-ttyusb.rules文件还有另一种写法,先用lsusb查看USB转串口芯片的idVendor和idProduct
#lsusb
显示结果中有这么一行
Bus 005 Device 007: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
ID 0403:6001表示idVendor=0403,idProduct=6001
70-ttyusb.rules的内容如下:
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001",MODE="0666"
重新插入USB转串口设备,普通用户同样可以访问了
Unable to open serial port /dev/ttyUSB0的更多相关文章
- ROS 进阶学习笔记(12) - Communication with ROS through USART Serial Port
Communication with ROS through USART Serial Port We always need to communicate with ROS through seri ...
- Serial Port Programming on Linux(转载)
This is a tutorial on how to program the Serial Ports on your Linux box.Serial Ports are nice little ...
- select/poll/epoll on serial port
In this article, I will use three asynchronous conferencing--select, poll and epoll on serial port t ...
- Connecting to a Remote Serial Port over TCP/IP
https://www.acmesystems.it/socat This article illustrates how to realize a lan to serial gateway Rem ...
- [原]OS X 10.9 Mavericks - Virtual Serial Port Issues
If want to do iOS kernel debugging on A4 device, first you should install Virtual COM port (VCP) dri ...
- Non-standard serial port baud rate setting
////combuad_recv.cpp #include <stdio.h> /*标准输入输出定义*/ #include <stdlib.h> /*标准函数库定义*/ #in ...
- 记一次使用git报错,解决Unable to negotiate with **** port 22: no matching host key type found. Their offer: ssh-rsa
windows电脑重装系统,去官网下载了最新的git安装,一路next下来,打开bash按老路子设置,生成公钥 git config --global user.name "yourname ...
- IntelliJ运行下载的Servlet时报错 Error running Tomcat 8.5.8: Unable to open debugger port (127.0.0.1:49551): java.net.SocketException
学习Java Servlet时,从Wrox上下载了示例代码,准备run/debug时发现以下错误: Error running Tomcat 8.5.8: Unable to open debugge ...
- Serial Port Programming using Win32 API(转载)
In this tutorial we will learn How to communicate with an external device like a microcontroller boa ...
随机推荐
- 微信公众号开发笔记(C#)
这篇文章还不错,使用 .net , 对微信用户的想公众号发送的文字进行回复.比较简单,自己可以修改更复杂的回复. 微信公众号开发笔记(C#) 原文地址 需求分析 根据用户在微信上发送至价值中国公众号 ...
- 【svn】 linux svn 强制提交注释
在svn版本库的hooks文件夹下面,复制模版pre-commit.tmpl cp pre-commit.tmpl pre-commit chmod +x pre-commit vi编辑,如下: #! ...
- Hibernate3回顾-5-简单介绍Hibernate session对数据的增删改查
5. Hibernate对数据的增删改查 5.1Hibernate加载数据 两种:get().load() 一. Session.get(Class arg0, Serializable arg1)方 ...
- 在程序中使用gettid()的方法
gettid()这个函数不可以在程序中直接使用,它是linux本身的一个函数,直接使用会出现,尚未声明之类的错误. 我们可以自已定义实现方法,如下: #include <sys/syscall. ...
- LintCode "Expression Evaluation"
This is sth. for me to learn.. https://github.com/kamyu104/LintCode/blob/master/C++/expression-evalu ...
- Perl参考函数
这是标准的Perl解释器所支持的所有重要函数/功能的列表.在一个函数中找到它的详细信息. abs - 绝对值函数 accept - 接受传入的socket连接 alarm - 调度一个SIGALRM ...
- 216. Combination Sum III
Find all possible combinations of k numbers that add up to a number n, given that only numbers from ...
- jquery .filter()过滤器
述: 筛选元素集合中匹配表达式 或 通过传递函数测试的 那些元素集合. .filter( selector ) selector 类型: Selector 一个用于匹配 ...
- shell下root用户切换其他用户运行程序
工作中,一些程序,需要随机启动,但是不是以root用户运行,于是需要在rc.local中通过shell,从root用户切换到其他用户运行程序,命令如下: su -c 'command' - user ...
- shell脚本摘要
开启监听端口的程序时,查看是否开启成功(该例子监听8983端口) #动态显示[|][/][-][\] function spinner() { local pid=$1 local delay=0.5 ...