RXTX not working in ubuntu

烂漫一生 提交于 2019-12-05 20:37:11

Check whether the configuration file javax.comm.properties is on the classpath. I have had endless issues with RXTX because of this file - it just fails silently.

I had the same problem yesterday, and found this:

String serialPortID = "/dev/ttyAMA0";
System.setProperty("gnu.io.rxtx.SerialPorts", serialPortID);

Thath is, you need to set the gnu.io.rxtx.SerialPorts system property, and the value should be the name of the port you want to open.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!