CommPortIdentifier.getPortIdentifiers with zero ports on Linux

前端 未结 3 686
一生所求
一生所求 2021-01-15 13:29

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 tha

3条回答
  •  北海茫月
    2021-01-15 14:15

    if nothing helps, you should consider to add this line to your java code:

    System.setProperty("gnu.io.rxtx.SerialPorts", "/dev/yourtty");
    

    did it for me. (Only if you work with the RXTX library)

提交回复
热议问题