2011-06-30 126 views

回答

1

检查com端口的可用性。如果它很忙,那么你有一个设备连接

+0

感谢您的回复,但它不工作,因为我打开COM端口,所以它不会在开始时忙碌起来。代码如下:CommPortIdentifier port_id = CommPortIdentifier.getPortIdentifier(serial_port_name_); serial_port =(SerialPort)port_id.open(“Gps”,2000); serial_port.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_IN); serial_port_.setSerialPortParams(speed, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); – Deepu

相关问题