我正在使用jssc与设备进行通信。
在Windows和Linux下,程序还可以,但我遇到了病毒问题,我格式化了我的pc,然后程序不能在Windows上运行,但在Linux上,程序运行得很好。
我不知道为什么这个程序停止工作了。
程序代码为:
try {
command = new String(commandSend);
serialPort.writeBytes(command.getBytes());
logger.info("Sending to port " + a.getPort() + " " + command);
Thread.sleep(1000);//Wait 0.8 seconds
retorno = serialPort.readString();
} catch (Exception e) {
logger.error("Problems with send/receive command with the analyzer");
logger.error(e.getMessage());
logger.error(e.toString());
e.printStackTrace();
}发布于 2016-03-10 12:41:21
格式化PC后,请为UART IC安装驱动程序。
https://stackoverflow.com/questions/33294453
复制相似问题