我正在使用华为调制解调器通过linux计算机上的java进行呼叫。当我 显示可用端口:-
可用端口:
ttyS0:物理端口S0-物理端口;
ttyS1:物理端口S1-物理端口
ttyUSB0:USB到串行端口
ttyUSB1:USB到串行端口
ttyUSB2:USB到串行端口
其中 ttyUSB0 是我的COM端口, ttyUSB1 是音频端口。当我打电话时,我的代码成功打开ttyUSB0并发出呼叫。但是当我打开ttyUSB1时,出现以下错误
RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyUSB0
log4j:WARN No appenders could be found for logger (ab.bc.cd.ComManager).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
OK
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyUSB0: File exists
gnu.io.NoSuchPortException
OK
OK
at gnu.io.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:269)
at ab.bc.cd.ComManager.startCall(ComManager.java:296)
at ab.bc.cd.ComManager.sendCommandToModem(ComManager.java:254)
at ab.bc.cd.UI.callingTo(UI.java:307)
at ab.bc.cd.UI.gettingSingleInstance(UI.java:111)
at ab.bc.cd.UI.main(UI.java:65)
+CPIN: READY
OK
OK
OK
OK
OK
OK
OK