Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need to initialize twice to discover Aroma Shooter #3

Open
danielle-h opened this issue Mar 31, 2022 · 0 comments
Open

need to initialize twice to discover Aroma Shooter #3

danielle-h opened this issue Mar 31, 2022 · 0 comments

Comments

@danielle-h
Copy link

danielle-h commented Mar 31, 2022

Using Raspberry pi running Linux 10 (buster).

output of java -version:

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant