binshiz
V2EX  ›  Java

如何用 Java 进行多串口通信?

  •  
  •   binshiz · Oct 22, 2015 · 3298 views
    This topic created in 3867 days ago, the information mentioned may be changed or developed.

    前一段时间因为公司业务的需要,要读取扫码枪扫码的数据,之前用的是 javax.comm 的 jar ,能够顺利对一个串口进行调试,然而当我想使用两把扫码枪,也就是连接两个串口的时候,炸了,用 javax.comm 包好像只能对一个串口进行调试,于是我换了 Rxtx 的 jar ,配置完成后使用两个 SerialPortHandler ,仍然只能正常打开一个串口,打开第二个串口时,会报 PortInUseException ,求大神做过串口这块的指教,感激不尽!

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1041 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 23:12 · PVG 07:12 · LAX 16:12 · JFK 19:12
    ♥ Do have faith in what you're doing.