public static void main(String[] args) throws Exception {
try {
//CommPortIdentifier portIdent = CommPortIdentifier.getPortIdentifier("tty.usbserial-FTOXM3NX");
CommPortIdentifier portIdent = CommPortIdentifier.getPortIdentifier("ttyUSB0");
port = (SerialPort) portIdent.open("speedtest", 1000);
messageSize = 200;
messageCount = 500;
port.setSerialPortParams(230000, 8, 1, 0);
port.enableReceiveThreshold(messageSize);