V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
binshiz
V2EX  ›  Java

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

  •  
  •   binshiz · Oct 22, 2015 · 3248 views
    This topic created in 3845 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   ·   792 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 20:15 · PVG 04:15 · LAX 13:15 · JFK 16:15
    ♥ Do have faith in what you're doing.