I'm developing an application that involves a device, card dispenser specifically and there is provided documentation for its API. According to the documentation, for example, sending "C45" command will raise the card lift up.
So based on jSSC API in communicating with serial, it will be like this,
SerialPort serialPort = new SerialPort("COM2");
try {
serialPort.openPort();//Open serial port
serialPort.setParams(SerialPort.BAUDRATE_9600,
SerialPort.DATABITS_8,
SerialPort.STOPBITS_1,
SerialPort.PARITY_NONE);
serialPort.writeBytes("C45".getBytes());
serialPort.closePort();//Close serial port
}
catch (SerialPortException ex) {
System.out.println(ex);
}
But executing this code does nothing to device, issuing "C45" has to be raising its card lift.
One more this, the device includes a demo program but probably it runs with programming languages under Visual Studio and it does not include the source code, just the documentation.
Thanks!