Closed frederikschubert closed 9 years ago
Hi! Glad you're finding the library useful. Your request sounds like great functionality, and I'd be happy to add it. You can download a new version of the library with this capability from: https://dl.dropboxusercontent.com/u/3274122/jSerialComm-latest.jar
Also, if you wouldn't mind, could you comment back with the current OS you're using, its architecture, as well as the port descriptor of your Keyspan adapter as enumerated by the OS (/dev/tty[?] if on Linux I'm assuming). You're the second person who has had problems with the library not enumerating all ports correctly, and I'd like to fix this behavior before pushing the next release to the public repository. Thanks!
To manually open an arbitrary port with the updated library, you will use the new static function SerialPort.getCommPort(String portDescriptor) which will return a SerialPort object as usual.
Thank you for your quick reply! I am using the software on multiple systems. It works on OS X 10.10 and seems to work on Windows 7 x64 as well. I am having problems on Debian and will post the details later today. I will try your new version and give you feedback later.
/sys/devices$ du -a|grep ttyUSB0
./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/tty/ttyUSB0/dev ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/tty/ttyUSB0/power/control ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/tty/ttyUSB0/power/async ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/tty/ttyUSB0/power/runtime_enabled ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/tty/ttyUSB0/power/runtime_active_kids ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/tty/ttyUSB0/power/runtime_active_time ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/tty/ttyUSB0/power/autosuspend_delay_ms ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/tty/ttyUSB0/power/runtime_status ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/tty/ttyUSB0/power/runtime_usage ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/tty/ttyUSB0/power/runtime_suspended_time ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/tty/ttyUSB0/power ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/tty/ttyUSB0/device ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/tty/ttyUSB0/subsystem ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/tty/ttyUSB0/uevent ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/tty/ttyUSB0 ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/tty ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/power/control ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/power/async ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/power/runtime_enabled ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/power/runtime_active_kids ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/power/runtime_active_time ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/power/autosuspend_delay_ms ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/power/runtime_status ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/power/runtime_usage ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/power/runtime_suspended_time ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/power ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/driver ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/subsystem ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/port_number ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0/uevent ./pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/ttyUSB0>
I think the problem might be that the folder structure appears twice e.g. ttyUSB0/tty/ttyUSB0
Also on Mac OS X the library does only find the old /dev/cu[*] port descriptors.
Thanks for the update...will look into these issues and report back.
Hey there! Thanks for your patience. I've isolated the problem to some USB-to-Serial devices (including your Keyspan device) not actually reporting what their product names are to the system. As such, I was simply ignoring those devices.
I've implemented a fix based on looking at the drivers that are loaded for these devices with no product information, and it appears to be working on OpenSUSE, Fedora, Arch, and Debian for a couple of FTDI-based USB-to-Serial converters I had lying around. If you wouldn't mind checking that this fix works for you, I'd appreciate it! The latest version can be downloaded from here:
https://dl.dropboxusercontent.com/u/3274122/jSerialComm-1.2.1-testing.jar
Just to confirm, please verify that your ttyUSB0 devices are now being properly enumerated on Linux, and also confirm that you are able to manually open a port that you specify using the SerialPort.getCommPort(String portDescriptor) function, and I'll close this bug.
The manual opening of a port works great., but sadly I won't be able to test, if the ttyUSB0 devices are being properly enumerated till monday, because I will be on the road. Then I will give you feedback as fast as I can.
I will be using your library quiet a lot now and will report back if there are any problems.
Ok I was able to try it now on Debian Jessie and it works with all the adapters I tested it with. Thanks again for the great work!
Not a problem at all. I appreciate you taking the time to work with me through the debugging process...will definitely make for a much better product in the end!
Hi, thank you for your work. I really enjoy using your library as a replacement for rxtx. Would it be possible to open an arbitrary port, in case the library does not find it. I am using a Keyspan High-Speed USB to Serial Adapter and cannot find the ports. I would like to set the path to the ports manually. Regards, Frederik