在Linux上具有零端口的CommPortIdentifier.getPortIdentifiers [英] CommPortIdentifier.getPortIdentifiers with zero ports on Linux

查看:342
本文介绍了在Linux上具有零端口的CommPortIdentifier.getPortIdentifiers的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在ubuntu上连接串行端口.但是,它对我不起作用.我成功地在Windows上使用不同的驱动程序运行了相同的项目.问题是我在使用此端口时无法加载任何端口:

i am trying to connect serial port on ubuntu. However, It doesn't work for me. I succesfully run the same project on Windows just with different drivers. The problem is that I can't load any ports while I am using this:

CommPortIdentifier.getPortIdentifiers(); //我正在使用rxtx 2.1.7

CommPortIdentifier.getPortIdentifiers(); // i am using rxtx 2.1.7

它总是返回零端口.我想使用端口ttyS0,该端口可与minicon一起很好地工作,因此我确定端口未阻塞且机器未损坏.

It always return zero ports. I would like to use port ttyS0 whichworks great with minicon so i am sure that port is not blocked and the machine is not broken.

有人有理由吗?

推荐答案

这仅仅是因为特权低.我必须将自己添加到应该与ttyS0一起使用的组中.

It was just becouse low priviligies. I had to add myself to a group which is supposed to work with ttyS0.

这篇关于在Linux上具有零端口的CommPortIdentifier.getPortIdentifiers的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆