Menu
Welcome to LinuxQuestions.org, a friendly and active Linux Community.You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Today!Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.Are you new to LinuxQuestions.org? Visit the following links: If you have any problems with the registration process or your account login, please.
![]() ![]()
If you need to reset your password,.Having a problem logging in? Please visit to clear all LQ-related cookies. Introduction to Linux - A Hands on GuideThis guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant.
USB to Serial Adapter Installation Note: If the Scan COM Ports function in Datalink II is unable to locate your Racepak hardware, or you need to know the COM port assignment of the adapter cable for another program (i.e.: AltaCom, MSD.
They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.to receive this Complete Guide absolutely free.
It is currently not possible to open more than one serial port in the same program using this library. (As a matter of fact, I just tried this library today because RXTX and its forks have the same limitation.)I've tried this on Mac OS 10.10.3 with two USB-Serial adapters (specifically, two Arduinos with their builtin adapters), using Java 8.From the symptoms I've observed, there is some confusing inside the library regarding the input and output streams.At first I tried using event-based input from the two ports, which did not work (no events were created, without any errors).Then I switched over to loop-based reading. In my use-case, I send out some data on one port, which sends back some acknowledge string, and sends over the data to the device on the other port, where the data comes back in.
So I open the ports, write the command on the outgoing port, then enter a loop like. Thanks for the bug report - after looking at the code, the problem is that my library is caching the native handle to a serial port such that regardless of how many ports you open, only the cached port handle is being used. The fix is to store the native handle on the Java side of the code and pass it in to the native C callbacks.I'll work on getting that all implemented today, and then will check it all in and get you something to test tomorrow.
(Also just an FYI, in the example code you posted, you are only ever reading from outPort. In fact, there's no reference to inPort whatsoever. Hope that saves you a further headache!).
![]() Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |