openjdk version "11.0.12" 2021-07-20
OpenJDK Runtime Environment (build 11.0.12+7-post-Raspbian-2deb10u1)
OpenJDK Server VM (build 11.0.12+7-post-Raspbian-2deb10u1, mixed mode)
private static USBASController initAromajoin() {
USBASController usbController = new USBASController();
usbController.scanAndConnect();
if (!usbController.getConnectedDevices().isEmpty()) {
for (AromaShooter aromaShooter : usbController.getConnectedDevices()) {
System.out.println("Connected to AromaShooter: " + aromaShooter.getSerial());
}
}
return usbController;
}
This code never discovers the Aroma shooter in the first time. It always needs to be called twice.
Output first time: (see issue #2)
com.fazecast.jSerialComm.SerialPortTimeoutException: The write operation timed out before all data was written.
at com.fazecast.jSerialComm.SerialPort$SerialPortOutputStream.write(SerialPort.java:1470)
at com.fazecast.jSerialComm.SerialPort$SerialPortOutputStream.write(SerialPort.java:1449)
at com.aromajoin.sdk.jvm.SerialReader.query(SerialReader.java:33)
at com.aromajoin.sdk.jvm.usb.USBASController.scanAndConnect(USBASController.java:74)
at worg.weizmann.App.initAromajoin(App.java:107)
at worg.weizmann.App.main(App.java:27)
Output second time:
com.fazecast.jSerialComm.SerialPortTimeoutException: The write operation timed out before all data was written.
at com.fazecast.jSerialComm.SerialPort$SerialPortOutputStream.write(SerialPort.java:1470)
at com.fazecast.jSerialComm.SerialPort$SerialPortOutputStream.write(SerialPort.java:1449)
at com.aromajoin.sdk.jvm.SerialReader.query(SerialReader.java:33)
at com.aromajoin.sdk.jvm.usb.USBASController.scanAndConnect(USBASController.java:74)
at worg.weizmann.App.initAromajoin(App.java:107)
at worg.weizmann.App.main(App.java:27)
Connected to AromaShooter: ASN2A00306
Using Raspberry pi running Linux 10 (buster).
output of
java -version
:This code never discovers the Aroma shooter in the first time. It always needs to be called twice.
Output first time: (see issue #2)
Output second time: