CommPortIdentifier.getPortIdentifiers()返回Empty

时间:2018-05-24 12:31:21

标签: java serial-port raspberry-pi3 rxtx

我有两个Serial Com端口ttyUSB0和ttyUSB1,test1.class使用ttyUSB0,Test2.class使用ttyUSB1。 Test1.class和Test2.class都访问相同的LocalCommunication.class来检查端口并连接和断开端口。

LocalCommunication.class具有以下代码,用于返回连接到RPI的各种端口

CommPortIdentifier.getPortIdentifiers()

我的Test1.class和Test2.class返回2端口为空。

你能帮我解决可能出现的问题。以及如何调试。

0 个答案:

没有答案
相关问题