binshiz
V2EX  ›  Java

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

  •  
  •   binshiz · Oct 22, 2015 · 3319 views
    This topic created in 3885 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   ·   2581 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 16:09 · PVG 00:09 · LAX 09:09 · JFK 12:09
    ♥ Do have faith in what you're doing.