0

I'm trying to read data from multiple sources through USB ports. I already have a class written in Java, which reads from a device like "/dev/tty*". However, both readers send their datas into somewhere else, which can be read from a console scanner. In this case, I do not know which source sent the information.

When I use lsbusb I can see all of the USB connected devices (plus some others), however, when I use ls /dev/tty*, nothing like ttyUSBx appears, only AMA0 (which is always active), printk and S0 (which is used to sent data to an fourth device).

https://ubuntuforums.org/showthread.php?t=2259068

I tried this link to remedy the problem, however, there is apparently no /sys/bus/usb-serial directory in my system.

I'm using kernel 4.9. The scanners are one way, so it's not possible to write to them.

I'm looking for a way to make a ttyUSB device, or an another method to decide which scanner sent the information. I have access to vendorID and productID.

EDIT: dmesg | grep tty shows only ttyS0 and tty1 are in use.

How to access USB ports in java

usb4java.org does work. Thanks!

kry
  • 362
  • 3
  • 13
  • Try poking around in `/dev/input/`, there should be multiple devices inside that directory ([Man page](https://www.kernel.org/doc/Documentation/input/input.txt)) – Ferrybig Aug 21 '17 at 11:07
  • Yes, usb4java does actually work. I'm not really sure how it finds the devices tough. (I lost one of my scanners, and not appearing lsusb anymore, but that's unrelated.) – kry Aug 21 '17 at 12:17

0 Answers0