我正在尝试使用以下代码使用串口连接到我的智能卡:
String port = "COM1"; // serial port
CommPortIdentifier portId = CommPortIdentifier.getPortIdentifier(port);
String appname = "CadClient";
int timeout = 30000;
CommPort commPort = portId.open(appname, timeout);
InputStream is = commPort.getInputStream();
OutputStream os = commPort.getOutputStream();
cad = CadDevice.getCadClientInstance(CadDevice.PROTOCOL_T1, is, os);
//...hangs here for unlimited time
cad.powerUp();
为什么它停留在powerUp()的任何帮助。感谢