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

Removal of device from port keeps generating serial events constantly #72

Closed
sbsatter opened this issue Jun 13, 2017 · 3 comments
Closed

Comments

@sbsatter
Copy link

Why is it that when a device (e.g. a scanner) is removed, serial events keep generating.
In such circumstance,
event.getSerialPort().bytesAvailable() = -1.

Is this a bug? Will it cause unprecedented exceptions/errors?

@hedgecrw
Copy link
Contributor

hedgecrw commented Jan 3, 2018

  1. What OS are you using?
  2. What events are you listening for?
  3. What event is being generated (check event.getEventType())?
  4. What timeouts have you set up on the port?

@sbsatter
Copy link
Author

sbsatter commented Jan 4, 2018

  1. Linux Mint 18.1 Cinnamon (also generated on Windows)
  2. LISTENING_EVENT_DATA_AVAILABLE
  3. I can't seem to remember the event type since I haven't worked on it for a long while.
  4. serialPort.setComPortTimeouts(SerialPort.TIMEOUT_READ_BLOCKING, 10000, 0);

@hedgecrw
Copy link
Contributor

Closing due to unable to replicate with current library version.

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

2 participants