From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0002.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0001.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0003.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0002.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0004.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0004.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0002.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0002.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0002.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0002.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0005.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0005.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0003.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0003.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0003.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0003.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0002.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0006.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0006.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0004.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0004.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0004.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0004.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0003.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0007.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0007.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0005.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0005.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0005.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0005.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0004.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0002.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0002.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0002.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0001.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0001.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0008.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0008.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0006.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0006.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0006.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0006.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0005.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0003.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0003.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0003.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0002.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0002.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0009.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0009.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0007.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0007.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0007.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0007.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0006.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0004.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0004.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0004.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0004.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0004.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment.html From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0010.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0010.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0008.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0008.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0008.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0008.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0007.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0005.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0005.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0005.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0005.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0005.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0001.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0001.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0001.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0001.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment.html From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0011.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0011.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0009.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0009.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0009.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0009.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0008.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0006.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0006.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0006.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0006.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0006.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0003.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0003.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0003.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment-0002.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0002.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment-0001.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment-0001.html From tjarvi at qbang.org Wed Jan 14 18:56:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 14 Jan 2009 18:56:50 -0700 (MST) Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Message-ID: On Wed, 14 Jan 2009, Jaakko Sipari wrote: > Hi (again)! > > Could someone clarify what these methods actually do and are they even > implemented? Do I get into trouble with buffer values of 0 (if I want to > handle the buffers myself)? > rxtx does not have buffers. It was not clear to me at the time why there would be a buffer when java already provides buffered input and output streams that can sit on top of rxtx. One reason I can see for implementing buffers in rxtx is to get data off the port so select() can block. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Wed Jan 14 23:23:08 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 15 Jan 2009 08:23:08 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> Message-ID: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Here's the same message for the list also. Forgot to do "Reply to all" ---------- Forwarded message ---------- From: Jaakko Sipari Date: Thu, Jan 15, 2009 at 8:22 AM Subject: Re: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize To: Trent Jarvi On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! >> >> Could someone clarify what these methods actually do and are they even >> implemented? Do I get into trouble with buffer values of 0 (if I want to >> handle the buffers myself)? >> >> > rxtx does not have buffers. It was not clear to me at the time why there > would be a buffer when java already provides buffered input and output > streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data off > the port so select() can block. > So basically those methods have currently no effect at all? - Jaakko -- Jaakko Sipari tel. +358451238191 eMail. jaakko.sipari at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090115/8b4c47c0/attachment.html From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0012.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0012.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0010.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0010.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0010.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0010.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0009.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0007.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0007.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0007.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0007.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0007.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0004.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0004.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0004.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment-0003.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0003.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment-0002.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment-0002.html From tjarvi at qbang.org Wed Jan 14 18:56:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 14 Jan 2009 18:56:50 -0700 (MST) Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Message-ID: On Wed, 14 Jan 2009, Jaakko Sipari wrote: > Hi (again)! > > Could someone clarify what these methods actually do and are they even > implemented? Do I get into trouble with buffer values of 0 (if I want to > handle the buffers myself)? > rxtx does not have buffers. It was not clear to me at the time why there would be a buffer when java already provides buffered input and output streams that can sit on top of rxtx. One reason I can see for implementing buffers in rxtx is to get data off the port so select() can block. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Wed Jan 14 23:23:08 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 15 Jan 2009 08:23:08 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> Message-ID: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Here's the same message for the list also. Forgot to do "Reply to all" ---------- Forwarded message ---------- From: Jaakko Sipari Date: Thu, Jan 15, 2009 at 8:22 AM Subject: Re: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize To: Trent Jarvi On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! >> >> Could someone clarify what these methods actually do and are they even >> implemented? Do I get into trouble with buffer values of 0 (if I want to >> handle the buffers myself)? >> >> > rxtx does not have buffers. It was not clear to me at the time why there > would be a buffer when java already provides buffered input and output > streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data off > the port so select() can block. > So basically those methods have currently no effect at all? - Jaakko -- Jaakko Sipari tel. +358451238191 eMail. jaakko.sipari at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090115/8b4c47c0/attachment-0001.html From tjarvi at qbang.org Thu Jan 15 18:37:12 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 15 Jan 2009 18:37:12 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: On Thu, 15 Jan 2009, Jaakko Sipari wrote: > Here's the same message for the list also. Forgot to do "Reply to all" > > ---------- Forwarded message ---------- > From: Jaakko Sipari > Date: Thu, Jan 15, 2009 at 8:22 AM > Subject: Re: [Rxtx] The functionality behind setInputBufferSize & > setOutputBufferSize > To: Trent Jarvi > > > On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! > > Could someone clarify what these methods actually do > and are they even > implemented? Do I get into trouble with buffer > values of 0 (if I want to > handle the buffers myself)? > > > rxtx does not have buffers. ?It was not clear to me at the time why > there would be a buffer when java already provides buffered input and > output streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data > off the port so select() can block. > > > So basically those methods have currently no effect at all? > Correct. You can use BufferedInputStream and BufferedOutputStream from the Java API once you get the Input/OutputStream from rxtx. But changing the input and output buffer size in rxtx is not going to change behavior. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Fri Jan 16 01:22:37 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Fri, 16 Jan 2009 10:22:37 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> > So basically those methods have currently no effect at all? >> >> > Correct. You can use BufferedInputStream and BufferedOutputStream from the > Java API once you get the Input/OutputStream from rxtx. But changing the > input and output buffer size in rxtx is not going to change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > I assume there still is some kind of buffer in rxtx (or the serial port driver) in case of processing delays. I mean, if the serial port gives data faster than can be read from the Java program using rxtx it isn't just thrown away, right? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090116/3bd9a52e/attachment.html From tjarvi at qbang.org Fri Jan 16 05:17:24 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 16 Jan 2009 05:17:24 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> Message-ID: On Fri, 16 Jan 2009, Jaakko Sipari wrote: > > So basically those methods have currently no effect > at all? > > > Correct. ?You can use BufferedInputStream and BufferedOutputStream > from the Java API once you get the Input/OutputStream from rxtx. ?But > changing the input and output buffer size in rxtx is not going to > change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > > > > I assume there still is some kind of buffer in rxtx (or the serial port > driver) in case of processing delays. I mean, if the serial port gives data > faster than can be read from the Java program using rxtx it isn't just > thrown away, right? > The UART can usually hold a few bytes. The kernel driver can buffer the input. In practice, it works. With Sun commapi, the typical application has 4 buffers between the user and the incomming data. With rxtx, it is 3. BufferedInputStream -> commapi/rxtx -> kernel driver -> UART If you really do run into overflows on the UART, then hardware flow control is what you should be using and tinkering with rxtx to avoid it is not a very sound approach. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0013.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0013.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0011.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0011.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0011.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0011.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0010.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0008.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0008.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0008.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0008.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0008.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0005.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0005.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0005.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment-0004.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0004.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment-0004.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment-0004.html From tjarvi at qbang.org Wed Jan 14 18:56:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 14 Jan 2009 18:56:50 -0700 (MST) Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Message-ID: On Wed, 14 Jan 2009, Jaakko Sipari wrote: > Hi (again)! > > Could someone clarify what these methods actually do and are they even > implemented? Do I get into trouble with buffer values of 0 (if I want to > handle the buffers myself)? > rxtx does not have buffers. It was not clear to me at the time why there would be a buffer when java already provides buffered input and output streams that can sit on top of rxtx. One reason I can see for implementing buffers in rxtx is to get data off the port so select() can block. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Wed Jan 14 23:23:08 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 15 Jan 2009 08:23:08 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> Message-ID: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Here's the same message for the list also. Forgot to do "Reply to all" ---------- Forwarded message ---------- From: Jaakko Sipari Date: Thu, Jan 15, 2009 at 8:22 AM Subject: Re: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize To: Trent Jarvi On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! >> >> Could someone clarify what these methods actually do and are they even >> implemented? Do I get into trouble with buffer values of 0 (if I want to >> handle the buffers myself)? >> >> > rxtx does not have buffers. It was not clear to me at the time why there > would be a buffer when java already provides buffered input and output > streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data off > the port so select() can block. > So basically those methods have currently no effect at all? - Jaakko -- Jaakko Sipari tel. +358451238191 eMail. jaakko.sipari at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090115/8b4c47c0/attachment-0003.html From tjarvi at qbang.org Thu Jan 15 18:37:12 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 15 Jan 2009 18:37:12 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: On Thu, 15 Jan 2009, Jaakko Sipari wrote: > Here's the same message for the list also. Forgot to do "Reply to all" > > ---------- Forwarded message ---------- > From: Jaakko Sipari > Date: Thu, Jan 15, 2009 at 8:22 AM > Subject: Re: [Rxtx] The functionality behind setInputBufferSize & > setOutputBufferSize > To: Trent Jarvi > > > On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! > > Could someone clarify what these methods actually do > and are they even > implemented? Do I get into trouble with buffer > values of 0 (if I want to > handle the buffers myself)? > > > rxtx does not have buffers. ?It was not clear to me at the time why > there would be a buffer when java already provides buffered input and > output streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data > off the port so select() can block. > > > So basically those methods have currently no effect at all? > Correct. You can use BufferedInputStream and BufferedOutputStream from the Java API once you get the Input/OutputStream from rxtx. But changing the input and output buffer size in rxtx is not going to change behavior. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Fri Jan 16 01:22:37 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Fri, 16 Jan 2009 10:22:37 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> > So basically those methods have currently no effect at all? >> >> > Correct. You can use BufferedInputStream and BufferedOutputStream from the > Java API once you get the Input/OutputStream from rxtx. But changing the > input and output buffer size in rxtx is not going to change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > I assume there still is some kind of buffer in rxtx (or the serial port driver) in case of processing delays. I mean, if the serial port gives data faster than can be read from the Java program using rxtx it isn't just thrown away, right? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090116/3bd9a52e/attachment-0001.html From tjarvi at qbang.org Fri Jan 16 05:17:24 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 16 Jan 2009 05:17:24 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> Message-ID: On Fri, 16 Jan 2009, Jaakko Sipari wrote: > > So basically those methods have currently no effect > at all? > > > Correct. ?You can use BufferedInputStream and BufferedOutputStream > from the Java API once you get the Input/OutputStream from rxtx. ?But > changing the input and output buffer size in rxtx is not going to > change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > > > > I assume there still is some kind of buffer in rxtx (or the serial port > driver) in case of processing delays. I mean, if the serial port gives data > faster than can be read from the Java program using rxtx it isn't just > thrown away, right? > The UART can usually hold a few bytes. The kernel driver can buffer the input. In practice, it works. With Sun commapi, the typical application has 4 buffers between the user and the incomming data. With rxtx, it is 3. BufferedInputStream -> commapi/rxtx -> kernel driver -> UART If you really do run into overflows on the UART, then hardware flow control is what you should be using and tinkering with rxtx to avoid it is not a very sound approach. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0014.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0014.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0012.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0012.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0012.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0012.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0011.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0009.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0009.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0009.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0009.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0009.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0006.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0006.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0006.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment-0005.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0005.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment-0005.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment-0005.html From tjarvi at qbang.org Wed Jan 14 18:56:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 14 Jan 2009 18:56:50 -0700 (MST) Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Message-ID: On Wed, 14 Jan 2009, Jaakko Sipari wrote: > Hi (again)! > > Could someone clarify what these methods actually do and are they even > implemented? Do I get into trouble with buffer values of 0 (if I want to > handle the buffers myself)? > rxtx does not have buffers. It was not clear to me at the time why there would be a buffer when java already provides buffered input and output streams that can sit on top of rxtx. One reason I can see for implementing buffers in rxtx is to get data off the port so select() can block. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Wed Jan 14 23:23:08 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 15 Jan 2009 08:23:08 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> Message-ID: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Here's the same message for the list also. Forgot to do "Reply to all" ---------- Forwarded message ---------- From: Jaakko Sipari Date: Thu, Jan 15, 2009 at 8:22 AM Subject: Re: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize To: Trent Jarvi On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! >> >> Could someone clarify what these methods actually do and are they even >> implemented? Do I get into trouble with buffer values of 0 (if I want to >> handle the buffers myself)? >> >> > rxtx does not have buffers. It was not clear to me at the time why there > would be a buffer when java already provides buffered input and output > streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data off > the port so select() can block. > So basically those methods have currently no effect at all? - Jaakko -- Jaakko Sipari tel. +358451238191 eMail. jaakko.sipari at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090115/8b4c47c0/attachment-0004.html From tjarvi at qbang.org Thu Jan 15 18:37:12 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 15 Jan 2009 18:37:12 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: On Thu, 15 Jan 2009, Jaakko Sipari wrote: > Here's the same message for the list also. Forgot to do "Reply to all" > > ---------- Forwarded message ---------- > From: Jaakko Sipari > Date: Thu, Jan 15, 2009 at 8:22 AM > Subject: Re: [Rxtx] The functionality behind setInputBufferSize & > setOutputBufferSize > To: Trent Jarvi > > > On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! > > Could someone clarify what these methods actually do > and are they even > implemented? Do I get into trouble with buffer > values of 0 (if I want to > handle the buffers myself)? > > > rxtx does not have buffers. ?It was not clear to me at the time why > there would be a buffer when java already provides buffered input and > output streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data > off the port so select() can block. > > > So basically those methods have currently no effect at all? > Correct. You can use BufferedInputStream and BufferedOutputStream from the Java API once you get the Input/OutputStream from rxtx. But changing the input and output buffer size in rxtx is not going to change behavior. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Fri Jan 16 01:22:37 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Fri, 16 Jan 2009 10:22:37 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> > So basically those methods have currently no effect at all? >> >> > Correct. You can use BufferedInputStream and BufferedOutputStream from the > Java API once you get the Input/OutputStream from rxtx. But changing the > input and output buffer size in rxtx is not going to change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > I assume there still is some kind of buffer in rxtx (or the serial port driver) in case of processing delays. I mean, if the serial port gives data faster than can be read from the Java program using rxtx it isn't just thrown away, right? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090116/3bd9a52e/attachment-0002.html From tjarvi at qbang.org Fri Jan 16 05:17:24 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 16 Jan 2009 05:17:24 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> Message-ID: On Fri, 16 Jan 2009, Jaakko Sipari wrote: > > So basically those methods have currently no effect > at all? > > > Correct. ?You can use BufferedInputStream and BufferedOutputStream > from the Java API once you get the Input/OutputStream from rxtx. ?But > changing the input and output buffer size in rxtx is not going to > change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > > > > I assume there still is some kind of buffer in rxtx (or the serial port > driver) in case of processing delays. I mean, if the serial port gives data > faster than can be read from the Java program using rxtx it isn't just > thrown away, right? > The UART can usually hold a few bytes. The kernel driver can buffer the input. In practice, it works. With Sun commapi, the typical application has 4 buffers between the user and the incomming data. With rxtx, it is 3. BufferedInputStream -> commapi/rxtx -> kernel driver -> UART If you really do run into overflows on the UART, then hardware flow control is what you should be using and tinkering with rxtx to avoid it is not a very sound approach. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0015.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0015.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0013.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0013.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0013.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0013.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0012.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0010.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0010.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0010.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0010.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0010.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0007.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0007.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0007.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment-0006.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0006.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment-0006.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment-0006.html From tjarvi at qbang.org Wed Jan 14 18:56:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 14 Jan 2009 18:56:50 -0700 (MST) Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Message-ID: On Wed, 14 Jan 2009, Jaakko Sipari wrote: > Hi (again)! > > Could someone clarify what these methods actually do and are they even > implemented? Do I get into trouble with buffer values of 0 (if I want to > handle the buffers myself)? > rxtx does not have buffers. It was not clear to me at the time why there would be a buffer when java already provides buffered input and output streams that can sit on top of rxtx. One reason I can see for implementing buffers in rxtx is to get data off the port so select() can block. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Wed Jan 14 23:23:08 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 15 Jan 2009 08:23:08 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> Message-ID: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Here's the same message for the list also. Forgot to do "Reply to all" ---------- Forwarded message ---------- From: Jaakko Sipari Date: Thu, Jan 15, 2009 at 8:22 AM Subject: Re: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize To: Trent Jarvi On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! >> >> Could someone clarify what these methods actually do and are they even >> implemented? Do I get into trouble with buffer values of 0 (if I want to >> handle the buffers myself)? >> >> > rxtx does not have buffers. It was not clear to me at the time why there > would be a buffer when java already provides buffered input and output > streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data off > the port so select() can block. > So basically those methods have currently no effect at all? - Jaakko -- Jaakko Sipari tel. +358451238191 eMail. jaakko.sipari at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090115/8b4c47c0/attachment-0005.html From tjarvi at qbang.org Thu Jan 15 18:37:12 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 15 Jan 2009 18:37:12 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: On Thu, 15 Jan 2009, Jaakko Sipari wrote: > Here's the same message for the list also. Forgot to do "Reply to all" > > ---------- Forwarded message ---------- > From: Jaakko Sipari > Date: Thu, Jan 15, 2009 at 8:22 AM > Subject: Re: [Rxtx] The functionality behind setInputBufferSize & > setOutputBufferSize > To: Trent Jarvi > > > On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! > > Could someone clarify what these methods actually do > and are they even > implemented? Do I get into trouble with buffer > values of 0 (if I want to > handle the buffers myself)? > > > rxtx does not have buffers. ?It was not clear to me at the time why > there would be a buffer when java already provides buffered input and > output streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data > off the port so select() can block. > > > So basically those methods have currently no effect at all? > Correct. You can use BufferedInputStream and BufferedOutputStream from the Java API once you get the Input/OutputStream from rxtx. But changing the input and output buffer size in rxtx is not going to change behavior. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Fri Jan 16 01:22:37 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Fri, 16 Jan 2009 10:22:37 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> > So basically those methods have currently no effect at all? >> >> > Correct. You can use BufferedInputStream and BufferedOutputStream from the > Java API once you get the Input/OutputStream from rxtx. But changing the > input and output buffer size in rxtx is not going to change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > I assume there still is some kind of buffer in rxtx (or the serial port driver) in case of processing delays. I mean, if the serial port gives data faster than can be read from the Java program using rxtx it isn't just thrown away, right? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090116/3bd9a52e/attachment-0003.html From tjarvi at qbang.org Fri Jan 16 05:17:24 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 16 Jan 2009 05:17:24 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> Message-ID: On Fri, 16 Jan 2009, Jaakko Sipari wrote: > > So basically those methods have currently no effect > at all? > > > Correct. ?You can use BufferedInputStream and BufferedOutputStream > from the Java API once you get the Input/OutputStream from rxtx. ?But > changing the input and output buffer size in rxtx is not going to > change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > > > > I assume there still is some kind of buffer in rxtx (or the serial port > driver) in case of processing delays. I mean, if the serial port gives data > faster than can be read from the Java program using rxtx it isn't just > thrown away, right? > The UART can usually hold a few bytes. The kernel driver can buffer the input. In practice, it works. With Sun commapi, the typical application has 4 buffers between the user and the incomming data. With rxtx, it is 3. BufferedInputStream -> commapi/rxtx -> kernel driver -> UART If you really do run into overflows on the UART, then hardware flow control is what you should be using and tinkering with rxtx to avoid it is not a very sound approach. -- Trent Jarvi tjarvi at qbang.org From llowrey at nuclearwinter.com Sun Jan 18 12:49:39 2009 From: llowrey at nuclearwinter.com (Larkin Lowrey) Date: Sun, 18 Jan 2009 13:49:39 -0600 Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain Message-ID: <497387D3.9040201@nuclearwinter.com> After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when running code that uses RXTXComm. The crashes only occur when using 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. As far as I can tell, the crash happens immediately on start. I can't see any evidence of much, if anything, happening before the crash. The code used to work and only stopped working after the "upgrade" to FC10. I have tried RXTX v2.1 and 2.2pre1. Any ideas? Here's the error: # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode linux-amd64) # Problematic frame: # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 --Larkin From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0016.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0016.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0014.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0014.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0014.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0014.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0013.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0011.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0011.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0011.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0011.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0011.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0008.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0008.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0008.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment-0007.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0007.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment-0007.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment-0007.html From tjarvi at qbang.org Wed Jan 14 18:56:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 14 Jan 2009 18:56:50 -0700 (MST) Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Message-ID: On Wed, 14 Jan 2009, Jaakko Sipari wrote: > Hi (again)! > > Could someone clarify what these methods actually do and are they even > implemented? Do I get into trouble with buffer values of 0 (if I want to > handle the buffers myself)? > rxtx does not have buffers. It was not clear to me at the time why there would be a buffer when java already provides buffered input and output streams that can sit on top of rxtx. One reason I can see for implementing buffers in rxtx is to get data off the port so select() can block. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Wed Jan 14 23:23:08 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 15 Jan 2009 08:23:08 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> Message-ID: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Here's the same message for the list also. Forgot to do "Reply to all" ---------- Forwarded message ---------- From: Jaakko Sipari Date: Thu, Jan 15, 2009 at 8:22 AM Subject: Re: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize To: Trent Jarvi On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! >> >> Could someone clarify what these methods actually do and are they even >> implemented? Do I get into trouble with buffer values of 0 (if I want to >> handle the buffers myself)? >> >> > rxtx does not have buffers. It was not clear to me at the time why there > would be a buffer when java already provides buffered input and output > streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data off > the port so select() can block. > So basically those methods have currently no effect at all? - Jaakko -- Jaakko Sipari tel. +358451238191 eMail. jaakko.sipari at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090115/8b4c47c0/attachment-0006.html From tjarvi at qbang.org Thu Jan 15 18:37:12 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 15 Jan 2009 18:37:12 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: On Thu, 15 Jan 2009, Jaakko Sipari wrote: > Here's the same message for the list also. Forgot to do "Reply to all" > > ---------- Forwarded message ---------- > From: Jaakko Sipari > Date: Thu, Jan 15, 2009 at 8:22 AM > Subject: Re: [Rxtx] The functionality behind setInputBufferSize & > setOutputBufferSize > To: Trent Jarvi > > > On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! > > Could someone clarify what these methods actually do > and are they even > implemented? Do I get into trouble with buffer > values of 0 (if I want to > handle the buffers myself)? > > > rxtx does not have buffers. ?It was not clear to me at the time why > there would be a buffer when java already provides buffered input and > output streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data > off the port so select() can block. > > > So basically those methods have currently no effect at all? > Correct. You can use BufferedInputStream and BufferedOutputStream from the Java API once you get the Input/OutputStream from rxtx. But changing the input and output buffer size in rxtx is not going to change behavior. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Fri Jan 16 01:22:37 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Fri, 16 Jan 2009 10:22:37 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> > So basically those methods have currently no effect at all? >> >> > Correct. You can use BufferedInputStream and BufferedOutputStream from the > Java API once you get the Input/OutputStream from rxtx. But changing the > input and output buffer size in rxtx is not going to change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > I assume there still is some kind of buffer in rxtx (or the serial port driver) in case of processing delays. I mean, if the serial port gives data faster than can be read from the Java program using rxtx it isn't just thrown away, right? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090116/3bd9a52e/attachment-0004.html From tjarvi at qbang.org Fri Jan 16 05:17:24 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 16 Jan 2009 05:17:24 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> Message-ID: On Fri, 16 Jan 2009, Jaakko Sipari wrote: > > So basically those methods have currently no effect > at all? > > > Correct. ?You can use BufferedInputStream and BufferedOutputStream > from the Java API once you get the Input/OutputStream from rxtx. ?But > changing the input and output buffer size in rxtx is not going to > change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > > > > I assume there still is some kind of buffer in rxtx (or the serial port > driver) in case of processing delays. I mean, if the serial port gives data > faster than can be read from the Java program using rxtx it isn't just > thrown away, right? > The UART can usually hold a few bytes. The kernel driver can buffer the input. In practice, it works. With Sun commapi, the typical application has 4 buffers between the user and the incomming data. With rxtx, it is 3. BufferedInputStream -> commapi/rxtx -> kernel driver -> UART If you really do run into overflows on the UART, then hardware flow control is what you should be using and tinkering with rxtx to avoid it is not a very sound approach. -- Trent Jarvi tjarvi at qbang.org From llowrey at nuclearwinter.com Sun Jan 18 12:49:39 2009 From: llowrey at nuclearwinter.com (Larkin Lowrey) Date: Sun, 18 Jan 2009 13:49:39 -0600 Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain Message-ID: <497387D3.9040201@nuclearwinter.com> After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when running code that uses RXTXComm. The crashes only occur when using 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. As far as I can tell, the crash happens immediately on start. I can't see any evidence of much, if anything, happening before the crash. The code used to work and only stopped working after the "upgrade" to FC10. I have tried RXTX v2.1 and 2.2pre1. Any ideas? Here's the error: # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode linux-amd64) # Problematic frame: # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 --Larkin From tjarvi at qbang.org Mon Jan 19 17:48:34 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 19 Jan 2009 17:48:34 -0700 (MST) Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain In-Reply-To: <497387D3.9040201@nuclearwinter.com> References: <497387D3.9040201@nuclearwinter.com> Message-ID: On Sun, 18 Jan 2009, Larkin Lowrey wrote: > After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when > running code that uses RXTXComm. The crashes only occur when using > 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. > > As far as I can tell, the crash happens immediately on start. I can't > see any evidence of much, if anything, happening before the crash. > > The code used to work and only stopped working after the "upgrade" to > FC10. I have tried RXTX v2.1 and 2.2pre1. > > Any ideas? > > Here's the error: > > # > # An unexpected error has been detected by Java Runtime Environment: > # > # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 > # > # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode > linux-amd64) > # Problematic frame: > # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 > > > --Larkin Hi Larkin, I can think of 2 segv's in rxtx that may apply. Both are fixed in rxtx 2.2pre.. The first was that pointers required by nativeDrain needed to be stored in something larger than a 32 bit integer in java. This resulted in a crash like you see the first time the 'nativedrain' thread tried to use the pointer. The second was a concurrency issue George resolved with synchronization. The crash was usually during close but happened in the 'nativedrain' thread. (eventLoop) As mentioned, these are both fixed in the prerelease. There is a class provided in recent versions of RXTX that allow you confirm the version being used: gnu.io.RXTXVersion with member methods getVersion() and nativeGetVersion(). This allows you to confirm that you are indeed using the version you think you are. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0017.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0017.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0015.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0015.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0015.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0015.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0014.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0012.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0012.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0012.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0012.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0012.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0009.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0009.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0009.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment-0008.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0008.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment-0008.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment-0008.html From tjarvi at qbang.org Wed Jan 14 18:56:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 14 Jan 2009 18:56:50 -0700 (MST) Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Message-ID: On Wed, 14 Jan 2009, Jaakko Sipari wrote: > Hi (again)! > > Could someone clarify what these methods actually do and are they even > implemented? Do I get into trouble with buffer values of 0 (if I want to > handle the buffers myself)? > rxtx does not have buffers. It was not clear to me at the time why there would be a buffer when java already provides buffered input and output streams that can sit on top of rxtx. One reason I can see for implementing buffers in rxtx is to get data off the port so select() can block. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Wed Jan 14 23:23:08 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 15 Jan 2009 08:23:08 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> Message-ID: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Here's the same message for the list also. Forgot to do "Reply to all" ---------- Forwarded message ---------- From: Jaakko Sipari Date: Thu, Jan 15, 2009 at 8:22 AM Subject: Re: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize To: Trent Jarvi On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! >> >> Could someone clarify what these methods actually do and are they even >> implemented? Do I get into trouble with buffer values of 0 (if I want to >> handle the buffers myself)? >> >> > rxtx does not have buffers. It was not clear to me at the time why there > would be a buffer when java already provides buffered input and output > streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data off > the port so select() can block. > So basically those methods have currently no effect at all? - Jaakko -- Jaakko Sipari tel. +358451238191 eMail. jaakko.sipari at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090115/8b4c47c0/attachment-0007.html From tjarvi at qbang.org Thu Jan 15 18:37:12 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 15 Jan 2009 18:37:12 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: On Thu, 15 Jan 2009, Jaakko Sipari wrote: > Here's the same message for the list also. Forgot to do "Reply to all" > > ---------- Forwarded message ---------- > From: Jaakko Sipari > Date: Thu, Jan 15, 2009 at 8:22 AM > Subject: Re: [Rxtx] The functionality behind setInputBufferSize & > setOutputBufferSize > To: Trent Jarvi > > > On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! > > Could someone clarify what these methods actually do > and are they even > implemented? Do I get into trouble with buffer > values of 0 (if I want to > handle the buffers myself)? > > > rxtx does not have buffers. ?It was not clear to me at the time why > there would be a buffer when java already provides buffered input and > output streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data > off the port so select() can block. > > > So basically those methods have currently no effect at all? > Correct. You can use BufferedInputStream and BufferedOutputStream from the Java API once you get the Input/OutputStream from rxtx. But changing the input and output buffer size in rxtx is not going to change behavior. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Fri Jan 16 01:22:37 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Fri, 16 Jan 2009 10:22:37 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> > So basically those methods have currently no effect at all? >> >> > Correct. You can use BufferedInputStream and BufferedOutputStream from the > Java API once you get the Input/OutputStream from rxtx. But changing the > input and output buffer size in rxtx is not going to change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > I assume there still is some kind of buffer in rxtx (or the serial port driver) in case of processing delays. I mean, if the serial port gives data faster than can be read from the Java program using rxtx it isn't just thrown away, right? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090116/3bd9a52e/attachment-0005.html From tjarvi at qbang.org Fri Jan 16 05:17:24 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 16 Jan 2009 05:17:24 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> Message-ID: On Fri, 16 Jan 2009, Jaakko Sipari wrote: > > So basically those methods have currently no effect > at all? > > > Correct. ?You can use BufferedInputStream and BufferedOutputStream > from the Java API once you get the Input/OutputStream from rxtx. ?But > changing the input and output buffer size in rxtx is not going to > change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > > > > I assume there still is some kind of buffer in rxtx (or the serial port > driver) in case of processing delays. I mean, if the serial port gives data > faster than can be read from the Java program using rxtx it isn't just > thrown away, right? > The UART can usually hold a few bytes. The kernel driver can buffer the input. In practice, it works. With Sun commapi, the typical application has 4 buffers between the user and the incomming data. With rxtx, it is 3. BufferedInputStream -> commapi/rxtx -> kernel driver -> UART If you really do run into overflows on the UART, then hardware flow control is what you should be using and tinkering with rxtx to avoid it is not a very sound approach. -- Trent Jarvi tjarvi at qbang.org From llowrey at nuclearwinter.com Sun Jan 18 12:49:39 2009 From: llowrey at nuclearwinter.com (Larkin Lowrey) Date: Sun, 18 Jan 2009 13:49:39 -0600 Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain Message-ID: <497387D3.9040201@nuclearwinter.com> After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when running code that uses RXTXComm. The crashes only occur when using 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. As far as I can tell, the crash happens immediately on start. I can't see any evidence of much, if anything, happening before the crash. The code used to work and only stopped working after the "upgrade" to FC10. I have tried RXTX v2.1 and 2.2pre1. Any ideas? Here's the error: # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode linux-amd64) # Problematic frame: # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 --Larkin From tjarvi at qbang.org Mon Jan 19 17:48:34 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 19 Jan 2009 17:48:34 -0700 (MST) Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain In-Reply-To: <497387D3.9040201@nuclearwinter.com> References: <497387D3.9040201@nuclearwinter.com> Message-ID: On Sun, 18 Jan 2009, Larkin Lowrey wrote: > After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when > running code that uses RXTXComm. The crashes only occur when using > 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. > > As far as I can tell, the crash happens immediately on start. I can't > see any evidence of much, if anything, happening before the crash. > > The code used to work and only stopped working after the "upgrade" to > FC10. I have tried RXTX v2.1 and 2.2pre1. > > Any ideas? > > Here's the error: > > # > # An unexpected error has been detected by Java Runtime Environment: > # > # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 > # > # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode > linux-amd64) > # Problematic frame: > # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 > > > --Larkin Hi Larkin, I can think of 2 segv's in rxtx that may apply. Both are fixed in rxtx 2.2pre.. The first was that pointers required by nativeDrain needed to be stored in something larger than a 32 bit integer in java. This resulted in a crash like you see the first time the 'nativedrain' thread tried to use the pointer. The second was a concurrency issue George resolved with synchronization. The crash was usually during close but happened in the 'nativedrain' thread. (eventLoop) As mentioned, these are both fixed in the prerelease. There is a class provided in recent versions of RXTX that allow you confirm the version being used: gnu.io.RXTXVersion with member methods getVersion() and nativeGetVersion(). This allows you to confirm that you are indeed using the version you think you are. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0018.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0018.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0016.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0016.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0016.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0016.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0015.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0013.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0013.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0013.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0013.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0013.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0010.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0010.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0010.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment-0009.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0009.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment-0009.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment-0009.html From tjarvi at qbang.org Wed Jan 14 18:56:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 14 Jan 2009 18:56:50 -0700 (MST) Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Message-ID: On Wed, 14 Jan 2009, Jaakko Sipari wrote: > Hi (again)! > > Could someone clarify what these methods actually do and are they even > implemented? Do I get into trouble with buffer values of 0 (if I want to > handle the buffers myself)? > rxtx does not have buffers. It was not clear to me at the time why there would be a buffer when java already provides buffered input and output streams that can sit on top of rxtx. One reason I can see for implementing buffers in rxtx is to get data off the port so select() can block. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Wed Jan 14 23:23:08 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 15 Jan 2009 08:23:08 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> Message-ID: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Here's the same message for the list also. Forgot to do "Reply to all" ---------- Forwarded message ---------- From: Jaakko Sipari Date: Thu, Jan 15, 2009 at 8:22 AM Subject: Re: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize To: Trent Jarvi On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! >> >> Could someone clarify what these methods actually do and are they even >> implemented? Do I get into trouble with buffer values of 0 (if I want to >> handle the buffers myself)? >> >> > rxtx does not have buffers. It was not clear to me at the time why there > would be a buffer when java already provides buffered input and output > streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data off > the port so select() can block. > So basically those methods have currently no effect at all? - Jaakko -- Jaakko Sipari tel. +358451238191 eMail. jaakko.sipari at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090115/8b4c47c0/attachment-0008.html From tjarvi at qbang.org Thu Jan 15 18:37:12 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 15 Jan 2009 18:37:12 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: On Thu, 15 Jan 2009, Jaakko Sipari wrote: > Here's the same message for the list also. Forgot to do "Reply to all" > > ---------- Forwarded message ---------- > From: Jaakko Sipari > Date: Thu, Jan 15, 2009 at 8:22 AM > Subject: Re: [Rxtx] The functionality behind setInputBufferSize & > setOutputBufferSize > To: Trent Jarvi > > > On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! > > Could someone clarify what these methods actually do > and are they even > implemented? Do I get into trouble with buffer > values of 0 (if I want to > handle the buffers myself)? > > > rxtx does not have buffers. ?It was not clear to me at the time why > there would be a buffer when java already provides buffered input and > output streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data > off the port so select() can block. > > > So basically those methods have currently no effect at all? > Correct. You can use BufferedInputStream and BufferedOutputStream from the Java API once you get the Input/OutputStream from rxtx. But changing the input and output buffer size in rxtx is not going to change behavior. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Fri Jan 16 01:22:37 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Fri, 16 Jan 2009 10:22:37 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> > So basically those methods have currently no effect at all? >> >> > Correct. You can use BufferedInputStream and BufferedOutputStream from the > Java API once you get the Input/OutputStream from rxtx. But changing the > input and output buffer size in rxtx is not going to change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > I assume there still is some kind of buffer in rxtx (or the serial port driver) in case of processing delays. I mean, if the serial port gives data faster than can be read from the Java program using rxtx it isn't just thrown away, right? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090116/3bd9a52e/attachment-0006.html From tjarvi at qbang.org Fri Jan 16 05:17:24 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 16 Jan 2009 05:17:24 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> Message-ID: On Fri, 16 Jan 2009, Jaakko Sipari wrote: > > So basically those methods have currently no effect > at all? > > > Correct. ?You can use BufferedInputStream and BufferedOutputStream > from the Java API once you get the Input/OutputStream from rxtx. ?But > changing the input and output buffer size in rxtx is not going to > change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > > > > I assume there still is some kind of buffer in rxtx (or the serial port > driver) in case of processing delays. I mean, if the serial port gives data > faster than can be read from the Java program using rxtx it isn't just > thrown away, right? > The UART can usually hold a few bytes. The kernel driver can buffer the input. In practice, it works. With Sun commapi, the typical application has 4 buffers between the user and the incomming data. With rxtx, it is 3. BufferedInputStream -> commapi/rxtx -> kernel driver -> UART If you really do run into overflows on the UART, then hardware flow control is what you should be using and tinkering with rxtx to avoid it is not a very sound approach. -- Trent Jarvi tjarvi at qbang.org From llowrey at nuclearwinter.com Sun Jan 18 12:49:39 2009 From: llowrey at nuclearwinter.com (Larkin Lowrey) Date: Sun, 18 Jan 2009 13:49:39 -0600 Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain Message-ID: <497387D3.9040201@nuclearwinter.com> After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when running code that uses RXTXComm. The crashes only occur when using 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. As far as I can tell, the crash happens immediately on start. I can't see any evidence of much, if anything, happening before the crash. The code used to work and only stopped working after the "upgrade" to FC10. I have tried RXTX v2.1 and 2.2pre1. Any ideas? Here's the error: # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode linux-amd64) # Problematic frame: # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 --Larkin From tjarvi at qbang.org Mon Jan 19 17:48:34 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 19 Jan 2009 17:48:34 -0700 (MST) Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain In-Reply-To: <497387D3.9040201@nuclearwinter.com> References: <497387D3.9040201@nuclearwinter.com> Message-ID: On Sun, 18 Jan 2009, Larkin Lowrey wrote: > After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when > running code that uses RXTXComm. The crashes only occur when using > 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. > > As far as I can tell, the crash happens immediately on start. I can't > see any evidence of much, if anything, happening before the crash. > > The code used to work and only stopped working after the "upgrade" to > FC10. I have tried RXTX v2.1 and 2.2pre1. > > Any ideas? > > Here's the error: > > # > # An unexpected error has been detected by Java Runtime Environment: > # > # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 > # > # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode > linux-amd64) > # Problematic frame: > # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 > > > --Larkin Hi Larkin, I can think of 2 segv's in rxtx that may apply. Both are fixed in rxtx 2.2pre.. The first was that pointers required by nativeDrain needed to be stored in something larger than a 32 bit integer in java. This resulted in a crash like you see the first time the 'nativedrain' thread tried to use the pointer. The second was a concurrency issue George resolved with synchronization. The crash was usually during close but happened in the 'nativedrain' thread. (eventLoop) As mentioned, these are both fixed in the prerelease. There is a class provided in recent versions of RXTX that allow you confirm the version being used: gnu.io.RXTXVersion with member methods getVersion() and nativeGetVersion(). This allows you to confirm that you are indeed using the version you think you are. -- Trent Jarvi tjarvi at qbang.org From alexandrepoletto at gmail.com Wed Jan 21 11:48:07 2009 From: alexandrepoletto at gmail.com (Alexandre Poletto) Date: Wed, 21 Jan 2009 16:48:07 -0200 Subject: [Rxtx] work in windows but dont work in linux Message-ID: hi folks, I have an application to communicate with the serial port using rxtx, in the windows os my application works well, but when i try to run in the linux os i open the port (in windows "COM1", in Linux "/dev/ttyS0") send my commandes but i never receive any answer. I'm using ubuntu 8.10 and java 1.5, there is any configuration in that i'm missing? Thanks for the help! ps: Sorry form my bad english :( -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/70baea51/attachment.html From jmudd at dtiweb.net Wed Jan 21 14:08:04 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Wed, 21 Jan 2009 16:08:04 -0500 Subject: [Rxtx] Hot unplugging of a USB device Message-ID: Looking to see if the issues surrounding an uplugging of a USB device have been resolved. I see from the mail list archives and bug reports that others have noted this issue. I have a USB GPS Receiver that is plugged into a Windows (XP) system and am using Netbeans 6.5 and Java jdk 1.6 and RXTX 2.1.7 and 2.2pre1. In the thread that is reading data via listening for a SerialEvent I can capture a Java IOException: No error in readArray. The application is essentially hung at this point. Only a termination of the application will clear it up and not leave the port hung. I had read in the archives that this is because the event loop in the native code portion is continually putting out the exceptions. I had also seen that this might be addressed in future releases. Any help is appreciated. Thanks, Jerry ________________________________ Jerry Mudd Senior Programmer 21795 Shangri-La Drive, Ste C Lexington Park, MD 20653 (301) 737-8893 (301) 737-8897 Fax jmudd at dtiweb.net www.dtiweb.net This message may contain sensitive, proprietary and/or privileged information. Disclosure is not authorized unless provided in writing by Defense Technologies, Inc. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 6296 bytes Desc: image001.gif Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0001.gif From netbeans at gatworks.com Wed Jan 21 17:33:46 2009 From: netbeans at gatworks.com (U. George) Date: Wed, 21 Jan 2009 19:33:46 -0500 Subject: [Rxtx] Hot unplugging of a USB device In-Reply-To: References: Message-ID: <4977BEEA.4020708@gatworks.com> > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:34 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:34 +1100 Subject: [Rxtx] Part 1 of 2 parts re rxtx 2.2 pre.. and OSX Message-ID: Hi, I have tried out the latest version of rxtx on a mac and can report that running with ImageJ (32 bit ) all seems to be fine. However when I attempt to use it with ImageJ64, I get a crash whenever the serial port is used. The details follow. What I did. Ran our plug-in in ImageJ 64 bit (1.42g) for Measuring, which is using the latest rxtx (the beta 2.2 compiled on 30 December 2008) for MacOSX 10.5.x) I installed this by putting the two files in the directory ~ LIBRARY/JAVA/EXTENSIONS. The Plug-in uses the serial port. The window we put up to show the numbers from the stage appeared, but only with the default "0" (zero) in each row, which is what we put there until we get data back from the port and the device attached. Then it crashed. I should point out that this all works fine using ImageJ (32 bit) 1.42g, on the same platform. So the only difference is the use of ImageJ 64 bit, and I guess the version of rxtx for 64 bit. I hope that cleverer people than me can throw some light onto this little problem. ImageJ64 seems to work ok until rxtx is called, although I haven't tried much so far, just some 3D rendering with 1 Gb of image data, which all went well, apart from the fact that the data was marginal. I am now showing the data supplied by the report to Apple window. This has three tabs, one to write your information in, one called Problem Details, and the third called SYSTEM CONFIG. These are pasted in below. Best wishes Noel Problem Details Process: JavaApplicationStub [463] Path: /Applications/ImageJ/ImageJ64.app/Contents/MacOS/JavaApplicationStub Identifier: gov.nih.info.rsb.ImageJ Version: ??? (10.2) Code Type: X86-64 (Native) Parent Process: launchd [398] Date/Time: 2009-01-19 10:48:09.342 +1100 OS Version: Mac OS X 10.5.6 (9G55) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000000029507c8 Crashed Thread: 16 Application Specific Information: Java information: Exception type: Bus Error (0xa) at pc=0x00000006ff70f418 Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0_07-b06-57 mixed mode macosx-amd64) Current thread (0x00000001020de800): JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] Stack: [0x0000000702851000,0x0000000702951000] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j gnu.io.RXTXPort.readByte()I+0 j gnu.io.RXTXPort$SerialInputStream.read()I+81 j SerialConnection.serialEvent(Lgnu/io/SerialPortEvent;)V+41 j gnu.io.RXTXPort.sendEvent(IZ)Z+382 v ~BufferBlob::StubRoutines (1) j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~BufferBlob::StubRoutines (1) Java Threads: ( => current thread ) =>0x00000001020de800 JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] 0x00000001020e8800 JavaThread "Measure XYZ" [_thread_blocked, id=44384256, stack(0x0000000702954000,0x0000000702a54000)] 0x0000000102001000 JavaThread "DestroyJavaVM" [_thread_blocked, id=25169920, stack(0x0000000101001000,0x0000000101801000)] 0x00000001020da800 JavaThread "SocketListener" [_thread_in_native, id=29671424, stack(0x0000000701b4c000,0x0000000701c4c000)] 0x00000001020b4800 JavaThread "AWT-EventQueue-0" [_thread_in_Java, id=-27992064, stack(0x00000006fe44e000,0x00000006fe54e000)] 0x0000000102096000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=-34344960, stack(0x00000006fde3f000,0x00000006fdf3f000)] 0x0000000102078000 JavaThread "AWT-Shutdown" [_thread_blocked, id=-58392576, stack(0x00000006fc750000,0x00000006fc850000)] 0x0000000102077800 JavaThread "AWT-AppKit" daemon [_thread_in_native, id=1886770976, stack(0x00007fff5f400000,0x00007fff5fc00000)] 0x0000000102044800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=-333877248, stack(0x00000006ec097000,0x00000006ec197000)] 0x0000000102043000 JavaThread "CompilerThread1" daemon [_thread_blocked, id=-334938112, stack(0x00000006ebf94000,0x00000006ec094000)] 0x0000000102041800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=-335998976, stack(0x00000006ebe91000,0x00000006ebf91000)] 0x0000000102041000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=-337059840, stack(0x00000006ebd8e000,0x00000006ebe8e000)] 0x0000000102029800 JavaThread "Finalizer" daemon [_thread_blocked, id=-338214912, stack(0x00000006ebc74000,0x00000006ebd74000)] 0x0000000102028800 JavaThread "Reference Handler" daemon [_thread_blocked, id=-339333120, stack(0x00000006ebb63000,0x00000006ebc63000)] Other Threads: 0x0000000102020800 VMThread [stack: 0x00000006eba60000,0x00000006ebb60000] [id=-340393984] 0x0000000102046000 WatcherThread [stack: 0x00000006ec19a000,0x00000006ec29a000] [id=-332816384] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 76480K, used 14448K [0x0000000105800000, 0x000000010ad50000, 0x00000002f9800000) eden space 65600K, 22% used [0x0000000105800000, 0x000000010661c398, 0x0000000109810000) from space 10880K, 0% used [0x0000000109810000, 0x0000000109810000, 0x000000010a2b0000) to space 10880K, 0% used [0x000000010a2b0000, 0x000000010a2b0000, 0x000000010ad50000) tenured generation total 174784K, used 0K [0x00000002f9800000, 0x00000003042b0000, 0x00000006e1800000) the space 174784K, 0% used [0x00000002f9800000, 0x00000002f9800000, 0x00000002f9800200, 0x00000003042b0000) compacting perm gen total 21248K, used 10319K [0x00000006e1800000, 0x00000006e2cc0000, 0x00000006e6c00000) the space 21248K, 48% used [0x00000006e1800000, 0x00000006e2213d28, 0x00000006e2213e00, 0x00000006e2cc0000) No shared spaces configured. Virtual Machine Arguments: JVM Args: -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher. framework/Resources/LauncherSupport.jar -Xms256m -Xmx24000m -Dcom.apple.macos.useScreenMenuBar=false -Dcom.apple.mrj.application.growbox.intrudes=false -Dcom.apple.mrj.application.live-resize=true -Dcom.apple.hwaccel=false -Dapple.awt.Antialiasing=false -Dcom.apple.smallTabs=true -Dapple.awt.brushMetalLook=false Java Command: Launcher Type: generic Physical Memory: Page Size = 4k, Total = 2048M, Free = 30996M Thread 0: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 com.apple.CoreFoundation 0x00007fff8204dc4f CFRunLoopRunSpecific + 1631 3 com.apple.HIToolbox 0x00007fff839fdda2 RunCurrentEventLoopInMode + 278 4 com.apple.HIToolbox 0x00007fff839fdbd8 ReceiveNextEventCommon + 322 5 com.apple.HIToolbox 0x00007fff839fda83 BlockUntilNextEventMatchingListInMode + 79 6 com.apple.AppKit 0x00007fff8299d3b0 _DPSNextEvent + 603 7 com.apple.AppKit 0x00007fff8299ccf1 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 136 8 com.apple.AppKit 0x00007fff82996a84 -[NSApplication run] + 455 9 libawt.jnilib 0x00000006ec433257 +[AWTStarter startAWT:] + 1343 10 libawt.jnilib 0x00000006ec432c46 -[CPerformer perform] + 112 11 com.apple.Foundation 0x00007fff8153f2b4 __NSThreadPerformPerform + 148 12 com.apple.CoreFoundation 0x00007fff8204e0e8 CFRunLoopRunSpecific + 2808 13 ...ple.JavaApplicationLauncher 0x0000000100005165 startupJava(LauncherArgsStruct*) + 235 14 ...ple.JavaApplicationLauncher 0x000000010000579c launchJavaApplication + 1224 15 JavaApplicationStub 0x0000000100000b9c 0x100000000 + 2972 Thread 1: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x0000000101a93b61 JVM_GetCPFieldModifiers + 128961 5 libjvm.dylib 0x0000000101a93a36 JVM_GetCPFieldModifiers + 128662 6 ...ple.JavaApplicationLauncher 0x000000010000c0ce startJavaApplication + 2886 7 ...ple.JavaApplicationLauncher 0x000000010000506d java_main_stub(void*) + 9 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 2: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libSystem.B.dylib 0x00007fff840db0b0 mach_msg_server + 436 3 libjvm.dylib 0x000000010181176d JNI_CreateJavaVM_Impl + 53277 4 libjvm.dylib 0x0000000101811375 JNI_CreateJavaVM_Impl + 52261 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 3: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x00000001018e452f JVM_Lseek + 235727 5 libjvm.dylib 0x00000001018e42df JVM_Lseek + 235135 6 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 7 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 8 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 4: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x00000001028003ea 0 + 4336911338 11 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 12 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 13 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 14 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 15 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 16 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 17 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 18 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 19 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 20 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 5: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 6: 0 libSystem.B.dylib 0x00007fff8406dd72 semaphore_wait_trap + 10 1 libjvm.dylib 0x0000000101915bdb JVM_IsPrimitiveClass + 12139 2 libjvm.dylib 0x00000001019155b5 JVM_IsPrimitiveClass + 10565 3 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 4 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 7: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 8: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 9: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x0000000101918ec8 JVM_IsPrimitiveClass + 25176 5 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 6 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 7 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 10: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x000000010191abb5 JVM_IsPrimitiveClass + 32581 4 libjvm.dylib 0x000000010191a70a JVM_IsPrimitiveClass + 31386 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 11: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 12: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x0000000102803414 0 + 4336923668 12 ??? 0x00000001028003ea 0 + 4336911338 13 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 14 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 15 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 16 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 17 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 18 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 19 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 20 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 21 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 22 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 13: 0 ??? 0x0000000102817034 0 + 4337004596 1 ??? 0x000000010280304e 0 + 4336922702 2 ??? 0x0000000102803093 0 + 4336922771 3 ??? 0x000000010280356d 0 + 4336924013 4 ??? 0x0000000102803093 0 + 4336922771 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x000000010280356d 0 + 4336924013 8 ??? 0x0000000102803093 0 + 4336922771 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x0000000102802f3a 0 + 4336922426 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102802f3a 0 + 4336922426 14 ??? 0x0000000102802f3a 0 + 4336922426 15 ??? 0x0000000102803162 0 + 4336922978 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102802f3a 0 + 4336922426 19 ??? 0x0000000102802f3a 0 + 4336922426 20 ??? 0x00000001028003ea 0 + 4336911338 21 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 22 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 23 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 24 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 25 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 26 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 27 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 28 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 29 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 30 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 14: 0 libSystem.B.dylib 0x00007fff840f210e accept + 10 1 libnet.jnilib 0x00000006ff6b6b11 Java_java_net_PlainSocketImpl_socketAccept + 277 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x0000000102802f3a 0 + 4336922426 4 ??? 0x0000000102802f3a 0 + 4336922426 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x0000000102803414 0 + 4336923668 8 ??? 0x00000001028003ea 0 + 4336911338 9 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 10 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 11 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 12 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 13 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 14 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 15 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 16 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 17 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 18 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 15: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x000000010280304e 0 + 4336922702 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102803414 0 + 4336923668 14 ??? 0x0000000102803093 0 + 4336922771 15 ??? 0x0000000102803093 0 + 4336922771 16 ??? 0x0000000102803093 0 + 4336922771 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102803414 0 + 4336923668 19 ??? 0x00000001028003ea 0 + 4336911338 20 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 21 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 22 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 23 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 24 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 25 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 26 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 27 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 28 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 29 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 Crashed: 0 librxtxSerial.jnilib 0x00000006ff70f418 read_byte_array + 68 1 librxtxSerial.jnilib 0x00000006ff70f9b3 Java_gnu_io_RXTXPort_readByte + 93 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x000000010280304e 0 + 4336922702 4 ??? 0x000000010280304e 0 + 4336922702 5 ??? 0x0000000102803414 0 + 4336923668 6 ??? 0x00000001028003ea 0 + 4336911338 7 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 8 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 9 libjvm.dylib 0x00000001018e5be8 JVM_Lseek + 241544 10 libjvm.dylib 0x0000000101900b11 JVM_MonitorWait + 17249 11 libjvm.dylib 0x0000000101a1e59e JVM_DisableCompiler + 1166 12 librxtxSerial.jnilib 0x00000006ff70d91e send_event + 132 13 librxtxSerial.jnilib 0x00000006ff70e82b report_serial_events + 92 14 librxtxSerial.jnilib 0x00000006ff7108c9 Java_gnu_io_RXTXPort_eventLoop + 237 15 ??? 0x000000010280e878 0 + 4336969848 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x00000001028003ea 0 + 4336911338 18 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 19 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 20 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 21 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 22 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 23 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 24 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 25 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 26 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 27 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 17: 0 libSystem.B.dylib 0x00007fff84074d02 __semwait_signal + 10 1 libSystem.B.dylib 0x00007fff840dce91 usleep + 57 2 librxtxSerial.jnilib 0x00000006ff70d729 drain_loop + 45 3 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 4 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 crashed with X86 Thread State (64-bit): rax: 0x00000000029507c0 rbx: 0x0000000000000041 rcx: 0x0000000000000065 rdx: 0x0000000000000002 rdi: 0x00000006ff71205e rsi: 0x00000006ff711c67 rbp: 0x0000000702950000 rsp: 0x000000070294fef0 r8: 0x000000000000004d r9: 0x00000006e21d64c0 r10: 0x00000006e21d38e8 r11: 0x00000000000000d2 r12: 0x00000001020de998 r13: 0x00000006e21d93b0 r14: 0x0000000000000032 r15: 0x00000000029507c0 rip: 0x00000006ff70f418 rfl: 0x0000000000010202 cr2: 0x00000000029507c8 Continued in the message part 2 -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:41 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:41 +1100 Subject: [Rxtx] Part 2 re rxtx 2.2 pre... and MacOSX Message-ID: Continued from Part 1. Binary Images: 0x100000000 - 0x100000fff JavaApplicationStub ??? (???) /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationS tub 0x100004000 - 0x100011fff com.apple.JavaApplicationLauncher 12.2.0 (12.2.0) /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/JavaApplicationLauncher 0x10001a000 - 0x100022ffd com.apple.JavaVM 12.2.0 (12.2.0) <2b178e8d4bbcc0aa427c2f3f71bb2fcb> /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM 0x100055000 - 0x10005dff0 libverify.dylib ??? (???) <56eac95084cb86cd1339a721b1353182> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libveri fy.dylib 0x100063000 - 0x10006cffb JavaNativeFoundation ??? (???) <68ca6409dc49542301edda1e0744ac69> /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNative Foundation.framework/Versions/A/JavaNativeFoundation 0x1000a8000 - 0x1000c7fef libjava.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjava .jnilib 0x1000d8000 - 0x1000e5ffb libzip.jnilib ??? (???) <5b6dce7c9a1f25aa5dff1a633c9dc342> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libzip. jnilib 0x101803000 - 0x101eafff3 libjvm.dylib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bundle/Libra ries/libjvm.dylib 0x6ec2c5000 - 0x6ec2c6fff liblauncher.jnilib ??? (???) <567fa54a222b965b2c4aefea21d9800a> /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/Resources/liblauncher.jnilib 0x6ec431000 - 0x6ec5e4fff libawt.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libawt. jnilib 0x6fdc3b000 - 0x6fdc3cfff ATSHI.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/Resources/ATSHI.dylib 0x6fdd6e000 - 0x6fdd6efff libcmm.jnilib ??? (???) <114e1a620a6920d77bf09bd57a7f7d52> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libcmm. jnilib 0x6fdd9e000 - 0x6fde1fff7 libfontmanager.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libfont manager.jnilib 0x6fdf41000 - 0x6fdf8ffff libsuncmm.jnilib ??? (???) <47330f1f17822de3a5cf921e07615cf7> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libsunc mm.jnilib 0x6fdf95000 - 0x6fdfc4ff7 libjpeg.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjpeg .jnilib 0x6ff6ae000 - 0x6ff6baffb libnet.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnet. jnilib 0x6ff6c0000 - 0x6ff6c4fff libnio.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnio. jnilib 0x6ff6d4000 - 0x6ff6e8ff7 libdcpr.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libdcpr .jnilib 0x6ff70c000 - 0x6ff713fff +librxtxSerial.jnilib ??? (???) <5133deacebd01ceab7d528c541241956> /Library/Java/Extensions/librxtxSerial.jnilib 0x6ff734000 - 0x6ff74bfef libJapaneseConverter.dylib ??? (???) <64cca6bb4650a269f49a8427507e4963> /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib 0x70204f000 - 0x702218fef com.apple.RawCamera.bundle 2.0.10 (2.0.10) /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera 0x7fff5fc00000 - 0x7fff5fc2e643 dyld 97.1 (???) /usr/lib/dyld 0x7fff80003000 - 0x7fff80146ffb com.apple.audio.toolbox.AudioToolbox 1.5.2 (1.5.2) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x7fff801d2000 - 0x7fff801d5ffb com.apple.help 1.1 (36) <9000c05ccad96fdcc25bc35264abf587> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.frame work/Versions/A/Help 0x7fff801d6000 - 0x7fff80211fff com.apple.AE 402.2 (402.2) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.f ramework/Versions/A/AE 0x7fff80212000 - 0x7fff80257fef libRIP.A.dylib ??? (???) <8c818d7fd3dc57839ac48caf107ff4c0> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x7fff80258000 - 0x7fff8029bfef com.apple.QD 3.11.54 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/QD.framework/Versions/A/QD 0x7fff8029c000 - 0x7fff802dffef libTIFF.dylib ??? (???) <86be7909f46cc044a887cbb60ab7826d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x7fff802e0000 - 0x7fff803d4fff libobjc.A.dylib ??? (???) <118dc1ae05e685ad64290352fc94f1f0> /usr/lib/libobjc.A.dylib 0x7fff803d5000 - 0x7fff8045dfe7 libsqlite3.0.dylib ??? (???) <3c7ab3523b816dbd3e039ee7e6e2c580> /usr/lib/libsqlite3.0.dylib 0x7fff8045e000 - 0x7fff80466ffa libbsm.dylib ??? (???) <4d838c0d8a74fe61c781a53a8723303d> /usr/lib/libbsm.dylib 0x7fff80467000 - 0x7fff80497fff com.apple.shortcut 1 (1.0) <9822328df9321a661af3afcc841e8f80> /System/Library/PrivateFrameworks/Shortcut.framework/Versions/A/Shortcut 0x7fff80498000 - 0x7fff8049bfff com.apple.securityhi 3.0 (30817) <00ddd6e60692b62b7649573eab8aef5a> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI .framework/Versions/A/SecurityHI 0x7fff8049c000 - 0x7fff8049efff com.apple.print.framework.Print 218.0.2 (220.1) <2b847a0a1cd885f596a4d10409d50ba3> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.fram ework/Versions/A/Print 0x7fff8049f000 - 0x7fff805dbfe9 com.apple.ImageIO.framework 2.0.4 (2.0.4) <47dcdc0b5986b2c157e0b6dae48ce464> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/ImageIO 0x7fff805dc000 - 0x7fff805f9fef com.apple.CoreVideo 1.5.1 (1.5.1) <78253b3fe8d3dcc90f159d7ed866c295> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x7fff805fa000 - 0x7fff8068bfff com.apple.SearchKit 1.2.1 (1.2.1) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Sear chKit.framework/Versions/A/SearchKit 0x7fff8068c000 - 0x7fff80e49fef libBLAS.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libBLAS.dylib 0x7fff80e4a000 - 0x7fff81416fff com.apple.CoreGraphics 1.407.2 (???) <436dbc70f8c9b29b3beb1d2de220acf2> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/CoreGraphics 0x7fff81417000 - 0x7fff8141dfff com.apple.DiskArbitration 2.2.1 (2.2.1) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitrat ion 0x7fff8141e000 - 0x7fff8145bff7 com.apple.SystemConfiguration 1.9.2 (1.9.2) <150119d0cecb0c80f6736b9881c2411e> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemCo nfiguration 0x7fff8145c000 - 0x7fff81523fec com.apple.CFNetwork 422.11 (422.11) <570ca46de3b907cb1c8e33fc62f562b4> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNe twork.framework/Versions/A/CFNetwork 0x7fff81524000 - 0x7fff8152dfff libCGATS.A.dylib ??? (???) <722a0bbd58740d46739008e881010631> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib 0x7fff8152e000 - 0x7fff81533fff com.apple.CommonPanels 1.2.4 (85) <2cec1ecc95cf1ecea8bea030975a46b8> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPane ls.framework/Versions/A/CommonPanels 0x7fff81534000 - 0x7fff817cffe3 com.apple.Foundation 6.5.7 (677.22) <8134977fcc57198a53dc494b60592980> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x7fff817d0000 - 0x7fff817d0ffd com.apple.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x7fff817d1000 - 0x7fff81cf1fc6 libGLProgrammability.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgra mmability.dylib 0x7fff81cf2000 - 0x7fff81cf4fff com.apple.NavigationServices 3.5.2 (163) <7cb7f3fe7f9d56ec89ef28a6d3a1da7d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Navigation Services.framework/Versions/A/NavigationServices 0x7fff81cf5000 - 0x7fff81d32fe7 com.apple.coreui 1.2 (62) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x7fff81d33000 - 0x7fff81d33fff com.apple.Carbon 136 (136) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x7fff81d34000 - 0x7fff81d42fff libCSync.A.dylib ??? (???) <61f6cc104b3e9b77cd583635a3a9a5cf> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x7fff81d43000 - 0x7fff81d45ff9 libRadiance.dylib ??? (???) <6d9f2235e8f70a7aedfc59383a7548d8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x7fff81d46000 - 0x7fff81db5ff9 com.apple.print.framework.PrintCore 5.5.3 (245.3) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/PrintCore.framework/Versions/A/PrintCore 0x7fff81db6000 - 0x7fff81db6ff8 com.apple.ApplicationServices 34 (34) <81cd02cc2ccf4e47e51d03db860da556> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Applicat ionServices 0x7fff81db7000 - 0x7fff81dd8fff libresolv.9.dylib ??? (???) <38318f9fbcfbdb384e0f9b08cc0e757a> /usr/lib/libresolv.9.dylib 0x7fff81dd9000 - 0x7fff81e4ffef libvMisc.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvMisc.dylib 0x7fff81e50000 - 0x7fff81e52ff7 libffi.dylib ??? (???) <920bb19728451f35703bb95dc908c7ca> /usr/lib/libffi.dylib 0x7fff81e53000 - 0x7fff81eeefe7 com.apple.ink.framework 101.3 (86) <60c6579faf114ea9677fd9ae25389ed2> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framew ork/Versions/A/Ink 0x7fff81eef000 - 0x7fff81f0dfff libPng.dylib ??? (???) <4017eab74319a648dfd73b7d503e557d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x7fff81f0e000 - 0x7fff81f24ff9 com.apple.ImageCapture 5.0.1 (5.0.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCaptu re.framework/Versions/A/ImageCapture 0x7fff81f25000 - 0x7fff81f3dfff com.apple.DictionaryServices 1.0.0 (1.0.0) <78ea11e9a92120f76d69efa24b8d1f95> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Dict ionaryServices.framework/Versions/A/DictionaryServices 0x7fff81f3e000 - 0x7fff81f42fff libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib 0x7fff81f43000 - 0x7fff81fe3fe3 com.apple.ApplicationServices.ATS 3.4 (???) <47cf09bf78935889f17f1b6b09badf0d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/ATS 0x7fff81fe4000 - 0x7fff8211bfff com.apple.CoreFoundation 6.5.5 (476.17) <51930d43c7c2d8fb24148cbfc05bba0f> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundatio n 0x7fff8211c000 - 0x7fff82126fff com.apple.speech.recognition.framework 3.7.24 (3.7.24) <2399374b096b284345daba82e2cb833d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechReco gnition.framework/Versions/A/SpeechRecognition 0x7fff82127000 - 0x7fff82159ff7 libauto.dylib ??? (???) /usr/lib/libauto.dylib 0x7fff8215a000 - 0x7fff821cefe7 libstdc++.6.dylib ??? (???) <565ee6f798f7fef6f804c60682787280> /usr/lib/libstdc++.6.dylib 0x7fff821cf000 - 0x7fff8228dfff edu.mit.Kerberos 6.0.12 (6.0.12) /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x7fff8228e000 - 0x7fff8228effb com.apple.installserver.framework 1.0 (8) /System/Library/PrivateFrameworks/InstallServer.framework/Versions/A/Install Server 0x7fff8228f000 - 0x7fff82293fff libGIF.dylib ??? (???) <66436b84211fe0e723051eab15af0aca> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x7fff82294000 - 0x7fff8258ffe3 com.apple.CoreServices.CarbonCore 786.10 (786.10) <2ac701edf3ca98a86ae9d5f733200b40> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Carb onCore.framework/Versions/A/CarbonCore 0x7fff82590000 - 0x7fff825aafff libvDSP.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvDSP.dylib 0x7fff825ab000 - 0x7fff827b1ff3 com.apple.security 5.0.4 (34102) <47c559b17c1f51998e7a981d0fbec4c8> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x7fff827b2000 - 0x7fff827d9fff libxslt.1.dylib ??? (???) /usr/lib/libxslt.1.dylib 0x7fff827da000 - 0x7fff82948fff libicucore.A.dylib ??? (???) <374ddaf141bf88dba00ab9058f2dbad6> /usr/lib/libicucore.A.dylib 0x7fff82949000 - 0x7fff8295dff7 libGL.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x7fff8295e000 - 0x7fff83286fff com.apple.AppKit 6.5.6 (949.43) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x7fff83287000 - 0x7fff83667fef com.apple.QuartzCore 1.5.7 (1.5.7) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x7fff83668000 - 0x7fff836b8fe7 com.apple.Metadata 10.5.2 (398.25) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Meta data.framework/Versions/A/Metadata 0x7fff836b9000 - 0x7fff836baff3 com.apple.audio.units.AudioUnit 1.5 (1.5) /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x7fff836bb000 - 0x7fff83710fe3 com.apple.HIServices 1.7.0 (???) <6bef766448d67adb91901b432629ea0f> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/HIServices.framework/Versions/A/HIServices 0x7fff83711000 - 0x7fff83711ffd com.apple.Accelerate.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/vecLib 0x7fff83712000 - 0x7fff837a7ffb com.apple.LaunchServices 290.3 (290.3) <56544e16c5192d2ce72df772901fcaef> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Laun chServices.framework/Versions/A/LaunchServices 0x7fff837a8000 - 0x7fff8382ffef com.apple.audio.CoreAudio 3.1.1 (3.1.1) <9c1714647fd7515c900362ad2ac76874> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x7fff83830000 - 0x7fff83893fef libGLU.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dyli b 0x7fff83894000 - 0x7fff838a2ff9 com.apple.helpdata 1.0.1 (14.2) /System/Library/PrivateFrameworks/HelpData.framework/Versions/A/HelpData 0x7fff838a3000 - 0x7fff838afff1 libgcc_s.1.dylib ??? (???) <23fa31a628c1ea8a62ac529fa333b6e1> /usr/lib/libgcc_s.1.dylib 0x7fff838b0000 - 0x7fff838d2fff libJPEG.dylib ??? (???) <4257ab268996bbeb93b47946df181cdc> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x7fff838d3000 - 0x7fff838d3ffd com.apple.Accelerate 1.4.2 (Accelerate 1.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x7fff838d4000 - 0x7fff838d4ff8 com.apple.Cocoa 6.5 (???) <8c59f679ffbd9178134df1d83dedde28> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa 0x7fff838d5000 - 0x7fff839cafff libxml2.2.dylib ??? (???) <8226d1180354f493954c5fa1fc0e1154> /usr/lib/libxml2.2.dylib 0x7fff839cb000 - 0x7fff839dafe7 com.apple.opengl 1.5.9 (1.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x7fff839db000 - 0x7fff83cc2feb com.apple.HIToolbox 1.5.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. framework/Versions/A/HIToolbox 0x7fff83cc3000 - 0x7fff83d03fef com.apple.framework.IOKit 1.5.1 (???) <17e6707127a60c5e2d7a9bd2b7bf2db0> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x7fff83d04000 - 0x7fff83dc8fe2 com.apple.vImage 3.0 (3.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage .framework/Versions/A/vImage 0x7fff83dc9000 - 0x7fff83df3fff libcups.2.dylib ??? (???) /usr/lib/libcups.2.dylib 0x7fff83df4000 - 0x7fff83df4ffa com.apple.CoreServices 32 (32) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x7fff83df5000 - 0x7fff83ed6fff libcrypto.0.9.7.dylib ??? (???) <66f1f8773bd9fdfdcfd09e2b4b010636> /usr/lib/libcrypto.0.9.7.dylib 0x7fff83ed7000 - 0x7fff83f87fef com.apple.CoreServices.OSServices 226.5 (226.5) <1c38f727b3ad3293272db7323b37c735> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSSe rvices.framework/Versions/A/OSServices 0x7fff83f88000 - 0x7fff83fa2fff com.apple.openscripting 1.2.8 (???) <0674c4e3353c677c9f58df3297ae559b> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScript ing.framework/Versions/A/OpenScripting 0x7fff83fa3000 - 0x7fff83fdfff7 libGLImage.dylib ??? (???) <02258bcdbe8defdb254acc077a81dd9b> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage. dylib 0x7fff83fe0000 - 0x7fff83ff1fff com.apple.speech.synthesis.framework 3.7.1 (3.7.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x7fff83ff2000 - 0x7fff8406cff3 com.apple.CoreText 2.0.3 (???) <827bbfef670df72316719c25bfb39915> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreText.framework/Versions/A/CoreText 0x7fff8406d000 - 0x7fff841f8ffb libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0x7fff841f9000 - 0x7fff8420affd libz.1.dylib ??? (???) /usr/lib/libz.1.dylib 0x7fff8420b000 - 0x7fff842befef com.apple.DesktopServices 1.4.7 (1.4.7) /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/D esktopServicesPriv 0x7fff842bf000 - 0x7fff84677fff libLAPACK.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libLAPACK.dylib 0x7fff84678000 - 0x7fff84743fef com.apple.ColorSync 4.5.1 (4.5.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ColorSync.framework/Versions/A/ColorSync 0x7fff84744000 - 0x7fff84847feb com.apple.CoreData 100.1 (186) <074abc7f43f81f7885e4d0674a8be4bc> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x7fffffe00000 - 0x7fffffe01780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0xfffffffffffec000 - 0xfffffffffffeffff libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib SYSTEM CONFIG Model: MacPro3,1, BootROM MP31.006C.B05, 8 processors, Quad-Core Intel Xeon, 2.8 GHz, 32 GB Graphics: kHW_ATIrv630Item, ATI Radeon HD 2600, spdisplays_pcie_device, 256 MB Memory Module: DIMM Riser B/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Bluetooth: Version 2.1.3f8, 2 service, 1 devices, 1 incoming serial ports Network Service: Ethernet 2, Ethernet, en1 PCI Card: ATI Radeon HD 2600, display, Slot-1 Serial ATA Device: WDC WD3200AAJS-41VWA0, 298.09 GB Parallel ATA Device: PIONEER DVD-RW DVR-112D USB Device: Keyboard Hub, (null) mA USB Device: Apple Optical USB Mouse, (null) mA USB Device: Apple Keyboard, (null) mA USB Device: hub_device, (null) mA USB Device: Apple Cinema HD Display, (null) mA USB Device: Keyspan USA-28Xb, (null) mA USB Device: Bluetooth USB Host Controller, (null) mA FireWire Device: built-in_hub, unknown_value, unknown_speed FireWire Device: My Book, WD, 800mbit_speed FireWire Device: unknown_device, unknown_value, unknown_speed -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From jaakko.sipari at gmail.com Thu Jan 22 03:00:03 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 22 Jan 2009 12:00:03 +0200 Subject: [Rxtx] RXTX compilation with GCJ possible? Message-ID: <901f25b80901220200s53792317o374b80cbb6066a52@mail.gmail.com> Hi! Does anyone have experience on using RXTX in a GCJ compiled Java application? I'm interested whether this is possible in Windows and/or in Linux platforms. And of course what does it take to get it work, or does it just work out of the box. Ultimately my aim here would be to move to a more time deterministic system by utilizing GCJ, jRate & Javolution and possibly run the RXTX (and other important) threads at a priority higher than the garbage collector. This of course would require some modification for the RXTX threads to run in a Javolution pool context or non allocating real time contexts so they wouldn't produce any garbage, but that's something to hack on later. For now I'd just like to know if there are any obstacles on the road to compiling & running RXTX with GCJ. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/5592681a/attachment.html From jmudd at dtiweb.net Thu Jan 22 06:21:03 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Thu, 22 Jan 2009 08:21:03 -0500 Subject: [Rxtx] Hot unplugging of a USB device References: <4977BEEA.4020708@gatworks.com> Message-ID: U. George, Thanks for the information. How did you resolve your USB/GPS device on Linux? My application has to run on both Linux and Windows eventually. Thanks, Jerry -----Original Message----- From: U. George [mailto:netbeans at gatworks.com] Sent: Wednesday, January 21, 2009 7:34 PM To: Jerry Mudd Cc: rxtx at qbang.org Subject: Re: [Rxtx] Hot unplugging of a USB device > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0019.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0019.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0017.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0017.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0017.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0017.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0016.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0014.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0014.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0014.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0014.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0014.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0011.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0011.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0011.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment-0010.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0010.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment-0010.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment-0010.html From tjarvi at qbang.org Wed Jan 14 18:56:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 14 Jan 2009 18:56:50 -0700 (MST) Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Message-ID: On Wed, 14 Jan 2009, Jaakko Sipari wrote: > Hi (again)! > > Could someone clarify what these methods actually do and are they even > implemented? Do I get into trouble with buffer values of 0 (if I want to > handle the buffers myself)? > rxtx does not have buffers. It was not clear to me at the time why there would be a buffer when java already provides buffered input and output streams that can sit on top of rxtx. One reason I can see for implementing buffers in rxtx is to get data off the port so select() can block. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Wed Jan 14 23:23:08 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 15 Jan 2009 08:23:08 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> Message-ID: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Here's the same message for the list also. Forgot to do "Reply to all" ---------- Forwarded message ---------- From: Jaakko Sipari Date: Thu, Jan 15, 2009 at 8:22 AM Subject: Re: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize To: Trent Jarvi On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! >> >> Could someone clarify what these methods actually do and are they even >> implemented? Do I get into trouble with buffer values of 0 (if I want to >> handle the buffers myself)? >> >> > rxtx does not have buffers. It was not clear to me at the time why there > would be a buffer when java already provides buffered input and output > streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data off > the port so select() can block. > So basically those methods have currently no effect at all? - Jaakko -- Jaakko Sipari tel. +358451238191 eMail. jaakko.sipari at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090115/8b4c47c0/attachment-0009.html From tjarvi at qbang.org Thu Jan 15 18:37:12 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 15 Jan 2009 18:37:12 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: On Thu, 15 Jan 2009, Jaakko Sipari wrote: > Here's the same message for the list also. Forgot to do "Reply to all" > > ---------- Forwarded message ---------- > From: Jaakko Sipari > Date: Thu, Jan 15, 2009 at 8:22 AM > Subject: Re: [Rxtx] The functionality behind setInputBufferSize & > setOutputBufferSize > To: Trent Jarvi > > > On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! > > Could someone clarify what these methods actually do > and are they even > implemented? Do I get into trouble with buffer > values of 0 (if I want to > handle the buffers myself)? > > > rxtx does not have buffers. ?It was not clear to me at the time why > there would be a buffer when java already provides buffered input and > output streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data > off the port so select() can block. > > > So basically those methods have currently no effect at all? > Correct. You can use BufferedInputStream and BufferedOutputStream from the Java API once you get the Input/OutputStream from rxtx. But changing the input and output buffer size in rxtx is not going to change behavior. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Fri Jan 16 01:22:37 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Fri, 16 Jan 2009 10:22:37 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> > So basically those methods have currently no effect at all? >> >> > Correct. You can use BufferedInputStream and BufferedOutputStream from the > Java API once you get the Input/OutputStream from rxtx. But changing the > input and output buffer size in rxtx is not going to change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > I assume there still is some kind of buffer in rxtx (or the serial port driver) in case of processing delays. I mean, if the serial port gives data faster than can be read from the Java program using rxtx it isn't just thrown away, right? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090116/3bd9a52e/attachment-0008.html From tjarvi at qbang.org Fri Jan 16 05:17:24 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 16 Jan 2009 05:17:24 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> Message-ID: On Fri, 16 Jan 2009, Jaakko Sipari wrote: > > So basically those methods have currently no effect > at all? > > > Correct. ?You can use BufferedInputStream and BufferedOutputStream > from the Java API once you get the Input/OutputStream from rxtx. ?But > changing the input and output buffer size in rxtx is not going to > change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > > > > I assume there still is some kind of buffer in rxtx (or the serial port > driver) in case of processing delays. I mean, if the serial port gives data > faster than can be read from the Java program using rxtx it isn't just > thrown away, right? > The UART can usually hold a few bytes. The kernel driver can buffer the input. In practice, it works. With Sun commapi, the typical application has 4 buffers between the user and the incomming data. With rxtx, it is 3. BufferedInputStream -> commapi/rxtx -> kernel driver -> UART If you really do run into overflows on the UART, then hardware flow control is what you should be using and tinkering with rxtx to avoid it is not a very sound approach. -- Trent Jarvi tjarvi at qbang.org From llowrey at nuclearwinter.com Sun Jan 18 12:49:39 2009 From: llowrey at nuclearwinter.com (Larkin Lowrey) Date: Sun, 18 Jan 2009 13:49:39 -0600 Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain Message-ID: <497387D3.9040201@nuclearwinter.com> After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when running code that uses RXTXComm. The crashes only occur when using 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. As far as I can tell, the crash happens immediately on start. I can't see any evidence of much, if anything, happening before the crash. The code used to work and only stopped working after the "upgrade" to FC10. I have tried RXTX v2.1 and 2.2pre1. Any ideas? Here's the error: # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode linux-amd64) # Problematic frame: # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 --Larkin From tjarvi at qbang.org Mon Jan 19 17:48:34 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 19 Jan 2009 17:48:34 -0700 (MST) Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain In-Reply-To: <497387D3.9040201@nuclearwinter.com> References: <497387D3.9040201@nuclearwinter.com> Message-ID: On Sun, 18 Jan 2009, Larkin Lowrey wrote: > After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when > running code that uses RXTXComm. The crashes only occur when using > 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. > > As far as I can tell, the crash happens immediately on start. I can't > see any evidence of much, if anything, happening before the crash. > > The code used to work and only stopped working after the "upgrade" to > FC10. I have tried RXTX v2.1 and 2.2pre1. > > Any ideas? > > Here's the error: > > # > # An unexpected error has been detected by Java Runtime Environment: > # > # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 > # > # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode > linux-amd64) > # Problematic frame: > # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 > > > --Larkin Hi Larkin, I can think of 2 segv's in rxtx that may apply. Both are fixed in rxtx 2.2pre.. The first was that pointers required by nativeDrain needed to be stored in something larger than a 32 bit integer in java. This resulted in a crash like you see the first time the 'nativedrain' thread tried to use the pointer. The second was a concurrency issue George resolved with synchronization. The crash was usually during close but happened in the 'nativedrain' thread. (eventLoop) As mentioned, these are both fixed in the prerelease. There is a class provided in recent versions of RXTX that allow you confirm the version being used: gnu.io.RXTXVersion with member methods getVersion() and nativeGetVersion(). This allows you to confirm that you are indeed using the version you think you are. -- Trent Jarvi tjarvi at qbang.org From alexandrepoletto at gmail.com Wed Jan 21 11:48:07 2009 From: alexandrepoletto at gmail.com (Alexandre Poletto) Date: Wed, 21 Jan 2009 16:48:07 -0200 Subject: [Rxtx] work in windows but dont work in linux Message-ID: hi folks, I have an application to communicate with the serial port using rxtx, in the windows os my application works well, but when i try to run in the linux os i open the port (in windows "COM1", in Linux "/dev/ttyS0") send my commandes but i never receive any answer. I'm using ubuntu 8.10 and java 1.5, there is any configuration in that i'm missing? Thanks for the help! ps: Sorry form my bad english :( -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/70baea51/attachment-0002.html From jmudd at dtiweb.net Wed Jan 21 14:08:04 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Wed, 21 Jan 2009 16:08:04 -0500 Subject: [Rxtx] Hot unplugging of a USB device Message-ID: Looking to see if the issues surrounding an uplugging of a USB device have been resolved. I see from the mail list archives and bug reports that others have noted this issue. I have a USB GPS Receiver that is plugged into a Windows (XP) system and am using Netbeans 6.5 and Java jdk 1.6 and RXTX 2.1.7 and 2.2pre1. In the thread that is reading data via listening for a SerialEvent I can capture a Java IOException: No error in readArray. The application is essentially hung at this point. Only a termination of the application will clear it up and not leave the port hung. I had read in the archives that this is because the event loop in the native code portion is continually putting out the exceptions. I had also seen that this might be addressed in future releases. Any help is appreciated. Thanks, Jerry ________________________________ Jerry Mudd Senior Programmer 21795 Shangri-La Drive, Ste C Lexington Park, MD 20653 (301) 737-8893 (301) 737-8897 Fax jmudd at dtiweb.net www.dtiweb.net This message may contain sensitive, proprietary and/or privileged information. Disclosure is not authorized unless provided in writing by Defense Technologies, Inc. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0002.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 6296 bytes Desc: image001.gif Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0002.gif From netbeans at gatworks.com Wed Jan 21 17:33:46 2009 From: netbeans at gatworks.com (U. George) Date: Wed, 21 Jan 2009 19:33:46 -0500 Subject: [Rxtx] Hot unplugging of a USB device In-Reply-To: References: Message-ID: <4977BEEA.4020708@gatworks.com> > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:34 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:34 +1100 Subject: [Rxtx] Part 1 of 2 parts re rxtx 2.2 pre.. and OSX Message-ID: Hi, I have tried out the latest version of rxtx on a mac and can report that running with ImageJ (32 bit ) all seems to be fine. However when I attempt to use it with ImageJ64, I get a crash whenever the serial port is used. The details follow. What I did. Ran our plug-in in ImageJ 64 bit (1.42g) for Measuring, which is using the latest rxtx (the beta 2.2 compiled on 30 December 2008) for MacOSX 10.5.x) I installed this by putting the two files in the directory ~ LIBRARY/JAVA/EXTENSIONS. The Plug-in uses the serial port. The window we put up to show the numbers from the stage appeared, but only with the default "0" (zero) in each row, which is what we put there until we get data back from the port and the device attached. Then it crashed. I should point out that this all works fine using ImageJ (32 bit) 1.42g, on the same platform. So the only difference is the use of ImageJ 64 bit, and I guess the version of rxtx for 64 bit. I hope that cleverer people than me can throw some light onto this little problem. ImageJ64 seems to work ok until rxtx is called, although I haven't tried much so far, just some 3D rendering with 1 Gb of image data, which all went well, apart from the fact that the data was marginal. I am now showing the data supplied by the report to Apple window. This has three tabs, one to write your information in, one called Problem Details, and the third called SYSTEM CONFIG. These are pasted in below. Best wishes Noel Problem Details Process: JavaApplicationStub [463] Path: /Applications/ImageJ/ImageJ64.app/Contents/MacOS/JavaApplicationStub Identifier: gov.nih.info.rsb.ImageJ Version: ??? (10.2) Code Type: X86-64 (Native) Parent Process: launchd [398] Date/Time: 2009-01-19 10:48:09.342 +1100 OS Version: Mac OS X 10.5.6 (9G55) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000000029507c8 Crashed Thread: 16 Application Specific Information: Java information: Exception type: Bus Error (0xa) at pc=0x00000006ff70f418 Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0_07-b06-57 mixed mode macosx-amd64) Current thread (0x00000001020de800): JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] Stack: [0x0000000702851000,0x0000000702951000] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j gnu.io.RXTXPort.readByte()I+0 j gnu.io.RXTXPort$SerialInputStream.read()I+81 j SerialConnection.serialEvent(Lgnu/io/SerialPortEvent;)V+41 j gnu.io.RXTXPort.sendEvent(IZ)Z+382 v ~BufferBlob::StubRoutines (1) j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~BufferBlob::StubRoutines (1) Java Threads: ( => current thread ) =>0x00000001020de800 JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] 0x00000001020e8800 JavaThread "Measure XYZ" [_thread_blocked, id=44384256, stack(0x0000000702954000,0x0000000702a54000)] 0x0000000102001000 JavaThread "DestroyJavaVM" [_thread_blocked, id=25169920, stack(0x0000000101001000,0x0000000101801000)] 0x00000001020da800 JavaThread "SocketListener" [_thread_in_native, id=29671424, stack(0x0000000701b4c000,0x0000000701c4c000)] 0x00000001020b4800 JavaThread "AWT-EventQueue-0" [_thread_in_Java, id=-27992064, stack(0x00000006fe44e000,0x00000006fe54e000)] 0x0000000102096000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=-34344960, stack(0x00000006fde3f000,0x00000006fdf3f000)] 0x0000000102078000 JavaThread "AWT-Shutdown" [_thread_blocked, id=-58392576, stack(0x00000006fc750000,0x00000006fc850000)] 0x0000000102077800 JavaThread "AWT-AppKit" daemon [_thread_in_native, id=1886770976, stack(0x00007fff5f400000,0x00007fff5fc00000)] 0x0000000102044800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=-333877248, stack(0x00000006ec097000,0x00000006ec197000)] 0x0000000102043000 JavaThread "CompilerThread1" daemon [_thread_blocked, id=-334938112, stack(0x00000006ebf94000,0x00000006ec094000)] 0x0000000102041800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=-335998976, stack(0x00000006ebe91000,0x00000006ebf91000)] 0x0000000102041000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=-337059840, stack(0x00000006ebd8e000,0x00000006ebe8e000)] 0x0000000102029800 JavaThread "Finalizer" daemon [_thread_blocked, id=-338214912, stack(0x00000006ebc74000,0x00000006ebd74000)] 0x0000000102028800 JavaThread "Reference Handler" daemon [_thread_blocked, id=-339333120, stack(0x00000006ebb63000,0x00000006ebc63000)] Other Threads: 0x0000000102020800 VMThread [stack: 0x00000006eba60000,0x00000006ebb60000] [id=-340393984] 0x0000000102046000 WatcherThread [stack: 0x00000006ec19a000,0x00000006ec29a000] [id=-332816384] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 76480K, used 14448K [0x0000000105800000, 0x000000010ad50000, 0x00000002f9800000) eden space 65600K, 22% used [0x0000000105800000, 0x000000010661c398, 0x0000000109810000) from space 10880K, 0% used [0x0000000109810000, 0x0000000109810000, 0x000000010a2b0000) to space 10880K, 0% used [0x000000010a2b0000, 0x000000010a2b0000, 0x000000010ad50000) tenured generation total 174784K, used 0K [0x00000002f9800000, 0x00000003042b0000, 0x00000006e1800000) the space 174784K, 0% used [0x00000002f9800000, 0x00000002f9800000, 0x00000002f9800200, 0x00000003042b0000) compacting perm gen total 21248K, used 10319K [0x00000006e1800000, 0x00000006e2cc0000, 0x00000006e6c00000) the space 21248K, 48% used [0x00000006e1800000, 0x00000006e2213d28, 0x00000006e2213e00, 0x00000006e2cc0000) No shared spaces configured. Virtual Machine Arguments: JVM Args: -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher. framework/Resources/LauncherSupport.jar -Xms256m -Xmx24000m -Dcom.apple.macos.useScreenMenuBar=false -Dcom.apple.mrj.application.growbox.intrudes=false -Dcom.apple.mrj.application.live-resize=true -Dcom.apple.hwaccel=false -Dapple.awt.Antialiasing=false -Dcom.apple.smallTabs=true -Dapple.awt.brushMetalLook=false Java Command: Launcher Type: generic Physical Memory: Page Size = 4k, Total = 2048M, Free = 30996M Thread 0: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 com.apple.CoreFoundation 0x00007fff8204dc4f CFRunLoopRunSpecific + 1631 3 com.apple.HIToolbox 0x00007fff839fdda2 RunCurrentEventLoopInMode + 278 4 com.apple.HIToolbox 0x00007fff839fdbd8 ReceiveNextEventCommon + 322 5 com.apple.HIToolbox 0x00007fff839fda83 BlockUntilNextEventMatchingListInMode + 79 6 com.apple.AppKit 0x00007fff8299d3b0 _DPSNextEvent + 603 7 com.apple.AppKit 0x00007fff8299ccf1 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 136 8 com.apple.AppKit 0x00007fff82996a84 -[NSApplication run] + 455 9 libawt.jnilib 0x00000006ec433257 +[AWTStarter startAWT:] + 1343 10 libawt.jnilib 0x00000006ec432c46 -[CPerformer perform] + 112 11 com.apple.Foundation 0x00007fff8153f2b4 __NSThreadPerformPerform + 148 12 com.apple.CoreFoundation 0x00007fff8204e0e8 CFRunLoopRunSpecific + 2808 13 ...ple.JavaApplicationLauncher 0x0000000100005165 startupJava(LauncherArgsStruct*) + 235 14 ...ple.JavaApplicationLauncher 0x000000010000579c launchJavaApplication + 1224 15 JavaApplicationStub 0x0000000100000b9c 0x100000000 + 2972 Thread 1: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x0000000101a93b61 JVM_GetCPFieldModifiers + 128961 5 libjvm.dylib 0x0000000101a93a36 JVM_GetCPFieldModifiers + 128662 6 ...ple.JavaApplicationLauncher 0x000000010000c0ce startJavaApplication + 2886 7 ...ple.JavaApplicationLauncher 0x000000010000506d java_main_stub(void*) + 9 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 2: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libSystem.B.dylib 0x00007fff840db0b0 mach_msg_server + 436 3 libjvm.dylib 0x000000010181176d JNI_CreateJavaVM_Impl + 53277 4 libjvm.dylib 0x0000000101811375 JNI_CreateJavaVM_Impl + 52261 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 3: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x00000001018e452f JVM_Lseek + 235727 5 libjvm.dylib 0x00000001018e42df JVM_Lseek + 235135 6 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 7 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 8 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 4: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x00000001028003ea 0 + 4336911338 11 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 12 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 13 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 14 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 15 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 16 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 17 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 18 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 19 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 20 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 5: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 6: 0 libSystem.B.dylib 0x00007fff8406dd72 semaphore_wait_trap + 10 1 libjvm.dylib 0x0000000101915bdb JVM_IsPrimitiveClass + 12139 2 libjvm.dylib 0x00000001019155b5 JVM_IsPrimitiveClass + 10565 3 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 4 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 7: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 8: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 9: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x0000000101918ec8 JVM_IsPrimitiveClass + 25176 5 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 6 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 7 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 10: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x000000010191abb5 JVM_IsPrimitiveClass + 32581 4 libjvm.dylib 0x000000010191a70a JVM_IsPrimitiveClass + 31386 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 11: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 12: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x0000000102803414 0 + 4336923668 12 ??? 0x00000001028003ea 0 + 4336911338 13 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 14 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 15 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 16 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 17 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 18 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 19 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 20 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 21 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 22 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 13: 0 ??? 0x0000000102817034 0 + 4337004596 1 ??? 0x000000010280304e 0 + 4336922702 2 ??? 0x0000000102803093 0 + 4336922771 3 ??? 0x000000010280356d 0 + 4336924013 4 ??? 0x0000000102803093 0 + 4336922771 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x000000010280356d 0 + 4336924013 8 ??? 0x0000000102803093 0 + 4336922771 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x0000000102802f3a 0 + 4336922426 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102802f3a 0 + 4336922426 14 ??? 0x0000000102802f3a 0 + 4336922426 15 ??? 0x0000000102803162 0 + 4336922978 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102802f3a 0 + 4336922426 19 ??? 0x0000000102802f3a 0 + 4336922426 20 ??? 0x00000001028003ea 0 + 4336911338 21 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 22 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 23 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 24 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 25 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 26 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 27 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 28 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 29 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 30 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 14: 0 libSystem.B.dylib 0x00007fff840f210e accept + 10 1 libnet.jnilib 0x00000006ff6b6b11 Java_java_net_PlainSocketImpl_socketAccept + 277 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x0000000102802f3a 0 + 4336922426 4 ??? 0x0000000102802f3a 0 + 4336922426 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x0000000102803414 0 + 4336923668 8 ??? 0x00000001028003ea 0 + 4336911338 9 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 10 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 11 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 12 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 13 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 14 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 15 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 16 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 17 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 18 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 15: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x000000010280304e 0 + 4336922702 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102803414 0 + 4336923668 14 ??? 0x0000000102803093 0 + 4336922771 15 ??? 0x0000000102803093 0 + 4336922771 16 ??? 0x0000000102803093 0 + 4336922771 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102803414 0 + 4336923668 19 ??? 0x00000001028003ea 0 + 4336911338 20 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 21 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 22 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 23 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 24 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 25 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 26 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 27 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 28 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 29 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 Crashed: 0 librxtxSerial.jnilib 0x00000006ff70f418 read_byte_array + 68 1 librxtxSerial.jnilib 0x00000006ff70f9b3 Java_gnu_io_RXTXPort_readByte + 93 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x000000010280304e 0 + 4336922702 4 ??? 0x000000010280304e 0 + 4336922702 5 ??? 0x0000000102803414 0 + 4336923668 6 ??? 0x00000001028003ea 0 + 4336911338 7 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 8 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 9 libjvm.dylib 0x00000001018e5be8 JVM_Lseek + 241544 10 libjvm.dylib 0x0000000101900b11 JVM_MonitorWait + 17249 11 libjvm.dylib 0x0000000101a1e59e JVM_DisableCompiler + 1166 12 librxtxSerial.jnilib 0x00000006ff70d91e send_event + 132 13 librxtxSerial.jnilib 0x00000006ff70e82b report_serial_events + 92 14 librxtxSerial.jnilib 0x00000006ff7108c9 Java_gnu_io_RXTXPort_eventLoop + 237 15 ??? 0x000000010280e878 0 + 4336969848 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x00000001028003ea 0 + 4336911338 18 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 19 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 20 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 21 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 22 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 23 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 24 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 25 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 26 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 27 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 17: 0 libSystem.B.dylib 0x00007fff84074d02 __semwait_signal + 10 1 libSystem.B.dylib 0x00007fff840dce91 usleep + 57 2 librxtxSerial.jnilib 0x00000006ff70d729 drain_loop + 45 3 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 4 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 crashed with X86 Thread State (64-bit): rax: 0x00000000029507c0 rbx: 0x0000000000000041 rcx: 0x0000000000000065 rdx: 0x0000000000000002 rdi: 0x00000006ff71205e rsi: 0x00000006ff711c67 rbp: 0x0000000702950000 rsp: 0x000000070294fef0 r8: 0x000000000000004d r9: 0x00000006e21d64c0 r10: 0x00000006e21d38e8 r11: 0x00000000000000d2 r12: 0x00000001020de998 r13: 0x00000006e21d93b0 r14: 0x0000000000000032 r15: 0x00000000029507c0 rip: 0x00000006ff70f418 rfl: 0x0000000000010202 cr2: 0x00000000029507c8 Continued in the message part 2 -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:41 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:41 +1100 Subject: [Rxtx] Part 2 re rxtx 2.2 pre... and MacOSX Message-ID: Continued from Part 1. Binary Images: 0x100000000 - 0x100000fff JavaApplicationStub ??? (???) /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationS tub 0x100004000 - 0x100011fff com.apple.JavaApplicationLauncher 12.2.0 (12.2.0) /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/JavaApplicationLauncher 0x10001a000 - 0x100022ffd com.apple.JavaVM 12.2.0 (12.2.0) <2b178e8d4bbcc0aa427c2f3f71bb2fcb> /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM 0x100055000 - 0x10005dff0 libverify.dylib ??? (???) <56eac95084cb86cd1339a721b1353182> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libveri fy.dylib 0x100063000 - 0x10006cffb JavaNativeFoundation ??? (???) <68ca6409dc49542301edda1e0744ac69> /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNative Foundation.framework/Versions/A/JavaNativeFoundation 0x1000a8000 - 0x1000c7fef libjava.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjava .jnilib 0x1000d8000 - 0x1000e5ffb libzip.jnilib ??? (???) <5b6dce7c9a1f25aa5dff1a633c9dc342> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libzip. jnilib 0x101803000 - 0x101eafff3 libjvm.dylib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bundle/Libra ries/libjvm.dylib 0x6ec2c5000 - 0x6ec2c6fff liblauncher.jnilib ??? (???) <567fa54a222b965b2c4aefea21d9800a> /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/Resources/liblauncher.jnilib 0x6ec431000 - 0x6ec5e4fff libawt.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libawt. jnilib 0x6fdc3b000 - 0x6fdc3cfff ATSHI.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/Resources/ATSHI.dylib 0x6fdd6e000 - 0x6fdd6efff libcmm.jnilib ??? (???) <114e1a620a6920d77bf09bd57a7f7d52> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libcmm. jnilib 0x6fdd9e000 - 0x6fde1fff7 libfontmanager.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libfont manager.jnilib 0x6fdf41000 - 0x6fdf8ffff libsuncmm.jnilib ??? (???) <47330f1f17822de3a5cf921e07615cf7> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libsunc mm.jnilib 0x6fdf95000 - 0x6fdfc4ff7 libjpeg.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjpeg .jnilib 0x6ff6ae000 - 0x6ff6baffb libnet.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnet. jnilib 0x6ff6c0000 - 0x6ff6c4fff libnio.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnio. jnilib 0x6ff6d4000 - 0x6ff6e8ff7 libdcpr.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libdcpr .jnilib 0x6ff70c000 - 0x6ff713fff +librxtxSerial.jnilib ??? (???) <5133deacebd01ceab7d528c541241956> /Library/Java/Extensions/librxtxSerial.jnilib 0x6ff734000 - 0x6ff74bfef libJapaneseConverter.dylib ??? (???) <64cca6bb4650a269f49a8427507e4963> /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib 0x70204f000 - 0x702218fef com.apple.RawCamera.bundle 2.0.10 (2.0.10) /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera 0x7fff5fc00000 - 0x7fff5fc2e643 dyld 97.1 (???) /usr/lib/dyld 0x7fff80003000 - 0x7fff80146ffb com.apple.audio.toolbox.AudioToolbox 1.5.2 (1.5.2) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x7fff801d2000 - 0x7fff801d5ffb com.apple.help 1.1 (36) <9000c05ccad96fdcc25bc35264abf587> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.frame work/Versions/A/Help 0x7fff801d6000 - 0x7fff80211fff com.apple.AE 402.2 (402.2) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.f ramework/Versions/A/AE 0x7fff80212000 - 0x7fff80257fef libRIP.A.dylib ??? (???) <8c818d7fd3dc57839ac48caf107ff4c0> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x7fff80258000 - 0x7fff8029bfef com.apple.QD 3.11.54 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/QD.framework/Versions/A/QD 0x7fff8029c000 - 0x7fff802dffef libTIFF.dylib ??? (???) <86be7909f46cc044a887cbb60ab7826d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x7fff802e0000 - 0x7fff803d4fff libobjc.A.dylib ??? (???) <118dc1ae05e685ad64290352fc94f1f0> /usr/lib/libobjc.A.dylib 0x7fff803d5000 - 0x7fff8045dfe7 libsqlite3.0.dylib ??? (???) <3c7ab3523b816dbd3e039ee7e6e2c580> /usr/lib/libsqlite3.0.dylib 0x7fff8045e000 - 0x7fff80466ffa libbsm.dylib ??? (???) <4d838c0d8a74fe61c781a53a8723303d> /usr/lib/libbsm.dylib 0x7fff80467000 - 0x7fff80497fff com.apple.shortcut 1 (1.0) <9822328df9321a661af3afcc841e8f80> /System/Library/PrivateFrameworks/Shortcut.framework/Versions/A/Shortcut 0x7fff80498000 - 0x7fff8049bfff com.apple.securityhi 3.0 (30817) <00ddd6e60692b62b7649573eab8aef5a> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI .framework/Versions/A/SecurityHI 0x7fff8049c000 - 0x7fff8049efff com.apple.print.framework.Print 218.0.2 (220.1) <2b847a0a1cd885f596a4d10409d50ba3> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.fram ework/Versions/A/Print 0x7fff8049f000 - 0x7fff805dbfe9 com.apple.ImageIO.framework 2.0.4 (2.0.4) <47dcdc0b5986b2c157e0b6dae48ce464> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/ImageIO 0x7fff805dc000 - 0x7fff805f9fef com.apple.CoreVideo 1.5.1 (1.5.1) <78253b3fe8d3dcc90f159d7ed866c295> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x7fff805fa000 - 0x7fff8068bfff com.apple.SearchKit 1.2.1 (1.2.1) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Sear chKit.framework/Versions/A/SearchKit 0x7fff8068c000 - 0x7fff80e49fef libBLAS.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libBLAS.dylib 0x7fff80e4a000 - 0x7fff81416fff com.apple.CoreGraphics 1.407.2 (???) <436dbc70f8c9b29b3beb1d2de220acf2> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/CoreGraphics 0x7fff81417000 - 0x7fff8141dfff com.apple.DiskArbitration 2.2.1 (2.2.1) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitrat ion 0x7fff8141e000 - 0x7fff8145bff7 com.apple.SystemConfiguration 1.9.2 (1.9.2) <150119d0cecb0c80f6736b9881c2411e> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemCo nfiguration 0x7fff8145c000 - 0x7fff81523fec com.apple.CFNetwork 422.11 (422.11) <570ca46de3b907cb1c8e33fc62f562b4> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNe twork.framework/Versions/A/CFNetwork 0x7fff81524000 - 0x7fff8152dfff libCGATS.A.dylib ??? (???) <722a0bbd58740d46739008e881010631> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib 0x7fff8152e000 - 0x7fff81533fff com.apple.CommonPanels 1.2.4 (85) <2cec1ecc95cf1ecea8bea030975a46b8> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPane ls.framework/Versions/A/CommonPanels 0x7fff81534000 - 0x7fff817cffe3 com.apple.Foundation 6.5.7 (677.22) <8134977fcc57198a53dc494b60592980> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x7fff817d0000 - 0x7fff817d0ffd com.apple.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x7fff817d1000 - 0x7fff81cf1fc6 libGLProgrammability.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgra mmability.dylib 0x7fff81cf2000 - 0x7fff81cf4fff com.apple.NavigationServices 3.5.2 (163) <7cb7f3fe7f9d56ec89ef28a6d3a1da7d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Navigation Services.framework/Versions/A/NavigationServices 0x7fff81cf5000 - 0x7fff81d32fe7 com.apple.coreui 1.2 (62) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x7fff81d33000 - 0x7fff81d33fff com.apple.Carbon 136 (136) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x7fff81d34000 - 0x7fff81d42fff libCSync.A.dylib ??? (???) <61f6cc104b3e9b77cd583635a3a9a5cf> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x7fff81d43000 - 0x7fff81d45ff9 libRadiance.dylib ??? (???) <6d9f2235e8f70a7aedfc59383a7548d8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x7fff81d46000 - 0x7fff81db5ff9 com.apple.print.framework.PrintCore 5.5.3 (245.3) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/PrintCore.framework/Versions/A/PrintCore 0x7fff81db6000 - 0x7fff81db6ff8 com.apple.ApplicationServices 34 (34) <81cd02cc2ccf4e47e51d03db860da556> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Applicat ionServices 0x7fff81db7000 - 0x7fff81dd8fff libresolv.9.dylib ??? (???) <38318f9fbcfbdb384e0f9b08cc0e757a> /usr/lib/libresolv.9.dylib 0x7fff81dd9000 - 0x7fff81e4ffef libvMisc.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvMisc.dylib 0x7fff81e50000 - 0x7fff81e52ff7 libffi.dylib ??? (???) <920bb19728451f35703bb95dc908c7ca> /usr/lib/libffi.dylib 0x7fff81e53000 - 0x7fff81eeefe7 com.apple.ink.framework 101.3 (86) <60c6579faf114ea9677fd9ae25389ed2> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framew ork/Versions/A/Ink 0x7fff81eef000 - 0x7fff81f0dfff libPng.dylib ??? (???) <4017eab74319a648dfd73b7d503e557d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x7fff81f0e000 - 0x7fff81f24ff9 com.apple.ImageCapture 5.0.1 (5.0.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCaptu re.framework/Versions/A/ImageCapture 0x7fff81f25000 - 0x7fff81f3dfff com.apple.DictionaryServices 1.0.0 (1.0.0) <78ea11e9a92120f76d69efa24b8d1f95> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Dict ionaryServices.framework/Versions/A/DictionaryServices 0x7fff81f3e000 - 0x7fff81f42fff libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib 0x7fff81f43000 - 0x7fff81fe3fe3 com.apple.ApplicationServices.ATS 3.4 (???) <47cf09bf78935889f17f1b6b09badf0d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/ATS 0x7fff81fe4000 - 0x7fff8211bfff com.apple.CoreFoundation 6.5.5 (476.17) <51930d43c7c2d8fb24148cbfc05bba0f> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundatio n 0x7fff8211c000 - 0x7fff82126fff com.apple.speech.recognition.framework 3.7.24 (3.7.24) <2399374b096b284345daba82e2cb833d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechReco gnition.framework/Versions/A/SpeechRecognition 0x7fff82127000 - 0x7fff82159ff7 libauto.dylib ??? (???) /usr/lib/libauto.dylib 0x7fff8215a000 - 0x7fff821cefe7 libstdc++.6.dylib ??? (???) <565ee6f798f7fef6f804c60682787280> /usr/lib/libstdc++.6.dylib 0x7fff821cf000 - 0x7fff8228dfff edu.mit.Kerberos 6.0.12 (6.0.12) /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x7fff8228e000 - 0x7fff8228effb com.apple.installserver.framework 1.0 (8) /System/Library/PrivateFrameworks/InstallServer.framework/Versions/A/Install Server 0x7fff8228f000 - 0x7fff82293fff libGIF.dylib ??? (???) <66436b84211fe0e723051eab15af0aca> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x7fff82294000 - 0x7fff8258ffe3 com.apple.CoreServices.CarbonCore 786.10 (786.10) <2ac701edf3ca98a86ae9d5f733200b40> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Carb onCore.framework/Versions/A/CarbonCore 0x7fff82590000 - 0x7fff825aafff libvDSP.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvDSP.dylib 0x7fff825ab000 - 0x7fff827b1ff3 com.apple.security 5.0.4 (34102) <47c559b17c1f51998e7a981d0fbec4c8> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x7fff827b2000 - 0x7fff827d9fff libxslt.1.dylib ??? (???) /usr/lib/libxslt.1.dylib 0x7fff827da000 - 0x7fff82948fff libicucore.A.dylib ??? (???) <374ddaf141bf88dba00ab9058f2dbad6> /usr/lib/libicucore.A.dylib 0x7fff82949000 - 0x7fff8295dff7 libGL.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x7fff8295e000 - 0x7fff83286fff com.apple.AppKit 6.5.6 (949.43) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x7fff83287000 - 0x7fff83667fef com.apple.QuartzCore 1.5.7 (1.5.7) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x7fff83668000 - 0x7fff836b8fe7 com.apple.Metadata 10.5.2 (398.25) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Meta data.framework/Versions/A/Metadata 0x7fff836b9000 - 0x7fff836baff3 com.apple.audio.units.AudioUnit 1.5 (1.5) /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x7fff836bb000 - 0x7fff83710fe3 com.apple.HIServices 1.7.0 (???) <6bef766448d67adb91901b432629ea0f> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/HIServices.framework/Versions/A/HIServices 0x7fff83711000 - 0x7fff83711ffd com.apple.Accelerate.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/vecLib 0x7fff83712000 - 0x7fff837a7ffb com.apple.LaunchServices 290.3 (290.3) <56544e16c5192d2ce72df772901fcaef> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Laun chServices.framework/Versions/A/LaunchServices 0x7fff837a8000 - 0x7fff8382ffef com.apple.audio.CoreAudio 3.1.1 (3.1.1) <9c1714647fd7515c900362ad2ac76874> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x7fff83830000 - 0x7fff83893fef libGLU.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dyli b 0x7fff83894000 - 0x7fff838a2ff9 com.apple.helpdata 1.0.1 (14.2) /System/Library/PrivateFrameworks/HelpData.framework/Versions/A/HelpData 0x7fff838a3000 - 0x7fff838afff1 libgcc_s.1.dylib ??? (???) <23fa31a628c1ea8a62ac529fa333b6e1> /usr/lib/libgcc_s.1.dylib 0x7fff838b0000 - 0x7fff838d2fff libJPEG.dylib ??? (???) <4257ab268996bbeb93b47946df181cdc> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x7fff838d3000 - 0x7fff838d3ffd com.apple.Accelerate 1.4.2 (Accelerate 1.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x7fff838d4000 - 0x7fff838d4ff8 com.apple.Cocoa 6.5 (???) <8c59f679ffbd9178134df1d83dedde28> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa 0x7fff838d5000 - 0x7fff839cafff libxml2.2.dylib ??? (???) <8226d1180354f493954c5fa1fc0e1154> /usr/lib/libxml2.2.dylib 0x7fff839cb000 - 0x7fff839dafe7 com.apple.opengl 1.5.9 (1.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x7fff839db000 - 0x7fff83cc2feb com.apple.HIToolbox 1.5.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. framework/Versions/A/HIToolbox 0x7fff83cc3000 - 0x7fff83d03fef com.apple.framework.IOKit 1.5.1 (???) <17e6707127a60c5e2d7a9bd2b7bf2db0> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x7fff83d04000 - 0x7fff83dc8fe2 com.apple.vImage 3.0 (3.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage .framework/Versions/A/vImage 0x7fff83dc9000 - 0x7fff83df3fff libcups.2.dylib ??? (???) /usr/lib/libcups.2.dylib 0x7fff83df4000 - 0x7fff83df4ffa com.apple.CoreServices 32 (32) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x7fff83df5000 - 0x7fff83ed6fff libcrypto.0.9.7.dylib ??? (???) <66f1f8773bd9fdfdcfd09e2b4b010636> /usr/lib/libcrypto.0.9.7.dylib 0x7fff83ed7000 - 0x7fff83f87fef com.apple.CoreServices.OSServices 226.5 (226.5) <1c38f727b3ad3293272db7323b37c735> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSSe rvices.framework/Versions/A/OSServices 0x7fff83f88000 - 0x7fff83fa2fff com.apple.openscripting 1.2.8 (???) <0674c4e3353c677c9f58df3297ae559b> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScript ing.framework/Versions/A/OpenScripting 0x7fff83fa3000 - 0x7fff83fdfff7 libGLImage.dylib ??? (???) <02258bcdbe8defdb254acc077a81dd9b> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage. dylib 0x7fff83fe0000 - 0x7fff83ff1fff com.apple.speech.synthesis.framework 3.7.1 (3.7.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x7fff83ff2000 - 0x7fff8406cff3 com.apple.CoreText 2.0.3 (???) <827bbfef670df72316719c25bfb39915> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreText.framework/Versions/A/CoreText 0x7fff8406d000 - 0x7fff841f8ffb libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0x7fff841f9000 - 0x7fff8420affd libz.1.dylib ??? (???) /usr/lib/libz.1.dylib 0x7fff8420b000 - 0x7fff842befef com.apple.DesktopServices 1.4.7 (1.4.7) /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/D esktopServicesPriv 0x7fff842bf000 - 0x7fff84677fff libLAPACK.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libLAPACK.dylib 0x7fff84678000 - 0x7fff84743fef com.apple.ColorSync 4.5.1 (4.5.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ColorSync.framework/Versions/A/ColorSync 0x7fff84744000 - 0x7fff84847feb com.apple.CoreData 100.1 (186) <074abc7f43f81f7885e4d0674a8be4bc> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x7fffffe00000 - 0x7fffffe01780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0xfffffffffffec000 - 0xfffffffffffeffff libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib SYSTEM CONFIG Model: MacPro3,1, BootROM MP31.006C.B05, 8 processors, Quad-Core Intel Xeon, 2.8 GHz, 32 GB Graphics: kHW_ATIrv630Item, ATI Radeon HD 2600, spdisplays_pcie_device, 256 MB Memory Module: DIMM Riser B/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Bluetooth: Version 2.1.3f8, 2 service, 1 devices, 1 incoming serial ports Network Service: Ethernet 2, Ethernet, en1 PCI Card: ATI Radeon HD 2600, display, Slot-1 Serial ATA Device: WDC WD3200AAJS-41VWA0, 298.09 GB Parallel ATA Device: PIONEER DVD-RW DVR-112D USB Device: Keyboard Hub, (null) mA USB Device: Apple Optical USB Mouse, (null) mA USB Device: Apple Keyboard, (null) mA USB Device: hub_device, (null) mA USB Device: Apple Cinema HD Display, (null) mA USB Device: Keyspan USA-28Xb, (null) mA USB Device: Bluetooth USB Host Controller, (null) mA FireWire Device: built-in_hub, unknown_value, unknown_speed FireWire Device: My Book, WD, 800mbit_speed FireWire Device: unknown_device, unknown_value, unknown_speed -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From jaakko.sipari at gmail.com Thu Jan 22 03:00:03 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 22 Jan 2009 12:00:03 +0200 Subject: [Rxtx] RXTX compilation with GCJ possible? Message-ID: <901f25b80901220200s53792317o374b80cbb6066a52@mail.gmail.com> Hi! Does anyone have experience on using RXTX in a GCJ compiled Java application? I'm interested whether this is possible in Windows and/or in Linux platforms. And of course what does it take to get it work, or does it just work out of the box. Ultimately my aim here would be to move to a more time deterministic system by utilizing GCJ, jRate & Javolution and possibly run the RXTX (and other important) threads at a priority higher than the garbage collector. This of course would require some modification for the RXTX threads to run in a Javolution pool context or non allocating real time contexts so they wouldn't produce any garbage, but that's something to hack on later. For now I'd just like to know if there are any obstacles on the road to compiling & running RXTX with GCJ. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/5592681a/attachment-0002.html From jmudd at dtiweb.net Thu Jan 22 06:21:03 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Thu, 22 Jan 2009 08:21:03 -0500 Subject: [Rxtx] Hot unplugging of a USB device References: <4977BEEA.4020708@gatworks.com> Message-ID: U. George, Thanks for the information. How did you resolve your USB/GPS device on Linux? My application has to run on both Linux and Windows eventually. Thanks, Jerry -----Original Message----- From: U. George [mailto:netbeans at gatworks.com] Sent: Wednesday, January 21, 2009 7:34 PM To: Jerry Mudd Cc: rxtx at qbang.org Subject: Re: [Rxtx] Hot unplugging of a USB device > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From m.kirkland at comcast.net Thu Jan 22 09:21:01 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Thu, 22 Jan 2009 08:21:01 -0800 Subject: [Rxtx] Serial port control lines change with call to getPortIdentifiers() on Linux Message-ID: <94443DEFFD574B6CA8DDB2B201D9E007@bengal.net> Hi All ! I have noticed an issue with RXTX on Ubuntu Linux 8.10 that has prevented me from being able to use RXTX on Linux. I have noticed this issue on both the rxtx 2.1.7 and the new rxtx2.2pre1. When I execute the following line to get the ports on a system - java.util.Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); Both DTR and RTS become active on ttyS0 and only ttyS0, not ttyS1 (I only have 2 ports). I see this prior to opening any ports or making any other calls to RXTX. I have stepped it though with the debugger and I am sure this is the trigger. My application uses these control lines to perform functions other then the standard flow control so it is critical that I be able to control them exactly. I would also think that folks using RXTX for more standard serial IO would also have issues with devices starting to talk before a listener was ready. I checked Windows XP and I do not see this issue (but I only have a com1 on the Windows computer). I also noticed that the DTR line blips when setting up a port on 2.2.pre1 like it does on 2.1.7r2. This it the same issue that the folks at http://www.codeskin.com/ patched. I see this issue on both Linux and Windows XP. Any help or clues would be greatly appreciated. If I can provide any additional info or do any testing I would be glad to help out to get version 2.2 in top shape for release. BTW I have written a simple dynamic loader to load the RXTX jar and native code that is drive by the os.name and os.arch system properties. I would be more then happy to contribute this to the project if folks though it would be useful. Its more convenient then having to manage copying the files around to various JVM's. TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/eab26bae/attachment.html From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0020.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0020.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0018.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0018.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0018.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0018.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0017.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0015.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0015.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0015.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0015.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0015.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0012.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0012.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0012.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment-0011.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0011.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment-0011.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment-0011.html From tjarvi at qbang.org Wed Jan 14 18:56:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 14 Jan 2009 18:56:50 -0700 (MST) Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Message-ID: On Wed, 14 Jan 2009, Jaakko Sipari wrote: > Hi (again)! > > Could someone clarify what these methods actually do and are they even > implemented? Do I get into trouble with buffer values of 0 (if I want to > handle the buffers myself)? > rxtx does not have buffers. It was not clear to me at the time why there would be a buffer when java already provides buffered input and output streams that can sit on top of rxtx. One reason I can see for implementing buffers in rxtx is to get data off the port so select() can block. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Wed Jan 14 23:23:08 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 15 Jan 2009 08:23:08 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> Message-ID: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Here's the same message for the list also. Forgot to do "Reply to all" ---------- Forwarded message ---------- From: Jaakko Sipari Date: Thu, Jan 15, 2009 at 8:22 AM Subject: Re: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize To: Trent Jarvi On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! >> >> Could someone clarify what these methods actually do and are they even >> implemented? Do I get into trouble with buffer values of 0 (if I want to >> handle the buffers myself)? >> >> > rxtx does not have buffers. It was not clear to me at the time why there > would be a buffer when java already provides buffered input and output > streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data off > the port so select() can block. > So basically those methods have currently no effect at all? - Jaakko -- Jaakko Sipari tel. +358451238191 eMail. jaakko.sipari at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090115/8b4c47c0/attachment-0010.html From tjarvi at qbang.org Thu Jan 15 18:37:12 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 15 Jan 2009 18:37:12 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: On Thu, 15 Jan 2009, Jaakko Sipari wrote: > Here's the same message for the list also. Forgot to do "Reply to all" > > ---------- Forwarded message ---------- > From: Jaakko Sipari > Date: Thu, Jan 15, 2009 at 8:22 AM > Subject: Re: [Rxtx] The functionality behind setInputBufferSize & > setOutputBufferSize > To: Trent Jarvi > > > On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! > > Could someone clarify what these methods actually do > and are they even > implemented? Do I get into trouble with buffer > values of 0 (if I want to > handle the buffers myself)? > > > rxtx does not have buffers. ?It was not clear to me at the time why > there would be a buffer when java already provides buffered input and > output streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data > off the port so select() can block. > > > So basically those methods have currently no effect at all? > Correct. You can use BufferedInputStream and BufferedOutputStream from the Java API once you get the Input/OutputStream from rxtx. But changing the input and output buffer size in rxtx is not going to change behavior. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Fri Jan 16 01:22:37 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Fri, 16 Jan 2009 10:22:37 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> > So basically those methods have currently no effect at all? >> >> > Correct. You can use BufferedInputStream and BufferedOutputStream from the > Java API once you get the Input/OutputStream from rxtx. But changing the > input and output buffer size in rxtx is not going to change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > I assume there still is some kind of buffer in rxtx (or the serial port driver) in case of processing delays. I mean, if the serial port gives data faster than can be read from the Java program using rxtx it isn't just thrown away, right? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090116/3bd9a52e/attachment-0009.html From tjarvi at qbang.org Fri Jan 16 05:17:24 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 16 Jan 2009 05:17:24 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> Message-ID: On Fri, 16 Jan 2009, Jaakko Sipari wrote: > > So basically those methods have currently no effect > at all? > > > Correct. ?You can use BufferedInputStream and BufferedOutputStream > from the Java API once you get the Input/OutputStream from rxtx. ?But > changing the input and output buffer size in rxtx is not going to > change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > > > > I assume there still is some kind of buffer in rxtx (or the serial port > driver) in case of processing delays. I mean, if the serial port gives data > faster than can be read from the Java program using rxtx it isn't just > thrown away, right? > The UART can usually hold a few bytes. The kernel driver can buffer the input. In practice, it works. With Sun commapi, the typical application has 4 buffers between the user and the incomming data. With rxtx, it is 3. BufferedInputStream -> commapi/rxtx -> kernel driver -> UART If you really do run into overflows on the UART, then hardware flow control is what you should be using and tinkering with rxtx to avoid it is not a very sound approach. -- Trent Jarvi tjarvi at qbang.org From llowrey at nuclearwinter.com Sun Jan 18 12:49:39 2009 From: llowrey at nuclearwinter.com (Larkin Lowrey) Date: Sun, 18 Jan 2009 13:49:39 -0600 Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain Message-ID: <497387D3.9040201@nuclearwinter.com> After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when running code that uses RXTXComm. The crashes only occur when using 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. As far as I can tell, the crash happens immediately on start. I can't see any evidence of much, if anything, happening before the crash. The code used to work and only stopped working after the "upgrade" to FC10. I have tried RXTX v2.1 and 2.2pre1. Any ideas? Here's the error: # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode linux-amd64) # Problematic frame: # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 --Larkin From tjarvi at qbang.org Mon Jan 19 17:48:34 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 19 Jan 2009 17:48:34 -0700 (MST) Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain In-Reply-To: <497387D3.9040201@nuclearwinter.com> References: <497387D3.9040201@nuclearwinter.com> Message-ID: On Sun, 18 Jan 2009, Larkin Lowrey wrote: > After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when > running code that uses RXTXComm. The crashes only occur when using > 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. > > As far as I can tell, the crash happens immediately on start. I can't > see any evidence of much, if anything, happening before the crash. > > The code used to work and only stopped working after the "upgrade" to > FC10. I have tried RXTX v2.1 and 2.2pre1. > > Any ideas? > > Here's the error: > > # > # An unexpected error has been detected by Java Runtime Environment: > # > # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 > # > # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode > linux-amd64) > # Problematic frame: > # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 > > > --Larkin Hi Larkin, I can think of 2 segv's in rxtx that may apply. Both are fixed in rxtx 2.2pre.. The first was that pointers required by nativeDrain needed to be stored in something larger than a 32 bit integer in java. This resulted in a crash like you see the first time the 'nativedrain' thread tried to use the pointer. The second was a concurrency issue George resolved with synchronization. The crash was usually during close but happened in the 'nativedrain' thread. (eventLoop) As mentioned, these are both fixed in the prerelease. There is a class provided in recent versions of RXTX that allow you confirm the version being used: gnu.io.RXTXVersion with member methods getVersion() and nativeGetVersion(). This allows you to confirm that you are indeed using the version you think you are. -- Trent Jarvi tjarvi at qbang.org From alexandrepoletto at gmail.com Wed Jan 21 11:48:07 2009 From: alexandrepoletto at gmail.com (Alexandre Poletto) Date: Wed, 21 Jan 2009 16:48:07 -0200 Subject: [Rxtx] work in windows but dont work in linux Message-ID: hi folks, I have an application to communicate with the serial port using rxtx, in the windows os my application works well, but when i try to run in the linux os i open the port (in windows "COM1", in Linux "/dev/ttyS0") send my commandes but i never receive any answer. I'm using ubuntu 8.10 and java 1.5, there is any configuration in that i'm missing? Thanks for the help! ps: Sorry form my bad english :( -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/70baea51/attachment-0003.html From jmudd at dtiweb.net Wed Jan 21 14:08:04 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Wed, 21 Jan 2009 16:08:04 -0500 Subject: [Rxtx] Hot unplugging of a USB device Message-ID: Looking to see if the issues surrounding an uplugging of a USB device have been resolved. I see from the mail list archives and bug reports that others have noted this issue. I have a USB GPS Receiver that is plugged into a Windows (XP) system and am using Netbeans 6.5 and Java jdk 1.6 and RXTX 2.1.7 and 2.2pre1. In the thread that is reading data via listening for a SerialEvent I can capture a Java IOException: No error in readArray. The application is essentially hung at this point. Only a termination of the application will clear it up and not leave the port hung. I had read in the archives that this is because the event loop in the native code portion is continually putting out the exceptions. I had also seen that this might be addressed in future releases. Any help is appreciated. Thanks, Jerry ________________________________ Jerry Mudd Senior Programmer 21795 Shangri-La Drive, Ste C Lexington Park, MD 20653 (301) 737-8893 (301) 737-8897 Fax jmudd at dtiweb.net www.dtiweb.net This message may contain sensitive, proprietary and/or privileged information. Disclosure is not authorized unless provided in writing by Defense Technologies, Inc. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0003.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 6296 bytes Desc: image001.gif Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0003.gif From netbeans at gatworks.com Wed Jan 21 17:33:46 2009 From: netbeans at gatworks.com (U. George) Date: Wed, 21 Jan 2009 19:33:46 -0500 Subject: [Rxtx] Hot unplugging of a USB device In-Reply-To: References: Message-ID: <4977BEEA.4020708@gatworks.com> > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:34 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:34 +1100 Subject: [Rxtx] Part 1 of 2 parts re rxtx 2.2 pre.. and OSX Message-ID: Hi, I have tried out the latest version of rxtx on a mac and can report that running with ImageJ (32 bit ) all seems to be fine. However when I attempt to use it with ImageJ64, I get a crash whenever the serial port is used. The details follow. What I did. Ran our plug-in in ImageJ 64 bit (1.42g) for Measuring, which is using the latest rxtx (the beta 2.2 compiled on 30 December 2008) for MacOSX 10.5.x) I installed this by putting the two files in the directory ~ LIBRARY/JAVA/EXTENSIONS. The Plug-in uses the serial port. The window we put up to show the numbers from the stage appeared, but only with the default "0" (zero) in each row, which is what we put there until we get data back from the port and the device attached. Then it crashed. I should point out that this all works fine using ImageJ (32 bit) 1.42g, on the same platform. So the only difference is the use of ImageJ 64 bit, and I guess the version of rxtx for 64 bit. I hope that cleverer people than me can throw some light onto this little problem. ImageJ64 seems to work ok until rxtx is called, although I haven't tried much so far, just some 3D rendering with 1 Gb of image data, which all went well, apart from the fact that the data was marginal. I am now showing the data supplied by the report to Apple window. This has three tabs, one to write your information in, one called Problem Details, and the third called SYSTEM CONFIG. These are pasted in below. Best wishes Noel Problem Details Process: JavaApplicationStub [463] Path: /Applications/ImageJ/ImageJ64.app/Contents/MacOS/JavaApplicationStub Identifier: gov.nih.info.rsb.ImageJ Version: ??? (10.2) Code Type: X86-64 (Native) Parent Process: launchd [398] Date/Time: 2009-01-19 10:48:09.342 +1100 OS Version: Mac OS X 10.5.6 (9G55) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000000029507c8 Crashed Thread: 16 Application Specific Information: Java information: Exception type: Bus Error (0xa) at pc=0x00000006ff70f418 Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0_07-b06-57 mixed mode macosx-amd64) Current thread (0x00000001020de800): JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] Stack: [0x0000000702851000,0x0000000702951000] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j gnu.io.RXTXPort.readByte()I+0 j gnu.io.RXTXPort$SerialInputStream.read()I+81 j SerialConnection.serialEvent(Lgnu/io/SerialPortEvent;)V+41 j gnu.io.RXTXPort.sendEvent(IZ)Z+382 v ~BufferBlob::StubRoutines (1) j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~BufferBlob::StubRoutines (1) Java Threads: ( => current thread ) =>0x00000001020de800 JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] 0x00000001020e8800 JavaThread "Measure XYZ" [_thread_blocked, id=44384256, stack(0x0000000702954000,0x0000000702a54000)] 0x0000000102001000 JavaThread "DestroyJavaVM" [_thread_blocked, id=25169920, stack(0x0000000101001000,0x0000000101801000)] 0x00000001020da800 JavaThread "SocketListener" [_thread_in_native, id=29671424, stack(0x0000000701b4c000,0x0000000701c4c000)] 0x00000001020b4800 JavaThread "AWT-EventQueue-0" [_thread_in_Java, id=-27992064, stack(0x00000006fe44e000,0x00000006fe54e000)] 0x0000000102096000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=-34344960, stack(0x00000006fde3f000,0x00000006fdf3f000)] 0x0000000102078000 JavaThread "AWT-Shutdown" [_thread_blocked, id=-58392576, stack(0x00000006fc750000,0x00000006fc850000)] 0x0000000102077800 JavaThread "AWT-AppKit" daemon [_thread_in_native, id=1886770976, stack(0x00007fff5f400000,0x00007fff5fc00000)] 0x0000000102044800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=-333877248, stack(0x00000006ec097000,0x00000006ec197000)] 0x0000000102043000 JavaThread "CompilerThread1" daemon [_thread_blocked, id=-334938112, stack(0x00000006ebf94000,0x00000006ec094000)] 0x0000000102041800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=-335998976, stack(0x00000006ebe91000,0x00000006ebf91000)] 0x0000000102041000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=-337059840, stack(0x00000006ebd8e000,0x00000006ebe8e000)] 0x0000000102029800 JavaThread "Finalizer" daemon [_thread_blocked, id=-338214912, stack(0x00000006ebc74000,0x00000006ebd74000)] 0x0000000102028800 JavaThread "Reference Handler" daemon [_thread_blocked, id=-339333120, stack(0x00000006ebb63000,0x00000006ebc63000)] Other Threads: 0x0000000102020800 VMThread [stack: 0x00000006eba60000,0x00000006ebb60000] [id=-340393984] 0x0000000102046000 WatcherThread [stack: 0x00000006ec19a000,0x00000006ec29a000] [id=-332816384] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 76480K, used 14448K [0x0000000105800000, 0x000000010ad50000, 0x00000002f9800000) eden space 65600K, 22% used [0x0000000105800000, 0x000000010661c398, 0x0000000109810000) from space 10880K, 0% used [0x0000000109810000, 0x0000000109810000, 0x000000010a2b0000) to space 10880K, 0% used [0x000000010a2b0000, 0x000000010a2b0000, 0x000000010ad50000) tenured generation total 174784K, used 0K [0x00000002f9800000, 0x00000003042b0000, 0x00000006e1800000) the space 174784K, 0% used [0x00000002f9800000, 0x00000002f9800000, 0x00000002f9800200, 0x00000003042b0000) compacting perm gen total 21248K, used 10319K [0x00000006e1800000, 0x00000006e2cc0000, 0x00000006e6c00000) the space 21248K, 48% used [0x00000006e1800000, 0x00000006e2213d28, 0x00000006e2213e00, 0x00000006e2cc0000) No shared spaces configured. Virtual Machine Arguments: JVM Args: -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher. framework/Resources/LauncherSupport.jar -Xms256m -Xmx24000m -Dcom.apple.macos.useScreenMenuBar=false -Dcom.apple.mrj.application.growbox.intrudes=false -Dcom.apple.mrj.application.live-resize=true -Dcom.apple.hwaccel=false -Dapple.awt.Antialiasing=false -Dcom.apple.smallTabs=true -Dapple.awt.brushMetalLook=false Java Command: Launcher Type: generic Physical Memory: Page Size = 4k, Total = 2048M, Free = 30996M Thread 0: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 com.apple.CoreFoundation 0x00007fff8204dc4f CFRunLoopRunSpecific + 1631 3 com.apple.HIToolbox 0x00007fff839fdda2 RunCurrentEventLoopInMode + 278 4 com.apple.HIToolbox 0x00007fff839fdbd8 ReceiveNextEventCommon + 322 5 com.apple.HIToolbox 0x00007fff839fda83 BlockUntilNextEventMatchingListInMode + 79 6 com.apple.AppKit 0x00007fff8299d3b0 _DPSNextEvent + 603 7 com.apple.AppKit 0x00007fff8299ccf1 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 136 8 com.apple.AppKit 0x00007fff82996a84 -[NSApplication run] + 455 9 libawt.jnilib 0x00000006ec433257 +[AWTStarter startAWT:] + 1343 10 libawt.jnilib 0x00000006ec432c46 -[CPerformer perform] + 112 11 com.apple.Foundation 0x00007fff8153f2b4 __NSThreadPerformPerform + 148 12 com.apple.CoreFoundation 0x00007fff8204e0e8 CFRunLoopRunSpecific + 2808 13 ...ple.JavaApplicationLauncher 0x0000000100005165 startupJava(LauncherArgsStruct*) + 235 14 ...ple.JavaApplicationLauncher 0x000000010000579c launchJavaApplication + 1224 15 JavaApplicationStub 0x0000000100000b9c 0x100000000 + 2972 Thread 1: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x0000000101a93b61 JVM_GetCPFieldModifiers + 128961 5 libjvm.dylib 0x0000000101a93a36 JVM_GetCPFieldModifiers + 128662 6 ...ple.JavaApplicationLauncher 0x000000010000c0ce startJavaApplication + 2886 7 ...ple.JavaApplicationLauncher 0x000000010000506d java_main_stub(void*) + 9 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 2: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libSystem.B.dylib 0x00007fff840db0b0 mach_msg_server + 436 3 libjvm.dylib 0x000000010181176d JNI_CreateJavaVM_Impl + 53277 4 libjvm.dylib 0x0000000101811375 JNI_CreateJavaVM_Impl + 52261 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 3: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x00000001018e452f JVM_Lseek + 235727 5 libjvm.dylib 0x00000001018e42df JVM_Lseek + 235135 6 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 7 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 8 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 4: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x00000001028003ea 0 + 4336911338 11 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 12 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 13 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 14 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 15 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 16 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 17 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 18 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 19 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 20 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 5: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 6: 0 libSystem.B.dylib 0x00007fff8406dd72 semaphore_wait_trap + 10 1 libjvm.dylib 0x0000000101915bdb JVM_IsPrimitiveClass + 12139 2 libjvm.dylib 0x00000001019155b5 JVM_IsPrimitiveClass + 10565 3 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 4 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 7: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 8: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 9: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x0000000101918ec8 JVM_IsPrimitiveClass + 25176 5 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 6 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 7 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 10: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x000000010191abb5 JVM_IsPrimitiveClass + 32581 4 libjvm.dylib 0x000000010191a70a JVM_IsPrimitiveClass + 31386 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 11: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 12: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x0000000102803414 0 + 4336923668 12 ??? 0x00000001028003ea 0 + 4336911338 13 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 14 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 15 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 16 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 17 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 18 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 19 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 20 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 21 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 22 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 13: 0 ??? 0x0000000102817034 0 + 4337004596 1 ??? 0x000000010280304e 0 + 4336922702 2 ??? 0x0000000102803093 0 + 4336922771 3 ??? 0x000000010280356d 0 + 4336924013 4 ??? 0x0000000102803093 0 + 4336922771 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x000000010280356d 0 + 4336924013 8 ??? 0x0000000102803093 0 + 4336922771 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x0000000102802f3a 0 + 4336922426 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102802f3a 0 + 4336922426 14 ??? 0x0000000102802f3a 0 + 4336922426 15 ??? 0x0000000102803162 0 + 4336922978 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102802f3a 0 + 4336922426 19 ??? 0x0000000102802f3a 0 + 4336922426 20 ??? 0x00000001028003ea 0 + 4336911338 21 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 22 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 23 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 24 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 25 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 26 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 27 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 28 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 29 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 30 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 14: 0 libSystem.B.dylib 0x00007fff840f210e accept + 10 1 libnet.jnilib 0x00000006ff6b6b11 Java_java_net_PlainSocketImpl_socketAccept + 277 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x0000000102802f3a 0 + 4336922426 4 ??? 0x0000000102802f3a 0 + 4336922426 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x0000000102803414 0 + 4336923668 8 ??? 0x00000001028003ea 0 + 4336911338 9 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 10 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 11 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 12 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 13 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 14 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 15 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 16 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 17 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 18 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 15: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x000000010280304e 0 + 4336922702 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102803414 0 + 4336923668 14 ??? 0x0000000102803093 0 + 4336922771 15 ??? 0x0000000102803093 0 + 4336922771 16 ??? 0x0000000102803093 0 + 4336922771 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102803414 0 + 4336923668 19 ??? 0x00000001028003ea 0 + 4336911338 20 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 21 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 22 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 23 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 24 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 25 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 26 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 27 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 28 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 29 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 Crashed: 0 librxtxSerial.jnilib 0x00000006ff70f418 read_byte_array + 68 1 librxtxSerial.jnilib 0x00000006ff70f9b3 Java_gnu_io_RXTXPort_readByte + 93 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x000000010280304e 0 + 4336922702 4 ??? 0x000000010280304e 0 + 4336922702 5 ??? 0x0000000102803414 0 + 4336923668 6 ??? 0x00000001028003ea 0 + 4336911338 7 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 8 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 9 libjvm.dylib 0x00000001018e5be8 JVM_Lseek + 241544 10 libjvm.dylib 0x0000000101900b11 JVM_MonitorWait + 17249 11 libjvm.dylib 0x0000000101a1e59e JVM_DisableCompiler + 1166 12 librxtxSerial.jnilib 0x00000006ff70d91e send_event + 132 13 librxtxSerial.jnilib 0x00000006ff70e82b report_serial_events + 92 14 librxtxSerial.jnilib 0x00000006ff7108c9 Java_gnu_io_RXTXPort_eventLoop + 237 15 ??? 0x000000010280e878 0 + 4336969848 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x00000001028003ea 0 + 4336911338 18 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 19 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 20 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 21 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 22 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 23 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 24 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 25 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 26 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 27 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 17: 0 libSystem.B.dylib 0x00007fff84074d02 __semwait_signal + 10 1 libSystem.B.dylib 0x00007fff840dce91 usleep + 57 2 librxtxSerial.jnilib 0x00000006ff70d729 drain_loop + 45 3 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 4 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 crashed with X86 Thread State (64-bit): rax: 0x00000000029507c0 rbx: 0x0000000000000041 rcx: 0x0000000000000065 rdx: 0x0000000000000002 rdi: 0x00000006ff71205e rsi: 0x00000006ff711c67 rbp: 0x0000000702950000 rsp: 0x000000070294fef0 r8: 0x000000000000004d r9: 0x00000006e21d64c0 r10: 0x00000006e21d38e8 r11: 0x00000000000000d2 r12: 0x00000001020de998 r13: 0x00000006e21d93b0 r14: 0x0000000000000032 r15: 0x00000000029507c0 rip: 0x00000006ff70f418 rfl: 0x0000000000010202 cr2: 0x00000000029507c8 Continued in the message part 2 -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:41 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:41 +1100 Subject: [Rxtx] Part 2 re rxtx 2.2 pre... and MacOSX Message-ID: Continued from Part 1. Binary Images: 0x100000000 - 0x100000fff JavaApplicationStub ??? (???) /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationS tub 0x100004000 - 0x100011fff com.apple.JavaApplicationLauncher 12.2.0 (12.2.0) /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/JavaApplicationLauncher 0x10001a000 - 0x100022ffd com.apple.JavaVM 12.2.0 (12.2.0) <2b178e8d4bbcc0aa427c2f3f71bb2fcb> /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM 0x100055000 - 0x10005dff0 libverify.dylib ??? (???) <56eac95084cb86cd1339a721b1353182> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libveri fy.dylib 0x100063000 - 0x10006cffb JavaNativeFoundation ??? (???) <68ca6409dc49542301edda1e0744ac69> /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNative Foundation.framework/Versions/A/JavaNativeFoundation 0x1000a8000 - 0x1000c7fef libjava.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjava .jnilib 0x1000d8000 - 0x1000e5ffb libzip.jnilib ??? (???) <5b6dce7c9a1f25aa5dff1a633c9dc342> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libzip. jnilib 0x101803000 - 0x101eafff3 libjvm.dylib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bundle/Libra ries/libjvm.dylib 0x6ec2c5000 - 0x6ec2c6fff liblauncher.jnilib ??? (???) <567fa54a222b965b2c4aefea21d9800a> /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/Resources/liblauncher.jnilib 0x6ec431000 - 0x6ec5e4fff libawt.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libawt. jnilib 0x6fdc3b000 - 0x6fdc3cfff ATSHI.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/Resources/ATSHI.dylib 0x6fdd6e000 - 0x6fdd6efff libcmm.jnilib ??? (???) <114e1a620a6920d77bf09bd57a7f7d52> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libcmm. jnilib 0x6fdd9e000 - 0x6fde1fff7 libfontmanager.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libfont manager.jnilib 0x6fdf41000 - 0x6fdf8ffff libsuncmm.jnilib ??? (???) <47330f1f17822de3a5cf921e07615cf7> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libsunc mm.jnilib 0x6fdf95000 - 0x6fdfc4ff7 libjpeg.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjpeg .jnilib 0x6ff6ae000 - 0x6ff6baffb libnet.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnet. jnilib 0x6ff6c0000 - 0x6ff6c4fff libnio.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnio. jnilib 0x6ff6d4000 - 0x6ff6e8ff7 libdcpr.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libdcpr .jnilib 0x6ff70c000 - 0x6ff713fff +librxtxSerial.jnilib ??? (???) <5133deacebd01ceab7d528c541241956> /Library/Java/Extensions/librxtxSerial.jnilib 0x6ff734000 - 0x6ff74bfef libJapaneseConverter.dylib ??? (???) <64cca6bb4650a269f49a8427507e4963> /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib 0x70204f000 - 0x702218fef com.apple.RawCamera.bundle 2.0.10 (2.0.10) /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera 0x7fff5fc00000 - 0x7fff5fc2e643 dyld 97.1 (???) /usr/lib/dyld 0x7fff80003000 - 0x7fff80146ffb com.apple.audio.toolbox.AudioToolbox 1.5.2 (1.5.2) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x7fff801d2000 - 0x7fff801d5ffb com.apple.help 1.1 (36) <9000c05ccad96fdcc25bc35264abf587> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.frame work/Versions/A/Help 0x7fff801d6000 - 0x7fff80211fff com.apple.AE 402.2 (402.2) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.f ramework/Versions/A/AE 0x7fff80212000 - 0x7fff80257fef libRIP.A.dylib ??? (???) <8c818d7fd3dc57839ac48caf107ff4c0> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x7fff80258000 - 0x7fff8029bfef com.apple.QD 3.11.54 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/QD.framework/Versions/A/QD 0x7fff8029c000 - 0x7fff802dffef libTIFF.dylib ??? (???) <86be7909f46cc044a887cbb60ab7826d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x7fff802e0000 - 0x7fff803d4fff libobjc.A.dylib ??? (???) <118dc1ae05e685ad64290352fc94f1f0> /usr/lib/libobjc.A.dylib 0x7fff803d5000 - 0x7fff8045dfe7 libsqlite3.0.dylib ??? (???) <3c7ab3523b816dbd3e039ee7e6e2c580> /usr/lib/libsqlite3.0.dylib 0x7fff8045e000 - 0x7fff80466ffa libbsm.dylib ??? (???) <4d838c0d8a74fe61c781a53a8723303d> /usr/lib/libbsm.dylib 0x7fff80467000 - 0x7fff80497fff com.apple.shortcut 1 (1.0) <9822328df9321a661af3afcc841e8f80> /System/Library/PrivateFrameworks/Shortcut.framework/Versions/A/Shortcut 0x7fff80498000 - 0x7fff8049bfff com.apple.securityhi 3.0 (30817) <00ddd6e60692b62b7649573eab8aef5a> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI .framework/Versions/A/SecurityHI 0x7fff8049c000 - 0x7fff8049efff com.apple.print.framework.Print 218.0.2 (220.1) <2b847a0a1cd885f596a4d10409d50ba3> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.fram ework/Versions/A/Print 0x7fff8049f000 - 0x7fff805dbfe9 com.apple.ImageIO.framework 2.0.4 (2.0.4) <47dcdc0b5986b2c157e0b6dae48ce464> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/ImageIO 0x7fff805dc000 - 0x7fff805f9fef com.apple.CoreVideo 1.5.1 (1.5.1) <78253b3fe8d3dcc90f159d7ed866c295> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x7fff805fa000 - 0x7fff8068bfff com.apple.SearchKit 1.2.1 (1.2.1) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Sear chKit.framework/Versions/A/SearchKit 0x7fff8068c000 - 0x7fff80e49fef libBLAS.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libBLAS.dylib 0x7fff80e4a000 - 0x7fff81416fff com.apple.CoreGraphics 1.407.2 (???) <436dbc70f8c9b29b3beb1d2de220acf2> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/CoreGraphics 0x7fff81417000 - 0x7fff8141dfff com.apple.DiskArbitration 2.2.1 (2.2.1) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitrat ion 0x7fff8141e000 - 0x7fff8145bff7 com.apple.SystemConfiguration 1.9.2 (1.9.2) <150119d0cecb0c80f6736b9881c2411e> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemCo nfiguration 0x7fff8145c000 - 0x7fff81523fec com.apple.CFNetwork 422.11 (422.11) <570ca46de3b907cb1c8e33fc62f562b4> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNe twork.framework/Versions/A/CFNetwork 0x7fff81524000 - 0x7fff8152dfff libCGATS.A.dylib ??? (???) <722a0bbd58740d46739008e881010631> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib 0x7fff8152e000 - 0x7fff81533fff com.apple.CommonPanels 1.2.4 (85) <2cec1ecc95cf1ecea8bea030975a46b8> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPane ls.framework/Versions/A/CommonPanels 0x7fff81534000 - 0x7fff817cffe3 com.apple.Foundation 6.5.7 (677.22) <8134977fcc57198a53dc494b60592980> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x7fff817d0000 - 0x7fff817d0ffd com.apple.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x7fff817d1000 - 0x7fff81cf1fc6 libGLProgrammability.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgra mmability.dylib 0x7fff81cf2000 - 0x7fff81cf4fff com.apple.NavigationServices 3.5.2 (163) <7cb7f3fe7f9d56ec89ef28a6d3a1da7d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Navigation Services.framework/Versions/A/NavigationServices 0x7fff81cf5000 - 0x7fff81d32fe7 com.apple.coreui 1.2 (62) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x7fff81d33000 - 0x7fff81d33fff com.apple.Carbon 136 (136) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x7fff81d34000 - 0x7fff81d42fff libCSync.A.dylib ??? (???) <61f6cc104b3e9b77cd583635a3a9a5cf> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x7fff81d43000 - 0x7fff81d45ff9 libRadiance.dylib ??? (???) <6d9f2235e8f70a7aedfc59383a7548d8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x7fff81d46000 - 0x7fff81db5ff9 com.apple.print.framework.PrintCore 5.5.3 (245.3) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/PrintCore.framework/Versions/A/PrintCore 0x7fff81db6000 - 0x7fff81db6ff8 com.apple.ApplicationServices 34 (34) <81cd02cc2ccf4e47e51d03db860da556> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Applicat ionServices 0x7fff81db7000 - 0x7fff81dd8fff libresolv.9.dylib ??? (???) <38318f9fbcfbdb384e0f9b08cc0e757a> /usr/lib/libresolv.9.dylib 0x7fff81dd9000 - 0x7fff81e4ffef libvMisc.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvMisc.dylib 0x7fff81e50000 - 0x7fff81e52ff7 libffi.dylib ??? (???) <920bb19728451f35703bb95dc908c7ca> /usr/lib/libffi.dylib 0x7fff81e53000 - 0x7fff81eeefe7 com.apple.ink.framework 101.3 (86) <60c6579faf114ea9677fd9ae25389ed2> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framew ork/Versions/A/Ink 0x7fff81eef000 - 0x7fff81f0dfff libPng.dylib ??? (???) <4017eab74319a648dfd73b7d503e557d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x7fff81f0e000 - 0x7fff81f24ff9 com.apple.ImageCapture 5.0.1 (5.0.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCaptu re.framework/Versions/A/ImageCapture 0x7fff81f25000 - 0x7fff81f3dfff com.apple.DictionaryServices 1.0.0 (1.0.0) <78ea11e9a92120f76d69efa24b8d1f95> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Dict ionaryServices.framework/Versions/A/DictionaryServices 0x7fff81f3e000 - 0x7fff81f42fff libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib 0x7fff81f43000 - 0x7fff81fe3fe3 com.apple.ApplicationServices.ATS 3.4 (???) <47cf09bf78935889f17f1b6b09badf0d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/ATS 0x7fff81fe4000 - 0x7fff8211bfff com.apple.CoreFoundation 6.5.5 (476.17) <51930d43c7c2d8fb24148cbfc05bba0f> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundatio n 0x7fff8211c000 - 0x7fff82126fff com.apple.speech.recognition.framework 3.7.24 (3.7.24) <2399374b096b284345daba82e2cb833d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechReco gnition.framework/Versions/A/SpeechRecognition 0x7fff82127000 - 0x7fff82159ff7 libauto.dylib ??? (???) /usr/lib/libauto.dylib 0x7fff8215a000 - 0x7fff821cefe7 libstdc++.6.dylib ??? (???) <565ee6f798f7fef6f804c60682787280> /usr/lib/libstdc++.6.dylib 0x7fff821cf000 - 0x7fff8228dfff edu.mit.Kerberos 6.0.12 (6.0.12) /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x7fff8228e000 - 0x7fff8228effb com.apple.installserver.framework 1.0 (8) /System/Library/PrivateFrameworks/InstallServer.framework/Versions/A/Install Server 0x7fff8228f000 - 0x7fff82293fff libGIF.dylib ??? (???) <66436b84211fe0e723051eab15af0aca> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x7fff82294000 - 0x7fff8258ffe3 com.apple.CoreServices.CarbonCore 786.10 (786.10) <2ac701edf3ca98a86ae9d5f733200b40> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Carb onCore.framework/Versions/A/CarbonCore 0x7fff82590000 - 0x7fff825aafff libvDSP.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvDSP.dylib 0x7fff825ab000 - 0x7fff827b1ff3 com.apple.security 5.0.4 (34102) <47c559b17c1f51998e7a981d0fbec4c8> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x7fff827b2000 - 0x7fff827d9fff libxslt.1.dylib ??? (???) /usr/lib/libxslt.1.dylib 0x7fff827da000 - 0x7fff82948fff libicucore.A.dylib ??? (???) <374ddaf141bf88dba00ab9058f2dbad6> /usr/lib/libicucore.A.dylib 0x7fff82949000 - 0x7fff8295dff7 libGL.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x7fff8295e000 - 0x7fff83286fff com.apple.AppKit 6.5.6 (949.43) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x7fff83287000 - 0x7fff83667fef com.apple.QuartzCore 1.5.7 (1.5.7) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x7fff83668000 - 0x7fff836b8fe7 com.apple.Metadata 10.5.2 (398.25) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Meta data.framework/Versions/A/Metadata 0x7fff836b9000 - 0x7fff836baff3 com.apple.audio.units.AudioUnit 1.5 (1.5) /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x7fff836bb000 - 0x7fff83710fe3 com.apple.HIServices 1.7.0 (???) <6bef766448d67adb91901b432629ea0f> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/HIServices.framework/Versions/A/HIServices 0x7fff83711000 - 0x7fff83711ffd com.apple.Accelerate.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/vecLib 0x7fff83712000 - 0x7fff837a7ffb com.apple.LaunchServices 290.3 (290.3) <56544e16c5192d2ce72df772901fcaef> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Laun chServices.framework/Versions/A/LaunchServices 0x7fff837a8000 - 0x7fff8382ffef com.apple.audio.CoreAudio 3.1.1 (3.1.1) <9c1714647fd7515c900362ad2ac76874> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x7fff83830000 - 0x7fff83893fef libGLU.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dyli b 0x7fff83894000 - 0x7fff838a2ff9 com.apple.helpdata 1.0.1 (14.2) /System/Library/PrivateFrameworks/HelpData.framework/Versions/A/HelpData 0x7fff838a3000 - 0x7fff838afff1 libgcc_s.1.dylib ??? (???) <23fa31a628c1ea8a62ac529fa333b6e1> /usr/lib/libgcc_s.1.dylib 0x7fff838b0000 - 0x7fff838d2fff libJPEG.dylib ??? (???) <4257ab268996bbeb93b47946df181cdc> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x7fff838d3000 - 0x7fff838d3ffd com.apple.Accelerate 1.4.2 (Accelerate 1.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x7fff838d4000 - 0x7fff838d4ff8 com.apple.Cocoa 6.5 (???) <8c59f679ffbd9178134df1d83dedde28> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa 0x7fff838d5000 - 0x7fff839cafff libxml2.2.dylib ??? (???) <8226d1180354f493954c5fa1fc0e1154> /usr/lib/libxml2.2.dylib 0x7fff839cb000 - 0x7fff839dafe7 com.apple.opengl 1.5.9 (1.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x7fff839db000 - 0x7fff83cc2feb com.apple.HIToolbox 1.5.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. framework/Versions/A/HIToolbox 0x7fff83cc3000 - 0x7fff83d03fef com.apple.framework.IOKit 1.5.1 (???) <17e6707127a60c5e2d7a9bd2b7bf2db0> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x7fff83d04000 - 0x7fff83dc8fe2 com.apple.vImage 3.0 (3.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage .framework/Versions/A/vImage 0x7fff83dc9000 - 0x7fff83df3fff libcups.2.dylib ??? (???) /usr/lib/libcups.2.dylib 0x7fff83df4000 - 0x7fff83df4ffa com.apple.CoreServices 32 (32) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x7fff83df5000 - 0x7fff83ed6fff libcrypto.0.9.7.dylib ??? (???) <66f1f8773bd9fdfdcfd09e2b4b010636> /usr/lib/libcrypto.0.9.7.dylib 0x7fff83ed7000 - 0x7fff83f87fef com.apple.CoreServices.OSServices 226.5 (226.5) <1c38f727b3ad3293272db7323b37c735> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSSe rvices.framework/Versions/A/OSServices 0x7fff83f88000 - 0x7fff83fa2fff com.apple.openscripting 1.2.8 (???) <0674c4e3353c677c9f58df3297ae559b> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScript ing.framework/Versions/A/OpenScripting 0x7fff83fa3000 - 0x7fff83fdfff7 libGLImage.dylib ??? (???) <02258bcdbe8defdb254acc077a81dd9b> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage. dylib 0x7fff83fe0000 - 0x7fff83ff1fff com.apple.speech.synthesis.framework 3.7.1 (3.7.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x7fff83ff2000 - 0x7fff8406cff3 com.apple.CoreText 2.0.3 (???) <827bbfef670df72316719c25bfb39915> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreText.framework/Versions/A/CoreText 0x7fff8406d000 - 0x7fff841f8ffb libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0x7fff841f9000 - 0x7fff8420affd libz.1.dylib ??? (???) /usr/lib/libz.1.dylib 0x7fff8420b000 - 0x7fff842befef com.apple.DesktopServices 1.4.7 (1.4.7) /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/D esktopServicesPriv 0x7fff842bf000 - 0x7fff84677fff libLAPACK.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libLAPACK.dylib 0x7fff84678000 - 0x7fff84743fef com.apple.ColorSync 4.5.1 (4.5.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ColorSync.framework/Versions/A/ColorSync 0x7fff84744000 - 0x7fff84847feb com.apple.CoreData 100.1 (186) <074abc7f43f81f7885e4d0674a8be4bc> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x7fffffe00000 - 0x7fffffe01780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0xfffffffffffec000 - 0xfffffffffffeffff libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib SYSTEM CONFIG Model: MacPro3,1, BootROM MP31.006C.B05, 8 processors, Quad-Core Intel Xeon, 2.8 GHz, 32 GB Graphics: kHW_ATIrv630Item, ATI Radeon HD 2600, spdisplays_pcie_device, 256 MB Memory Module: DIMM Riser B/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Bluetooth: Version 2.1.3f8, 2 service, 1 devices, 1 incoming serial ports Network Service: Ethernet 2, Ethernet, en1 PCI Card: ATI Radeon HD 2600, display, Slot-1 Serial ATA Device: WDC WD3200AAJS-41VWA0, 298.09 GB Parallel ATA Device: PIONEER DVD-RW DVR-112D USB Device: Keyboard Hub, (null) mA USB Device: Apple Optical USB Mouse, (null) mA USB Device: Apple Keyboard, (null) mA USB Device: hub_device, (null) mA USB Device: Apple Cinema HD Display, (null) mA USB Device: Keyspan USA-28Xb, (null) mA USB Device: Bluetooth USB Host Controller, (null) mA FireWire Device: built-in_hub, unknown_value, unknown_speed FireWire Device: My Book, WD, 800mbit_speed FireWire Device: unknown_device, unknown_value, unknown_speed -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From jaakko.sipari at gmail.com Thu Jan 22 03:00:03 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 22 Jan 2009 12:00:03 +0200 Subject: [Rxtx] RXTX compilation with GCJ possible? Message-ID: <901f25b80901220200s53792317o374b80cbb6066a52@mail.gmail.com> Hi! Does anyone have experience on using RXTX in a GCJ compiled Java application? I'm interested whether this is possible in Windows and/or in Linux platforms. And of course what does it take to get it work, or does it just work out of the box. Ultimately my aim here would be to move to a more time deterministic system by utilizing GCJ, jRate & Javolution and possibly run the RXTX (and other important) threads at a priority higher than the garbage collector. This of course would require some modification for the RXTX threads to run in a Javolution pool context or non allocating real time contexts so they wouldn't produce any garbage, but that's something to hack on later. For now I'd just like to know if there are any obstacles on the road to compiling & running RXTX with GCJ. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/5592681a/attachment-0003.html From jmudd at dtiweb.net Thu Jan 22 06:21:03 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Thu, 22 Jan 2009 08:21:03 -0500 Subject: [Rxtx] Hot unplugging of a USB device References: <4977BEEA.4020708@gatworks.com> Message-ID: U. George, Thanks for the information. How did you resolve your USB/GPS device on Linux? My application has to run on both Linux and Windows eventually. Thanks, Jerry -----Original Message----- From: U. George [mailto:netbeans at gatworks.com] Sent: Wednesday, January 21, 2009 7:34 PM To: Jerry Mudd Cc: rxtx at qbang.org Subject: Re: [Rxtx] Hot unplugging of a USB device > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From m.kirkland at comcast.net Thu Jan 22 09:21:01 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Thu, 22 Jan 2009 08:21:01 -0800 Subject: [Rxtx] Serial port control lines change with call to getPortIdentifiers() on Linux Message-ID: <94443DEFFD574B6CA8DDB2B201D9E007@bengal.net> Hi All ! I have noticed an issue with RXTX on Ubuntu Linux 8.10 that has prevented me from being able to use RXTX on Linux. I have noticed this issue on both the rxtx 2.1.7 and the new rxtx2.2pre1. When I execute the following line to get the ports on a system - java.util.Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); Both DTR and RTS become active on ttyS0 and only ttyS0, not ttyS1 (I only have 2 ports). I see this prior to opening any ports or making any other calls to RXTX. I have stepped it though with the debugger and I am sure this is the trigger. My application uses these control lines to perform functions other then the standard flow control so it is critical that I be able to control them exactly. I would also think that folks using RXTX for more standard serial IO would also have issues with devices starting to talk before a listener was ready. I checked Windows XP and I do not see this issue (but I only have a com1 on the Windows computer). I also noticed that the DTR line blips when setting up a port on 2.2.pre1 like it does on 2.1.7r2. This it the same issue that the folks at http://www.codeskin.com/ patched. I see this issue on both Linux and Windows XP. Any help or clues would be greatly appreciated. If I can provide any additional info or do any testing I would be glad to help out to get version 2.2 in top shape for release. BTW I have written a simple dynamic loader to load the RXTX jar and native code that is drive by the os.name and os.arch system properties. I would be more then happy to contribute this to the project if folks though it would be useful. Its more convenient then having to manage copying the files around to various JVM's. TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/eab26bae/attachment-0001.html From josefk_5 at yahoo.com Fri Jan 23 09:44:06 2009 From: josefk_5 at yahoo.com (Josef Kahsay) Date: Fri, 23 Jan 2009 08:44:06 -0800 (PST) Subject: [Rxtx] Help on Accessing RS232 Message-ID: <509617.88308.qm@web38205.mail.mud.yahoo.com> Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS From m.kirkland at comcast.net Sat Jan 24 01:28:52 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Sat, 24 Jan 2009 00:28:52 -0800 Subject: [Rxtx] Help on Accessing RS232 In-Reply-To: <509617.88308.qm@web38205.mail.mud.yahoo.com> References: <509617.88308.qm@web38205.mail.mud.yahoo.com> Message-ID: <665887C02E1446708CE392FE0BD73D79@bengal.net> It seems to me that you are having a classic java classpath issue. Java classpath issues can be annoying to solve sometimes. As some random guesses I would suggest you look at the following. 1 - You might not be running the JVM from the location that you think you are (gets me all the time). I which Windows had a which command. 2 - You don't mention what development environment you are using like Eclipse etc., and if you are trying to run the demo from inside the development environment. If so, do whatever is appropriate for the development environment to control the classpath. In Eclipse this would involve adding a "User Library" to point to the jar and native code. 3 - Once you get the classpath ok, the next thing you might run into is not being able to load the native library. 4 - I have found that on XP I can place the RXTX jar and native library in the same directory as my application's jar file (and a class-path entry in the application's jar file manifest) and it all works. 5 - If you need more control of managing different versions of RXTX for different OS platforms, I have a dynamic RXTX loader I can send you (but I recommend getting the simple case working first). Let me know if this helps. Mike -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Josef Kahsay Sent: Friday, January 23, 2009 8:44 AM To: rxtx at qbang.org Subject: [Rxtx] Help on Accessing RS232 Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0021.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0021.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0019.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0019.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0019.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0019.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0018.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0016.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0016.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0016.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0016.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0016.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0013.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0013.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0013.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment-0012.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0012.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment-0012.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment-0012.html From tjarvi at qbang.org Wed Jan 14 18:56:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 14 Jan 2009 18:56:50 -0700 (MST) Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Message-ID: On Wed, 14 Jan 2009, Jaakko Sipari wrote: > Hi (again)! > > Could someone clarify what these methods actually do and are they even > implemented? Do I get into trouble with buffer values of 0 (if I want to > handle the buffers myself)? > rxtx does not have buffers. It was not clear to me at the time why there would be a buffer when java already provides buffered input and output streams that can sit on top of rxtx. One reason I can see for implementing buffers in rxtx is to get data off the port so select() can block. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Wed Jan 14 23:23:08 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 15 Jan 2009 08:23:08 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> Message-ID: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Here's the same message for the list also. Forgot to do "Reply to all" ---------- Forwarded message ---------- From: Jaakko Sipari Date: Thu, Jan 15, 2009 at 8:22 AM Subject: Re: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize To: Trent Jarvi On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! >> >> Could someone clarify what these methods actually do and are they even >> implemented? Do I get into trouble with buffer values of 0 (if I want to >> handle the buffers myself)? >> >> > rxtx does not have buffers. It was not clear to me at the time why there > would be a buffer when java already provides buffered input and output > streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data off > the port so select() can block. > So basically those methods have currently no effect at all? - Jaakko -- Jaakko Sipari tel. +358451238191 eMail. jaakko.sipari at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090115/8b4c47c0/attachment-0011.html From tjarvi at qbang.org Thu Jan 15 18:37:12 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 15 Jan 2009 18:37:12 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: On Thu, 15 Jan 2009, Jaakko Sipari wrote: > Here's the same message for the list also. Forgot to do "Reply to all" > > ---------- Forwarded message ---------- > From: Jaakko Sipari > Date: Thu, Jan 15, 2009 at 8:22 AM > Subject: Re: [Rxtx] The functionality behind setInputBufferSize & > setOutputBufferSize > To: Trent Jarvi > > > On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! > > Could someone clarify what these methods actually do > and are they even > implemented? Do I get into trouble with buffer > values of 0 (if I want to > handle the buffers myself)? > > > rxtx does not have buffers. ?It was not clear to me at the time why > there would be a buffer when java already provides buffered input and > output streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data > off the port so select() can block. > > > So basically those methods have currently no effect at all? > Correct. You can use BufferedInputStream and BufferedOutputStream from the Java API once you get the Input/OutputStream from rxtx. But changing the input and output buffer size in rxtx is not going to change behavior. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Fri Jan 16 01:22:37 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Fri, 16 Jan 2009 10:22:37 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> > So basically those methods have currently no effect at all? >> >> > Correct. You can use BufferedInputStream and BufferedOutputStream from the > Java API once you get the Input/OutputStream from rxtx. But changing the > input and output buffer size in rxtx is not going to change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > I assume there still is some kind of buffer in rxtx (or the serial port driver) in case of processing delays. I mean, if the serial port gives data faster than can be read from the Java program using rxtx it isn't just thrown away, right? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090116/3bd9a52e/attachment-0010.html From tjarvi at qbang.org Fri Jan 16 05:17:24 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 16 Jan 2009 05:17:24 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> Message-ID: On Fri, 16 Jan 2009, Jaakko Sipari wrote: > > So basically those methods have currently no effect > at all? > > > Correct. ?You can use BufferedInputStream and BufferedOutputStream > from the Java API once you get the Input/OutputStream from rxtx. ?But > changing the input and output buffer size in rxtx is not going to > change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > > > > I assume there still is some kind of buffer in rxtx (or the serial port > driver) in case of processing delays. I mean, if the serial port gives data > faster than can be read from the Java program using rxtx it isn't just > thrown away, right? > The UART can usually hold a few bytes. The kernel driver can buffer the input. In practice, it works. With Sun commapi, the typical application has 4 buffers between the user and the incomming data. With rxtx, it is 3. BufferedInputStream -> commapi/rxtx -> kernel driver -> UART If you really do run into overflows on the UART, then hardware flow control is what you should be using and tinkering with rxtx to avoid it is not a very sound approach. -- Trent Jarvi tjarvi at qbang.org From llowrey at nuclearwinter.com Sun Jan 18 12:49:39 2009 From: llowrey at nuclearwinter.com (Larkin Lowrey) Date: Sun, 18 Jan 2009 13:49:39 -0600 Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain Message-ID: <497387D3.9040201@nuclearwinter.com> After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when running code that uses RXTXComm. The crashes only occur when using 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. As far as I can tell, the crash happens immediately on start. I can't see any evidence of much, if anything, happening before the crash. The code used to work and only stopped working after the "upgrade" to FC10. I have tried RXTX v2.1 and 2.2pre1. Any ideas? Here's the error: # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode linux-amd64) # Problematic frame: # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 --Larkin From tjarvi at qbang.org Mon Jan 19 17:48:34 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 19 Jan 2009 17:48:34 -0700 (MST) Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain In-Reply-To: <497387D3.9040201@nuclearwinter.com> References: <497387D3.9040201@nuclearwinter.com> Message-ID: On Sun, 18 Jan 2009, Larkin Lowrey wrote: > After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when > running code that uses RXTXComm. The crashes only occur when using > 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. > > As far as I can tell, the crash happens immediately on start. I can't > see any evidence of much, if anything, happening before the crash. > > The code used to work and only stopped working after the "upgrade" to > FC10. I have tried RXTX v2.1 and 2.2pre1. > > Any ideas? > > Here's the error: > > # > # An unexpected error has been detected by Java Runtime Environment: > # > # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 > # > # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode > linux-amd64) > # Problematic frame: > # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 > > > --Larkin Hi Larkin, I can think of 2 segv's in rxtx that may apply. Both are fixed in rxtx 2.2pre.. The first was that pointers required by nativeDrain needed to be stored in something larger than a 32 bit integer in java. This resulted in a crash like you see the first time the 'nativedrain' thread tried to use the pointer. The second was a concurrency issue George resolved with synchronization. The crash was usually during close but happened in the 'nativedrain' thread. (eventLoop) As mentioned, these are both fixed in the prerelease. There is a class provided in recent versions of RXTX that allow you confirm the version being used: gnu.io.RXTXVersion with member methods getVersion() and nativeGetVersion(). This allows you to confirm that you are indeed using the version you think you are. -- Trent Jarvi tjarvi at qbang.org From alexandrepoletto at gmail.com Wed Jan 21 11:48:07 2009 From: alexandrepoletto at gmail.com (Alexandre Poletto) Date: Wed, 21 Jan 2009 16:48:07 -0200 Subject: [Rxtx] work in windows but dont work in linux Message-ID: hi folks, I have an application to communicate with the serial port using rxtx, in the windows os my application works well, but when i try to run in the linux os i open the port (in windows "COM1", in Linux "/dev/ttyS0") send my commandes but i never receive any answer. I'm using ubuntu 8.10 and java 1.5, there is any configuration in that i'm missing? Thanks for the help! ps: Sorry form my bad english :( -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/70baea51/attachment-0004.html From jmudd at dtiweb.net Wed Jan 21 14:08:04 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Wed, 21 Jan 2009 16:08:04 -0500 Subject: [Rxtx] Hot unplugging of a USB device Message-ID: Looking to see if the issues surrounding an uplugging of a USB device have been resolved. I see from the mail list archives and bug reports that others have noted this issue. I have a USB GPS Receiver that is plugged into a Windows (XP) system and am using Netbeans 6.5 and Java jdk 1.6 and RXTX 2.1.7 and 2.2pre1. In the thread that is reading data via listening for a SerialEvent I can capture a Java IOException: No error in readArray. The application is essentially hung at this point. Only a termination of the application will clear it up and not leave the port hung. I had read in the archives that this is because the event loop in the native code portion is continually putting out the exceptions. I had also seen that this might be addressed in future releases. Any help is appreciated. Thanks, Jerry ________________________________ Jerry Mudd Senior Programmer 21795 Shangri-La Drive, Ste C Lexington Park, MD 20653 (301) 737-8893 (301) 737-8897 Fax jmudd at dtiweb.net www.dtiweb.net This message may contain sensitive, proprietary and/or privileged information. Disclosure is not authorized unless provided in writing by Defense Technologies, Inc. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0004.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 6296 bytes Desc: image001.gif Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0004.gif From netbeans at gatworks.com Wed Jan 21 17:33:46 2009 From: netbeans at gatworks.com (U. George) Date: Wed, 21 Jan 2009 19:33:46 -0500 Subject: [Rxtx] Hot unplugging of a USB device In-Reply-To: References: Message-ID: <4977BEEA.4020708@gatworks.com> > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:34 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:34 +1100 Subject: [Rxtx] Part 1 of 2 parts re rxtx 2.2 pre.. and OSX Message-ID: Hi, I have tried out the latest version of rxtx on a mac and can report that running with ImageJ (32 bit ) all seems to be fine. However when I attempt to use it with ImageJ64, I get a crash whenever the serial port is used. The details follow. What I did. Ran our plug-in in ImageJ 64 bit (1.42g) for Measuring, which is using the latest rxtx (the beta 2.2 compiled on 30 December 2008) for MacOSX 10.5.x) I installed this by putting the two files in the directory ~ LIBRARY/JAVA/EXTENSIONS. The Plug-in uses the serial port. The window we put up to show the numbers from the stage appeared, but only with the default "0" (zero) in each row, which is what we put there until we get data back from the port and the device attached. Then it crashed. I should point out that this all works fine using ImageJ (32 bit) 1.42g, on the same platform. So the only difference is the use of ImageJ 64 bit, and I guess the version of rxtx for 64 bit. I hope that cleverer people than me can throw some light onto this little problem. ImageJ64 seems to work ok until rxtx is called, although I haven't tried much so far, just some 3D rendering with 1 Gb of image data, which all went well, apart from the fact that the data was marginal. I am now showing the data supplied by the report to Apple window. This has three tabs, one to write your information in, one called Problem Details, and the third called SYSTEM CONFIG. These are pasted in below. Best wishes Noel Problem Details Process: JavaApplicationStub [463] Path: /Applications/ImageJ/ImageJ64.app/Contents/MacOS/JavaApplicationStub Identifier: gov.nih.info.rsb.ImageJ Version: ??? (10.2) Code Type: X86-64 (Native) Parent Process: launchd [398] Date/Time: 2009-01-19 10:48:09.342 +1100 OS Version: Mac OS X 10.5.6 (9G55) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000000029507c8 Crashed Thread: 16 Application Specific Information: Java information: Exception type: Bus Error (0xa) at pc=0x00000006ff70f418 Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0_07-b06-57 mixed mode macosx-amd64) Current thread (0x00000001020de800): JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] Stack: [0x0000000702851000,0x0000000702951000] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j gnu.io.RXTXPort.readByte()I+0 j gnu.io.RXTXPort$SerialInputStream.read()I+81 j SerialConnection.serialEvent(Lgnu/io/SerialPortEvent;)V+41 j gnu.io.RXTXPort.sendEvent(IZ)Z+382 v ~BufferBlob::StubRoutines (1) j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~BufferBlob::StubRoutines (1) Java Threads: ( => current thread ) =>0x00000001020de800 JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] 0x00000001020e8800 JavaThread "Measure XYZ" [_thread_blocked, id=44384256, stack(0x0000000702954000,0x0000000702a54000)] 0x0000000102001000 JavaThread "DestroyJavaVM" [_thread_blocked, id=25169920, stack(0x0000000101001000,0x0000000101801000)] 0x00000001020da800 JavaThread "SocketListener" [_thread_in_native, id=29671424, stack(0x0000000701b4c000,0x0000000701c4c000)] 0x00000001020b4800 JavaThread "AWT-EventQueue-0" [_thread_in_Java, id=-27992064, stack(0x00000006fe44e000,0x00000006fe54e000)] 0x0000000102096000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=-34344960, stack(0x00000006fde3f000,0x00000006fdf3f000)] 0x0000000102078000 JavaThread "AWT-Shutdown" [_thread_blocked, id=-58392576, stack(0x00000006fc750000,0x00000006fc850000)] 0x0000000102077800 JavaThread "AWT-AppKit" daemon [_thread_in_native, id=1886770976, stack(0x00007fff5f400000,0x00007fff5fc00000)] 0x0000000102044800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=-333877248, stack(0x00000006ec097000,0x00000006ec197000)] 0x0000000102043000 JavaThread "CompilerThread1" daemon [_thread_blocked, id=-334938112, stack(0x00000006ebf94000,0x00000006ec094000)] 0x0000000102041800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=-335998976, stack(0x00000006ebe91000,0x00000006ebf91000)] 0x0000000102041000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=-337059840, stack(0x00000006ebd8e000,0x00000006ebe8e000)] 0x0000000102029800 JavaThread "Finalizer" daemon [_thread_blocked, id=-338214912, stack(0x00000006ebc74000,0x00000006ebd74000)] 0x0000000102028800 JavaThread "Reference Handler" daemon [_thread_blocked, id=-339333120, stack(0x00000006ebb63000,0x00000006ebc63000)] Other Threads: 0x0000000102020800 VMThread [stack: 0x00000006eba60000,0x00000006ebb60000] [id=-340393984] 0x0000000102046000 WatcherThread [stack: 0x00000006ec19a000,0x00000006ec29a000] [id=-332816384] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 76480K, used 14448K [0x0000000105800000, 0x000000010ad50000, 0x00000002f9800000) eden space 65600K, 22% used [0x0000000105800000, 0x000000010661c398, 0x0000000109810000) from space 10880K, 0% used [0x0000000109810000, 0x0000000109810000, 0x000000010a2b0000) to space 10880K, 0% used [0x000000010a2b0000, 0x000000010a2b0000, 0x000000010ad50000) tenured generation total 174784K, used 0K [0x00000002f9800000, 0x00000003042b0000, 0x00000006e1800000) the space 174784K, 0% used [0x00000002f9800000, 0x00000002f9800000, 0x00000002f9800200, 0x00000003042b0000) compacting perm gen total 21248K, used 10319K [0x00000006e1800000, 0x00000006e2cc0000, 0x00000006e6c00000) the space 21248K, 48% used [0x00000006e1800000, 0x00000006e2213d28, 0x00000006e2213e00, 0x00000006e2cc0000) No shared spaces configured. Virtual Machine Arguments: JVM Args: -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher. framework/Resources/LauncherSupport.jar -Xms256m -Xmx24000m -Dcom.apple.macos.useScreenMenuBar=false -Dcom.apple.mrj.application.growbox.intrudes=false -Dcom.apple.mrj.application.live-resize=true -Dcom.apple.hwaccel=false -Dapple.awt.Antialiasing=false -Dcom.apple.smallTabs=true -Dapple.awt.brushMetalLook=false Java Command: Launcher Type: generic Physical Memory: Page Size = 4k, Total = 2048M, Free = 30996M Thread 0: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 com.apple.CoreFoundation 0x00007fff8204dc4f CFRunLoopRunSpecific + 1631 3 com.apple.HIToolbox 0x00007fff839fdda2 RunCurrentEventLoopInMode + 278 4 com.apple.HIToolbox 0x00007fff839fdbd8 ReceiveNextEventCommon + 322 5 com.apple.HIToolbox 0x00007fff839fda83 BlockUntilNextEventMatchingListInMode + 79 6 com.apple.AppKit 0x00007fff8299d3b0 _DPSNextEvent + 603 7 com.apple.AppKit 0x00007fff8299ccf1 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 136 8 com.apple.AppKit 0x00007fff82996a84 -[NSApplication run] + 455 9 libawt.jnilib 0x00000006ec433257 +[AWTStarter startAWT:] + 1343 10 libawt.jnilib 0x00000006ec432c46 -[CPerformer perform] + 112 11 com.apple.Foundation 0x00007fff8153f2b4 __NSThreadPerformPerform + 148 12 com.apple.CoreFoundation 0x00007fff8204e0e8 CFRunLoopRunSpecific + 2808 13 ...ple.JavaApplicationLauncher 0x0000000100005165 startupJava(LauncherArgsStruct*) + 235 14 ...ple.JavaApplicationLauncher 0x000000010000579c launchJavaApplication + 1224 15 JavaApplicationStub 0x0000000100000b9c 0x100000000 + 2972 Thread 1: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x0000000101a93b61 JVM_GetCPFieldModifiers + 128961 5 libjvm.dylib 0x0000000101a93a36 JVM_GetCPFieldModifiers + 128662 6 ...ple.JavaApplicationLauncher 0x000000010000c0ce startJavaApplication + 2886 7 ...ple.JavaApplicationLauncher 0x000000010000506d java_main_stub(void*) + 9 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 2: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libSystem.B.dylib 0x00007fff840db0b0 mach_msg_server + 436 3 libjvm.dylib 0x000000010181176d JNI_CreateJavaVM_Impl + 53277 4 libjvm.dylib 0x0000000101811375 JNI_CreateJavaVM_Impl + 52261 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 3: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x00000001018e452f JVM_Lseek + 235727 5 libjvm.dylib 0x00000001018e42df JVM_Lseek + 235135 6 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 7 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 8 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 4: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x00000001028003ea 0 + 4336911338 11 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 12 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 13 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 14 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 15 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 16 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 17 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 18 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 19 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 20 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 5: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 6: 0 libSystem.B.dylib 0x00007fff8406dd72 semaphore_wait_trap + 10 1 libjvm.dylib 0x0000000101915bdb JVM_IsPrimitiveClass + 12139 2 libjvm.dylib 0x00000001019155b5 JVM_IsPrimitiveClass + 10565 3 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 4 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 7: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 8: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 9: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x0000000101918ec8 JVM_IsPrimitiveClass + 25176 5 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 6 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 7 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 10: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x000000010191abb5 JVM_IsPrimitiveClass + 32581 4 libjvm.dylib 0x000000010191a70a JVM_IsPrimitiveClass + 31386 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 11: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 12: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x0000000102803414 0 + 4336923668 12 ??? 0x00000001028003ea 0 + 4336911338 13 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 14 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 15 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 16 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 17 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 18 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 19 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 20 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 21 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 22 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 13: 0 ??? 0x0000000102817034 0 + 4337004596 1 ??? 0x000000010280304e 0 + 4336922702 2 ??? 0x0000000102803093 0 + 4336922771 3 ??? 0x000000010280356d 0 + 4336924013 4 ??? 0x0000000102803093 0 + 4336922771 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x000000010280356d 0 + 4336924013 8 ??? 0x0000000102803093 0 + 4336922771 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x0000000102802f3a 0 + 4336922426 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102802f3a 0 + 4336922426 14 ??? 0x0000000102802f3a 0 + 4336922426 15 ??? 0x0000000102803162 0 + 4336922978 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102802f3a 0 + 4336922426 19 ??? 0x0000000102802f3a 0 + 4336922426 20 ??? 0x00000001028003ea 0 + 4336911338 21 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 22 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 23 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 24 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 25 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 26 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 27 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 28 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 29 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 30 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 14: 0 libSystem.B.dylib 0x00007fff840f210e accept + 10 1 libnet.jnilib 0x00000006ff6b6b11 Java_java_net_PlainSocketImpl_socketAccept + 277 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x0000000102802f3a 0 + 4336922426 4 ??? 0x0000000102802f3a 0 + 4336922426 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x0000000102803414 0 + 4336923668 8 ??? 0x00000001028003ea 0 + 4336911338 9 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 10 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 11 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 12 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 13 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 14 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 15 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 16 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 17 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 18 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 15: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x000000010280304e 0 + 4336922702 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102803414 0 + 4336923668 14 ??? 0x0000000102803093 0 + 4336922771 15 ??? 0x0000000102803093 0 + 4336922771 16 ??? 0x0000000102803093 0 + 4336922771 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102803414 0 + 4336923668 19 ??? 0x00000001028003ea 0 + 4336911338 20 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 21 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 22 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 23 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 24 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 25 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 26 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 27 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 28 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 29 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 Crashed: 0 librxtxSerial.jnilib 0x00000006ff70f418 read_byte_array + 68 1 librxtxSerial.jnilib 0x00000006ff70f9b3 Java_gnu_io_RXTXPort_readByte + 93 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x000000010280304e 0 + 4336922702 4 ??? 0x000000010280304e 0 + 4336922702 5 ??? 0x0000000102803414 0 + 4336923668 6 ??? 0x00000001028003ea 0 + 4336911338 7 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 8 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 9 libjvm.dylib 0x00000001018e5be8 JVM_Lseek + 241544 10 libjvm.dylib 0x0000000101900b11 JVM_MonitorWait + 17249 11 libjvm.dylib 0x0000000101a1e59e JVM_DisableCompiler + 1166 12 librxtxSerial.jnilib 0x00000006ff70d91e send_event + 132 13 librxtxSerial.jnilib 0x00000006ff70e82b report_serial_events + 92 14 librxtxSerial.jnilib 0x00000006ff7108c9 Java_gnu_io_RXTXPort_eventLoop + 237 15 ??? 0x000000010280e878 0 + 4336969848 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x00000001028003ea 0 + 4336911338 18 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 19 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 20 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 21 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 22 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 23 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 24 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 25 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 26 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 27 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 17: 0 libSystem.B.dylib 0x00007fff84074d02 __semwait_signal + 10 1 libSystem.B.dylib 0x00007fff840dce91 usleep + 57 2 librxtxSerial.jnilib 0x00000006ff70d729 drain_loop + 45 3 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 4 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 crashed with X86 Thread State (64-bit): rax: 0x00000000029507c0 rbx: 0x0000000000000041 rcx: 0x0000000000000065 rdx: 0x0000000000000002 rdi: 0x00000006ff71205e rsi: 0x00000006ff711c67 rbp: 0x0000000702950000 rsp: 0x000000070294fef0 r8: 0x000000000000004d r9: 0x00000006e21d64c0 r10: 0x00000006e21d38e8 r11: 0x00000000000000d2 r12: 0x00000001020de998 r13: 0x00000006e21d93b0 r14: 0x0000000000000032 r15: 0x00000000029507c0 rip: 0x00000006ff70f418 rfl: 0x0000000000010202 cr2: 0x00000000029507c8 Continued in the message part 2 -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:41 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:41 +1100 Subject: [Rxtx] Part 2 re rxtx 2.2 pre... and MacOSX Message-ID: Continued from Part 1. Binary Images: 0x100000000 - 0x100000fff JavaApplicationStub ??? (???) /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationS tub 0x100004000 - 0x100011fff com.apple.JavaApplicationLauncher 12.2.0 (12.2.0) /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/JavaApplicationLauncher 0x10001a000 - 0x100022ffd com.apple.JavaVM 12.2.0 (12.2.0) <2b178e8d4bbcc0aa427c2f3f71bb2fcb> /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM 0x100055000 - 0x10005dff0 libverify.dylib ??? (???) <56eac95084cb86cd1339a721b1353182> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libveri fy.dylib 0x100063000 - 0x10006cffb JavaNativeFoundation ??? (???) <68ca6409dc49542301edda1e0744ac69> /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNative Foundation.framework/Versions/A/JavaNativeFoundation 0x1000a8000 - 0x1000c7fef libjava.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjava .jnilib 0x1000d8000 - 0x1000e5ffb libzip.jnilib ??? (???) <5b6dce7c9a1f25aa5dff1a633c9dc342> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libzip. jnilib 0x101803000 - 0x101eafff3 libjvm.dylib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bundle/Libra ries/libjvm.dylib 0x6ec2c5000 - 0x6ec2c6fff liblauncher.jnilib ??? (???) <567fa54a222b965b2c4aefea21d9800a> /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/Resources/liblauncher.jnilib 0x6ec431000 - 0x6ec5e4fff libawt.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libawt. jnilib 0x6fdc3b000 - 0x6fdc3cfff ATSHI.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/Resources/ATSHI.dylib 0x6fdd6e000 - 0x6fdd6efff libcmm.jnilib ??? (???) <114e1a620a6920d77bf09bd57a7f7d52> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libcmm. jnilib 0x6fdd9e000 - 0x6fde1fff7 libfontmanager.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libfont manager.jnilib 0x6fdf41000 - 0x6fdf8ffff libsuncmm.jnilib ??? (???) <47330f1f17822de3a5cf921e07615cf7> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libsunc mm.jnilib 0x6fdf95000 - 0x6fdfc4ff7 libjpeg.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjpeg .jnilib 0x6ff6ae000 - 0x6ff6baffb libnet.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnet. jnilib 0x6ff6c0000 - 0x6ff6c4fff libnio.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnio. jnilib 0x6ff6d4000 - 0x6ff6e8ff7 libdcpr.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libdcpr .jnilib 0x6ff70c000 - 0x6ff713fff +librxtxSerial.jnilib ??? (???) <5133deacebd01ceab7d528c541241956> /Library/Java/Extensions/librxtxSerial.jnilib 0x6ff734000 - 0x6ff74bfef libJapaneseConverter.dylib ??? (???) <64cca6bb4650a269f49a8427507e4963> /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib 0x70204f000 - 0x702218fef com.apple.RawCamera.bundle 2.0.10 (2.0.10) /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera 0x7fff5fc00000 - 0x7fff5fc2e643 dyld 97.1 (???) /usr/lib/dyld 0x7fff80003000 - 0x7fff80146ffb com.apple.audio.toolbox.AudioToolbox 1.5.2 (1.5.2) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x7fff801d2000 - 0x7fff801d5ffb com.apple.help 1.1 (36) <9000c05ccad96fdcc25bc35264abf587> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.frame work/Versions/A/Help 0x7fff801d6000 - 0x7fff80211fff com.apple.AE 402.2 (402.2) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.f ramework/Versions/A/AE 0x7fff80212000 - 0x7fff80257fef libRIP.A.dylib ??? (???) <8c818d7fd3dc57839ac48caf107ff4c0> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x7fff80258000 - 0x7fff8029bfef com.apple.QD 3.11.54 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/QD.framework/Versions/A/QD 0x7fff8029c000 - 0x7fff802dffef libTIFF.dylib ??? (???) <86be7909f46cc044a887cbb60ab7826d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x7fff802e0000 - 0x7fff803d4fff libobjc.A.dylib ??? (???) <118dc1ae05e685ad64290352fc94f1f0> /usr/lib/libobjc.A.dylib 0x7fff803d5000 - 0x7fff8045dfe7 libsqlite3.0.dylib ??? (???) <3c7ab3523b816dbd3e039ee7e6e2c580> /usr/lib/libsqlite3.0.dylib 0x7fff8045e000 - 0x7fff80466ffa libbsm.dylib ??? (???) <4d838c0d8a74fe61c781a53a8723303d> /usr/lib/libbsm.dylib 0x7fff80467000 - 0x7fff80497fff com.apple.shortcut 1 (1.0) <9822328df9321a661af3afcc841e8f80> /System/Library/PrivateFrameworks/Shortcut.framework/Versions/A/Shortcut 0x7fff80498000 - 0x7fff8049bfff com.apple.securityhi 3.0 (30817) <00ddd6e60692b62b7649573eab8aef5a> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI .framework/Versions/A/SecurityHI 0x7fff8049c000 - 0x7fff8049efff com.apple.print.framework.Print 218.0.2 (220.1) <2b847a0a1cd885f596a4d10409d50ba3> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.fram ework/Versions/A/Print 0x7fff8049f000 - 0x7fff805dbfe9 com.apple.ImageIO.framework 2.0.4 (2.0.4) <47dcdc0b5986b2c157e0b6dae48ce464> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/ImageIO 0x7fff805dc000 - 0x7fff805f9fef com.apple.CoreVideo 1.5.1 (1.5.1) <78253b3fe8d3dcc90f159d7ed866c295> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x7fff805fa000 - 0x7fff8068bfff com.apple.SearchKit 1.2.1 (1.2.1) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Sear chKit.framework/Versions/A/SearchKit 0x7fff8068c000 - 0x7fff80e49fef libBLAS.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libBLAS.dylib 0x7fff80e4a000 - 0x7fff81416fff com.apple.CoreGraphics 1.407.2 (???) <436dbc70f8c9b29b3beb1d2de220acf2> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/CoreGraphics 0x7fff81417000 - 0x7fff8141dfff com.apple.DiskArbitration 2.2.1 (2.2.1) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitrat ion 0x7fff8141e000 - 0x7fff8145bff7 com.apple.SystemConfiguration 1.9.2 (1.9.2) <150119d0cecb0c80f6736b9881c2411e> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemCo nfiguration 0x7fff8145c000 - 0x7fff81523fec com.apple.CFNetwork 422.11 (422.11) <570ca46de3b907cb1c8e33fc62f562b4> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNe twork.framework/Versions/A/CFNetwork 0x7fff81524000 - 0x7fff8152dfff libCGATS.A.dylib ??? (???) <722a0bbd58740d46739008e881010631> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib 0x7fff8152e000 - 0x7fff81533fff com.apple.CommonPanels 1.2.4 (85) <2cec1ecc95cf1ecea8bea030975a46b8> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPane ls.framework/Versions/A/CommonPanels 0x7fff81534000 - 0x7fff817cffe3 com.apple.Foundation 6.5.7 (677.22) <8134977fcc57198a53dc494b60592980> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x7fff817d0000 - 0x7fff817d0ffd com.apple.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x7fff817d1000 - 0x7fff81cf1fc6 libGLProgrammability.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgra mmability.dylib 0x7fff81cf2000 - 0x7fff81cf4fff com.apple.NavigationServices 3.5.2 (163) <7cb7f3fe7f9d56ec89ef28a6d3a1da7d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Navigation Services.framework/Versions/A/NavigationServices 0x7fff81cf5000 - 0x7fff81d32fe7 com.apple.coreui 1.2 (62) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x7fff81d33000 - 0x7fff81d33fff com.apple.Carbon 136 (136) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x7fff81d34000 - 0x7fff81d42fff libCSync.A.dylib ??? (???) <61f6cc104b3e9b77cd583635a3a9a5cf> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x7fff81d43000 - 0x7fff81d45ff9 libRadiance.dylib ??? (???) <6d9f2235e8f70a7aedfc59383a7548d8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x7fff81d46000 - 0x7fff81db5ff9 com.apple.print.framework.PrintCore 5.5.3 (245.3) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/PrintCore.framework/Versions/A/PrintCore 0x7fff81db6000 - 0x7fff81db6ff8 com.apple.ApplicationServices 34 (34) <81cd02cc2ccf4e47e51d03db860da556> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Applicat ionServices 0x7fff81db7000 - 0x7fff81dd8fff libresolv.9.dylib ??? (???) <38318f9fbcfbdb384e0f9b08cc0e757a> /usr/lib/libresolv.9.dylib 0x7fff81dd9000 - 0x7fff81e4ffef libvMisc.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvMisc.dylib 0x7fff81e50000 - 0x7fff81e52ff7 libffi.dylib ??? (???) <920bb19728451f35703bb95dc908c7ca> /usr/lib/libffi.dylib 0x7fff81e53000 - 0x7fff81eeefe7 com.apple.ink.framework 101.3 (86) <60c6579faf114ea9677fd9ae25389ed2> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framew ork/Versions/A/Ink 0x7fff81eef000 - 0x7fff81f0dfff libPng.dylib ??? (???) <4017eab74319a648dfd73b7d503e557d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x7fff81f0e000 - 0x7fff81f24ff9 com.apple.ImageCapture 5.0.1 (5.0.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCaptu re.framework/Versions/A/ImageCapture 0x7fff81f25000 - 0x7fff81f3dfff com.apple.DictionaryServices 1.0.0 (1.0.0) <78ea11e9a92120f76d69efa24b8d1f95> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Dict ionaryServices.framework/Versions/A/DictionaryServices 0x7fff81f3e000 - 0x7fff81f42fff libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib 0x7fff81f43000 - 0x7fff81fe3fe3 com.apple.ApplicationServices.ATS 3.4 (???) <47cf09bf78935889f17f1b6b09badf0d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/ATS 0x7fff81fe4000 - 0x7fff8211bfff com.apple.CoreFoundation 6.5.5 (476.17) <51930d43c7c2d8fb24148cbfc05bba0f> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundatio n 0x7fff8211c000 - 0x7fff82126fff com.apple.speech.recognition.framework 3.7.24 (3.7.24) <2399374b096b284345daba82e2cb833d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechReco gnition.framework/Versions/A/SpeechRecognition 0x7fff82127000 - 0x7fff82159ff7 libauto.dylib ??? (???) /usr/lib/libauto.dylib 0x7fff8215a000 - 0x7fff821cefe7 libstdc++.6.dylib ??? (???) <565ee6f798f7fef6f804c60682787280> /usr/lib/libstdc++.6.dylib 0x7fff821cf000 - 0x7fff8228dfff edu.mit.Kerberos 6.0.12 (6.0.12) /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x7fff8228e000 - 0x7fff8228effb com.apple.installserver.framework 1.0 (8) /System/Library/PrivateFrameworks/InstallServer.framework/Versions/A/Install Server 0x7fff8228f000 - 0x7fff82293fff libGIF.dylib ??? (???) <66436b84211fe0e723051eab15af0aca> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x7fff82294000 - 0x7fff8258ffe3 com.apple.CoreServices.CarbonCore 786.10 (786.10) <2ac701edf3ca98a86ae9d5f733200b40> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Carb onCore.framework/Versions/A/CarbonCore 0x7fff82590000 - 0x7fff825aafff libvDSP.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvDSP.dylib 0x7fff825ab000 - 0x7fff827b1ff3 com.apple.security 5.0.4 (34102) <47c559b17c1f51998e7a981d0fbec4c8> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x7fff827b2000 - 0x7fff827d9fff libxslt.1.dylib ??? (???) /usr/lib/libxslt.1.dylib 0x7fff827da000 - 0x7fff82948fff libicucore.A.dylib ??? (???) <374ddaf141bf88dba00ab9058f2dbad6> /usr/lib/libicucore.A.dylib 0x7fff82949000 - 0x7fff8295dff7 libGL.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x7fff8295e000 - 0x7fff83286fff com.apple.AppKit 6.5.6 (949.43) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x7fff83287000 - 0x7fff83667fef com.apple.QuartzCore 1.5.7 (1.5.7) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x7fff83668000 - 0x7fff836b8fe7 com.apple.Metadata 10.5.2 (398.25) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Meta data.framework/Versions/A/Metadata 0x7fff836b9000 - 0x7fff836baff3 com.apple.audio.units.AudioUnit 1.5 (1.5) /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x7fff836bb000 - 0x7fff83710fe3 com.apple.HIServices 1.7.0 (???) <6bef766448d67adb91901b432629ea0f> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/HIServices.framework/Versions/A/HIServices 0x7fff83711000 - 0x7fff83711ffd com.apple.Accelerate.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/vecLib 0x7fff83712000 - 0x7fff837a7ffb com.apple.LaunchServices 290.3 (290.3) <56544e16c5192d2ce72df772901fcaef> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Laun chServices.framework/Versions/A/LaunchServices 0x7fff837a8000 - 0x7fff8382ffef com.apple.audio.CoreAudio 3.1.1 (3.1.1) <9c1714647fd7515c900362ad2ac76874> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x7fff83830000 - 0x7fff83893fef libGLU.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dyli b 0x7fff83894000 - 0x7fff838a2ff9 com.apple.helpdata 1.0.1 (14.2) /System/Library/PrivateFrameworks/HelpData.framework/Versions/A/HelpData 0x7fff838a3000 - 0x7fff838afff1 libgcc_s.1.dylib ??? (???) <23fa31a628c1ea8a62ac529fa333b6e1> /usr/lib/libgcc_s.1.dylib 0x7fff838b0000 - 0x7fff838d2fff libJPEG.dylib ??? (???) <4257ab268996bbeb93b47946df181cdc> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x7fff838d3000 - 0x7fff838d3ffd com.apple.Accelerate 1.4.2 (Accelerate 1.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x7fff838d4000 - 0x7fff838d4ff8 com.apple.Cocoa 6.5 (???) <8c59f679ffbd9178134df1d83dedde28> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa 0x7fff838d5000 - 0x7fff839cafff libxml2.2.dylib ??? (???) <8226d1180354f493954c5fa1fc0e1154> /usr/lib/libxml2.2.dylib 0x7fff839cb000 - 0x7fff839dafe7 com.apple.opengl 1.5.9 (1.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x7fff839db000 - 0x7fff83cc2feb com.apple.HIToolbox 1.5.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. framework/Versions/A/HIToolbox 0x7fff83cc3000 - 0x7fff83d03fef com.apple.framework.IOKit 1.5.1 (???) <17e6707127a60c5e2d7a9bd2b7bf2db0> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x7fff83d04000 - 0x7fff83dc8fe2 com.apple.vImage 3.0 (3.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage .framework/Versions/A/vImage 0x7fff83dc9000 - 0x7fff83df3fff libcups.2.dylib ??? (???) /usr/lib/libcups.2.dylib 0x7fff83df4000 - 0x7fff83df4ffa com.apple.CoreServices 32 (32) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x7fff83df5000 - 0x7fff83ed6fff libcrypto.0.9.7.dylib ??? (???) <66f1f8773bd9fdfdcfd09e2b4b010636> /usr/lib/libcrypto.0.9.7.dylib 0x7fff83ed7000 - 0x7fff83f87fef com.apple.CoreServices.OSServices 226.5 (226.5) <1c38f727b3ad3293272db7323b37c735> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSSe rvices.framework/Versions/A/OSServices 0x7fff83f88000 - 0x7fff83fa2fff com.apple.openscripting 1.2.8 (???) <0674c4e3353c677c9f58df3297ae559b> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScript ing.framework/Versions/A/OpenScripting 0x7fff83fa3000 - 0x7fff83fdfff7 libGLImage.dylib ??? (???) <02258bcdbe8defdb254acc077a81dd9b> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage. dylib 0x7fff83fe0000 - 0x7fff83ff1fff com.apple.speech.synthesis.framework 3.7.1 (3.7.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x7fff83ff2000 - 0x7fff8406cff3 com.apple.CoreText 2.0.3 (???) <827bbfef670df72316719c25bfb39915> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreText.framework/Versions/A/CoreText 0x7fff8406d000 - 0x7fff841f8ffb libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0x7fff841f9000 - 0x7fff8420affd libz.1.dylib ??? (???) /usr/lib/libz.1.dylib 0x7fff8420b000 - 0x7fff842befef com.apple.DesktopServices 1.4.7 (1.4.7) /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/D esktopServicesPriv 0x7fff842bf000 - 0x7fff84677fff libLAPACK.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libLAPACK.dylib 0x7fff84678000 - 0x7fff84743fef com.apple.ColorSync 4.5.1 (4.5.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ColorSync.framework/Versions/A/ColorSync 0x7fff84744000 - 0x7fff84847feb com.apple.CoreData 100.1 (186) <074abc7f43f81f7885e4d0674a8be4bc> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x7fffffe00000 - 0x7fffffe01780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0xfffffffffffec000 - 0xfffffffffffeffff libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib SYSTEM CONFIG Model: MacPro3,1, BootROM MP31.006C.B05, 8 processors, Quad-Core Intel Xeon, 2.8 GHz, 32 GB Graphics: kHW_ATIrv630Item, ATI Radeon HD 2600, spdisplays_pcie_device, 256 MB Memory Module: DIMM Riser B/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Bluetooth: Version 2.1.3f8, 2 service, 1 devices, 1 incoming serial ports Network Service: Ethernet 2, Ethernet, en1 PCI Card: ATI Radeon HD 2600, display, Slot-1 Serial ATA Device: WDC WD3200AAJS-41VWA0, 298.09 GB Parallel ATA Device: PIONEER DVD-RW DVR-112D USB Device: Keyboard Hub, (null) mA USB Device: Apple Optical USB Mouse, (null) mA USB Device: Apple Keyboard, (null) mA USB Device: hub_device, (null) mA USB Device: Apple Cinema HD Display, (null) mA USB Device: Keyspan USA-28Xb, (null) mA USB Device: Bluetooth USB Host Controller, (null) mA FireWire Device: built-in_hub, unknown_value, unknown_speed FireWire Device: My Book, WD, 800mbit_speed FireWire Device: unknown_device, unknown_value, unknown_speed -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From jaakko.sipari at gmail.com Thu Jan 22 03:00:03 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 22 Jan 2009 12:00:03 +0200 Subject: [Rxtx] RXTX compilation with GCJ possible? Message-ID: <901f25b80901220200s53792317o374b80cbb6066a52@mail.gmail.com> Hi! Does anyone have experience on using RXTX in a GCJ compiled Java application? I'm interested whether this is possible in Windows and/or in Linux platforms. And of course what does it take to get it work, or does it just work out of the box. Ultimately my aim here would be to move to a more time deterministic system by utilizing GCJ, jRate & Javolution and possibly run the RXTX (and other important) threads at a priority higher than the garbage collector. This of course would require some modification for the RXTX threads to run in a Javolution pool context or non allocating real time contexts so they wouldn't produce any garbage, but that's something to hack on later. For now I'd just like to know if there are any obstacles on the road to compiling & running RXTX with GCJ. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/5592681a/attachment-0004.html From jmudd at dtiweb.net Thu Jan 22 06:21:03 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Thu, 22 Jan 2009 08:21:03 -0500 Subject: [Rxtx] Hot unplugging of a USB device References: <4977BEEA.4020708@gatworks.com> Message-ID: U. George, Thanks for the information. How did you resolve your USB/GPS device on Linux? My application has to run on both Linux and Windows eventually. Thanks, Jerry -----Original Message----- From: U. George [mailto:netbeans at gatworks.com] Sent: Wednesday, January 21, 2009 7:34 PM To: Jerry Mudd Cc: rxtx at qbang.org Subject: Re: [Rxtx] Hot unplugging of a USB device > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From m.kirkland at comcast.net Thu Jan 22 09:21:01 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Thu, 22 Jan 2009 08:21:01 -0800 Subject: [Rxtx] Serial port control lines change with call to getPortIdentifiers() on Linux Message-ID: <94443DEFFD574B6CA8DDB2B201D9E007@bengal.net> Hi All ! I have noticed an issue with RXTX on Ubuntu Linux 8.10 that has prevented me from being able to use RXTX on Linux. I have noticed this issue on both the rxtx 2.1.7 and the new rxtx2.2pre1. When I execute the following line to get the ports on a system - java.util.Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); Both DTR and RTS become active on ttyS0 and only ttyS0, not ttyS1 (I only have 2 ports). I see this prior to opening any ports or making any other calls to RXTX. I have stepped it though with the debugger and I am sure this is the trigger. My application uses these control lines to perform functions other then the standard flow control so it is critical that I be able to control them exactly. I would also think that folks using RXTX for more standard serial IO would also have issues with devices starting to talk before a listener was ready. I checked Windows XP and I do not see this issue (but I only have a com1 on the Windows computer). I also noticed that the DTR line blips when setting up a port on 2.2.pre1 like it does on 2.1.7r2. This it the same issue that the folks at http://www.codeskin.com/ patched. I see this issue on both Linux and Windows XP. Any help or clues would be greatly appreciated. If I can provide any additional info or do any testing I would be glad to help out to get version 2.2 in top shape for release. BTW I have written a simple dynamic loader to load the RXTX jar and native code that is drive by the os.name and os.arch system properties. I would be more then happy to contribute this to the project if folks though it would be useful. Its more convenient then having to manage copying the files around to various JVM's. TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/eab26bae/attachment-0002.html From josefk_5 at yahoo.com Fri Jan 23 09:44:06 2009 From: josefk_5 at yahoo.com (Josef Kahsay) Date: Fri, 23 Jan 2009 08:44:06 -0800 (PST) Subject: [Rxtx] Help on Accessing RS232 Message-ID: <509617.88308.qm@web38205.mail.mud.yahoo.com> Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS From m.kirkland at comcast.net Sat Jan 24 01:28:52 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Sat, 24 Jan 2009 00:28:52 -0800 Subject: [Rxtx] Help on Accessing RS232 In-Reply-To: <509617.88308.qm@web38205.mail.mud.yahoo.com> References: <509617.88308.qm@web38205.mail.mud.yahoo.com> Message-ID: <665887C02E1446708CE392FE0BD73D79@bengal.net> It seems to me that you are having a classic java classpath issue. Java classpath issues can be annoying to solve sometimes. As some random guesses I would suggest you look at the following. 1 - You might not be running the JVM from the location that you think you are (gets me all the time). I which Windows had a which command. 2 - You don't mention what development environment you are using like Eclipse etc., and if you are trying to run the demo from inside the development environment. If so, do whatever is appropriate for the development environment to control the classpath. In Eclipse this would involve adding a "User Library" to point to the jar and native code. 3 - Once you get the classpath ok, the next thing you might run into is not being able to load the native library. 4 - I have found that on XP I can place the RXTX jar and native library in the same directory as my application's jar file (and a class-path entry in the application's jar file manifest) and it all works. 5 - If you need more control of managing different versions of RXTX for different OS platforms, I have a dynamic RXTX loader I can send you (but I recommend getting the simple case working first). Let me know if this helps. Mike -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Josef Kahsay Sent: Friday, January 23, 2009 8:44 AM To: rxtx at qbang.org Subject: [Rxtx] Help on Accessing RS232 Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0022.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0022.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0020.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0020.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0020.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0020.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0019.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0017.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0017.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0017.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0017.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0017.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0014.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0014.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0014.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment-0013.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0013.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment-0013.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment-0013.html From tjarvi at qbang.org Wed Jan 14 18:56:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 14 Jan 2009 18:56:50 -0700 (MST) Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Message-ID: On Wed, 14 Jan 2009, Jaakko Sipari wrote: > Hi (again)! > > Could someone clarify what these methods actually do and are they even > implemented? Do I get into trouble with buffer values of 0 (if I want to > handle the buffers myself)? > rxtx does not have buffers. It was not clear to me at the time why there would be a buffer when java already provides buffered input and output streams that can sit on top of rxtx. One reason I can see for implementing buffers in rxtx is to get data off the port so select() can block. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Wed Jan 14 23:23:08 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 15 Jan 2009 08:23:08 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> Message-ID: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Here's the same message for the list also. Forgot to do "Reply to all" ---------- Forwarded message ---------- From: Jaakko Sipari Date: Thu, Jan 15, 2009 at 8:22 AM Subject: Re: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize To: Trent Jarvi On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! >> >> Could someone clarify what these methods actually do and are they even >> implemented? Do I get into trouble with buffer values of 0 (if I want to >> handle the buffers myself)? >> >> > rxtx does not have buffers. It was not clear to me at the time why there > would be a buffer when java already provides buffered input and output > streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data off > the port so select() can block. > So basically those methods have currently no effect at all? - Jaakko -- Jaakko Sipari tel. +358451238191 eMail. jaakko.sipari at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090115/8b4c47c0/attachment-0012.html From tjarvi at qbang.org Thu Jan 15 18:37:12 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 15 Jan 2009 18:37:12 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: On Thu, 15 Jan 2009, Jaakko Sipari wrote: > Here's the same message for the list also. Forgot to do "Reply to all" > > ---------- Forwarded message ---------- > From: Jaakko Sipari > Date: Thu, Jan 15, 2009 at 8:22 AM > Subject: Re: [Rxtx] The functionality behind setInputBufferSize & > setOutputBufferSize > To: Trent Jarvi > > > On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! > > Could someone clarify what these methods actually do > and are they even > implemented? Do I get into trouble with buffer > values of 0 (if I want to > handle the buffers myself)? > > > rxtx does not have buffers. ?It was not clear to me at the time why > there would be a buffer when java already provides buffered input and > output streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data > off the port so select() can block. > > > So basically those methods have currently no effect at all? > Correct. You can use BufferedInputStream and BufferedOutputStream from the Java API once you get the Input/OutputStream from rxtx. But changing the input and output buffer size in rxtx is not going to change behavior. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Fri Jan 16 01:22:37 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Fri, 16 Jan 2009 10:22:37 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> > So basically those methods have currently no effect at all? >> >> > Correct. You can use BufferedInputStream and BufferedOutputStream from the > Java API once you get the Input/OutputStream from rxtx. But changing the > input and output buffer size in rxtx is not going to change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > I assume there still is some kind of buffer in rxtx (or the serial port driver) in case of processing delays. I mean, if the serial port gives data faster than can be read from the Java program using rxtx it isn't just thrown away, right? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090116/3bd9a52e/attachment-0011.html From tjarvi at qbang.org Fri Jan 16 05:17:24 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 16 Jan 2009 05:17:24 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> Message-ID: On Fri, 16 Jan 2009, Jaakko Sipari wrote: > > So basically those methods have currently no effect > at all? > > > Correct. ?You can use BufferedInputStream and BufferedOutputStream > from the Java API once you get the Input/OutputStream from rxtx. ?But > changing the input and output buffer size in rxtx is not going to > change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > > > > I assume there still is some kind of buffer in rxtx (or the serial port > driver) in case of processing delays. I mean, if the serial port gives data > faster than can be read from the Java program using rxtx it isn't just > thrown away, right? > The UART can usually hold a few bytes. The kernel driver can buffer the input. In practice, it works. With Sun commapi, the typical application has 4 buffers between the user and the incomming data. With rxtx, it is 3. BufferedInputStream -> commapi/rxtx -> kernel driver -> UART If you really do run into overflows on the UART, then hardware flow control is what you should be using and tinkering with rxtx to avoid it is not a very sound approach. -- Trent Jarvi tjarvi at qbang.org From llowrey at nuclearwinter.com Sun Jan 18 12:49:39 2009 From: llowrey at nuclearwinter.com (Larkin Lowrey) Date: Sun, 18 Jan 2009 13:49:39 -0600 Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain Message-ID: <497387D3.9040201@nuclearwinter.com> After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when running code that uses RXTXComm. The crashes only occur when using 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. As far as I can tell, the crash happens immediately on start. I can't see any evidence of much, if anything, happening before the crash. The code used to work and only stopped working after the "upgrade" to FC10. I have tried RXTX v2.1 and 2.2pre1. Any ideas? Here's the error: # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode linux-amd64) # Problematic frame: # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 --Larkin From tjarvi at qbang.org Mon Jan 19 17:48:34 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 19 Jan 2009 17:48:34 -0700 (MST) Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain In-Reply-To: <497387D3.9040201@nuclearwinter.com> References: <497387D3.9040201@nuclearwinter.com> Message-ID: On Sun, 18 Jan 2009, Larkin Lowrey wrote: > After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when > running code that uses RXTXComm. The crashes only occur when using > 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. > > As far as I can tell, the crash happens immediately on start. I can't > see any evidence of much, if anything, happening before the crash. > > The code used to work and only stopped working after the "upgrade" to > FC10. I have tried RXTX v2.1 and 2.2pre1. > > Any ideas? > > Here's the error: > > # > # An unexpected error has been detected by Java Runtime Environment: > # > # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 > # > # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode > linux-amd64) > # Problematic frame: > # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 > > > --Larkin Hi Larkin, I can think of 2 segv's in rxtx that may apply. Both are fixed in rxtx 2.2pre.. The first was that pointers required by nativeDrain needed to be stored in something larger than a 32 bit integer in java. This resulted in a crash like you see the first time the 'nativedrain' thread tried to use the pointer. The second was a concurrency issue George resolved with synchronization. The crash was usually during close but happened in the 'nativedrain' thread. (eventLoop) As mentioned, these are both fixed in the prerelease. There is a class provided in recent versions of RXTX that allow you confirm the version being used: gnu.io.RXTXVersion with member methods getVersion() and nativeGetVersion(). This allows you to confirm that you are indeed using the version you think you are. -- Trent Jarvi tjarvi at qbang.org From alexandrepoletto at gmail.com Wed Jan 21 11:48:07 2009 From: alexandrepoletto at gmail.com (Alexandre Poletto) Date: Wed, 21 Jan 2009 16:48:07 -0200 Subject: [Rxtx] work in windows but dont work in linux Message-ID: hi folks, I have an application to communicate with the serial port using rxtx, in the windows os my application works well, but when i try to run in the linux os i open the port (in windows "COM1", in Linux "/dev/ttyS0") send my commandes but i never receive any answer. I'm using ubuntu 8.10 and java 1.5, there is any configuration in that i'm missing? Thanks for the help! ps: Sorry form my bad english :( -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/70baea51/attachment-0005.html From jmudd at dtiweb.net Wed Jan 21 14:08:04 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Wed, 21 Jan 2009 16:08:04 -0500 Subject: [Rxtx] Hot unplugging of a USB device Message-ID: Looking to see if the issues surrounding an uplugging of a USB device have been resolved. I see from the mail list archives and bug reports that others have noted this issue. I have a USB GPS Receiver that is plugged into a Windows (XP) system and am using Netbeans 6.5 and Java jdk 1.6 and RXTX 2.1.7 and 2.2pre1. In the thread that is reading data via listening for a SerialEvent I can capture a Java IOException: No error in readArray. The application is essentially hung at this point. Only a termination of the application will clear it up and not leave the port hung. I had read in the archives that this is because the event loop in the native code portion is continually putting out the exceptions. I had also seen that this might be addressed in future releases. Any help is appreciated. Thanks, Jerry ________________________________ Jerry Mudd Senior Programmer 21795 Shangri-La Drive, Ste C Lexington Park, MD 20653 (301) 737-8893 (301) 737-8897 Fax jmudd at dtiweb.net www.dtiweb.net This message may contain sensitive, proprietary and/or privileged information. Disclosure is not authorized unless provided in writing by Defense Technologies, Inc. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0005.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 6296 bytes Desc: image001.gif Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0005.gif From netbeans at gatworks.com Wed Jan 21 17:33:46 2009 From: netbeans at gatworks.com (U. George) Date: Wed, 21 Jan 2009 19:33:46 -0500 Subject: [Rxtx] Hot unplugging of a USB device In-Reply-To: References: Message-ID: <4977BEEA.4020708@gatworks.com> > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:34 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:34 +1100 Subject: [Rxtx] Part 1 of 2 parts re rxtx 2.2 pre.. and OSX Message-ID: Hi, I have tried out the latest version of rxtx on a mac and can report that running with ImageJ (32 bit ) all seems to be fine. However when I attempt to use it with ImageJ64, I get a crash whenever the serial port is used. The details follow. What I did. Ran our plug-in in ImageJ 64 bit (1.42g) for Measuring, which is using the latest rxtx (the beta 2.2 compiled on 30 December 2008) for MacOSX 10.5.x) I installed this by putting the two files in the directory ~ LIBRARY/JAVA/EXTENSIONS. The Plug-in uses the serial port. The window we put up to show the numbers from the stage appeared, but only with the default "0" (zero) in each row, which is what we put there until we get data back from the port and the device attached. Then it crashed. I should point out that this all works fine using ImageJ (32 bit) 1.42g, on the same platform. So the only difference is the use of ImageJ 64 bit, and I guess the version of rxtx for 64 bit. I hope that cleverer people than me can throw some light onto this little problem. ImageJ64 seems to work ok until rxtx is called, although I haven't tried much so far, just some 3D rendering with 1 Gb of image data, which all went well, apart from the fact that the data was marginal. I am now showing the data supplied by the report to Apple window. This has three tabs, one to write your information in, one called Problem Details, and the third called SYSTEM CONFIG. These are pasted in below. Best wishes Noel Problem Details Process: JavaApplicationStub [463] Path: /Applications/ImageJ/ImageJ64.app/Contents/MacOS/JavaApplicationStub Identifier: gov.nih.info.rsb.ImageJ Version: ??? (10.2) Code Type: X86-64 (Native) Parent Process: launchd [398] Date/Time: 2009-01-19 10:48:09.342 +1100 OS Version: Mac OS X 10.5.6 (9G55) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000000029507c8 Crashed Thread: 16 Application Specific Information: Java information: Exception type: Bus Error (0xa) at pc=0x00000006ff70f418 Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0_07-b06-57 mixed mode macosx-amd64) Current thread (0x00000001020de800): JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] Stack: [0x0000000702851000,0x0000000702951000] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j gnu.io.RXTXPort.readByte()I+0 j gnu.io.RXTXPort$SerialInputStream.read()I+81 j SerialConnection.serialEvent(Lgnu/io/SerialPortEvent;)V+41 j gnu.io.RXTXPort.sendEvent(IZ)Z+382 v ~BufferBlob::StubRoutines (1) j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~BufferBlob::StubRoutines (1) Java Threads: ( => current thread ) =>0x00000001020de800 JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] 0x00000001020e8800 JavaThread "Measure XYZ" [_thread_blocked, id=44384256, stack(0x0000000702954000,0x0000000702a54000)] 0x0000000102001000 JavaThread "DestroyJavaVM" [_thread_blocked, id=25169920, stack(0x0000000101001000,0x0000000101801000)] 0x00000001020da800 JavaThread "SocketListener" [_thread_in_native, id=29671424, stack(0x0000000701b4c000,0x0000000701c4c000)] 0x00000001020b4800 JavaThread "AWT-EventQueue-0" [_thread_in_Java, id=-27992064, stack(0x00000006fe44e000,0x00000006fe54e000)] 0x0000000102096000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=-34344960, stack(0x00000006fde3f000,0x00000006fdf3f000)] 0x0000000102078000 JavaThread "AWT-Shutdown" [_thread_blocked, id=-58392576, stack(0x00000006fc750000,0x00000006fc850000)] 0x0000000102077800 JavaThread "AWT-AppKit" daemon [_thread_in_native, id=1886770976, stack(0x00007fff5f400000,0x00007fff5fc00000)] 0x0000000102044800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=-333877248, stack(0x00000006ec097000,0x00000006ec197000)] 0x0000000102043000 JavaThread "CompilerThread1" daemon [_thread_blocked, id=-334938112, stack(0x00000006ebf94000,0x00000006ec094000)] 0x0000000102041800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=-335998976, stack(0x00000006ebe91000,0x00000006ebf91000)] 0x0000000102041000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=-337059840, stack(0x00000006ebd8e000,0x00000006ebe8e000)] 0x0000000102029800 JavaThread "Finalizer" daemon [_thread_blocked, id=-338214912, stack(0x00000006ebc74000,0x00000006ebd74000)] 0x0000000102028800 JavaThread "Reference Handler" daemon [_thread_blocked, id=-339333120, stack(0x00000006ebb63000,0x00000006ebc63000)] Other Threads: 0x0000000102020800 VMThread [stack: 0x00000006eba60000,0x00000006ebb60000] [id=-340393984] 0x0000000102046000 WatcherThread [stack: 0x00000006ec19a000,0x00000006ec29a000] [id=-332816384] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 76480K, used 14448K [0x0000000105800000, 0x000000010ad50000, 0x00000002f9800000) eden space 65600K, 22% used [0x0000000105800000, 0x000000010661c398, 0x0000000109810000) from space 10880K, 0% used [0x0000000109810000, 0x0000000109810000, 0x000000010a2b0000) to space 10880K, 0% used [0x000000010a2b0000, 0x000000010a2b0000, 0x000000010ad50000) tenured generation total 174784K, used 0K [0x00000002f9800000, 0x00000003042b0000, 0x00000006e1800000) the space 174784K, 0% used [0x00000002f9800000, 0x00000002f9800000, 0x00000002f9800200, 0x00000003042b0000) compacting perm gen total 21248K, used 10319K [0x00000006e1800000, 0x00000006e2cc0000, 0x00000006e6c00000) the space 21248K, 48% used [0x00000006e1800000, 0x00000006e2213d28, 0x00000006e2213e00, 0x00000006e2cc0000) No shared spaces configured. Virtual Machine Arguments: JVM Args: -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher. framework/Resources/LauncherSupport.jar -Xms256m -Xmx24000m -Dcom.apple.macos.useScreenMenuBar=false -Dcom.apple.mrj.application.growbox.intrudes=false -Dcom.apple.mrj.application.live-resize=true -Dcom.apple.hwaccel=false -Dapple.awt.Antialiasing=false -Dcom.apple.smallTabs=true -Dapple.awt.brushMetalLook=false Java Command: Launcher Type: generic Physical Memory: Page Size = 4k, Total = 2048M, Free = 30996M Thread 0: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 com.apple.CoreFoundation 0x00007fff8204dc4f CFRunLoopRunSpecific + 1631 3 com.apple.HIToolbox 0x00007fff839fdda2 RunCurrentEventLoopInMode + 278 4 com.apple.HIToolbox 0x00007fff839fdbd8 ReceiveNextEventCommon + 322 5 com.apple.HIToolbox 0x00007fff839fda83 BlockUntilNextEventMatchingListInMode + 79 6 com.apple.AppKit 0x00007fff8299d3b0 _DPSNextEvent + 603 7 com.apple.AppKit 0x00007fff8299ccf1 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 136 8 com.apple.AppKit 0x00007fff82996a84 -[NSApplication run] + 455 9 libawt.jnilib 0x00000006ec433257 +[AWTStarter startAWT:] + 1343 10 libawt.jnilib 0x00000006ec432c46 -[CPerformer perform] + 112 11 com.apple.Foundation 0x00007fff8153f2b4 __NSThreadPerformPerform + 148 12 com.apple.CoreFoundation 0x00007fff8204e0e8 CFRunLoopRunSpecific + 2808 13 ...ple.JavaApplicationLauncher 0x0000000100005165 startupJava(LauncherArgsStruct*) + 235 14 ...ple.JavaApplicationLauncher 0x000000010000579c launchJavaApplication + 1224 15 JavaApplicationStub 0x0000000100000b9c 0x100000000 + 2972 Thread 1: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x0000000101a93b61 JVM_GetCPFieldModifiers + 128961 5 libjvm.dylib 0x0000000101a93a36 JVM_GetCPFieldModifiers + 128662 6 ...ple.JavaApplicationLauncher 0x000000010000c0ce startJavaApplication + 2886 7 ...ple.JavaApplicationLauncher 0x000000010000506d java_main_stub(void*) + 9 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 2: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libSystem.B.dylib 0x00007fff840db0b0 mach_msg_server + 436 3 libjvm.dylib 0x000000010181176d JNI_CreateJavaVM_Impl + 53277 4 libjvm.dylib 0x0000000101811375 JNI_CreateJavaVM_Impl + 52261 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 3: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x00000001018e452f JVM_Lseek + 235727 5 libjvm.dylib 0x00000001018e42df JVM_Lseek + 235135 6 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 7 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 8 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 4: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x00000001028003ea 0 + 4336911338 11 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 12 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 13 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 14 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 15 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 16 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 17 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 18 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 19 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 20 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 5: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 6: 0 libSystem.B.dylib 0x00007fff8406dd72 semaphore_wait_trap + 10 1 libjvm.dylib 0x0000000101915bdb JVM_IsPrimitiveClass + 12139 2 libjvm.dylib 0x00000001019155b5 JVM_IsPrimitiveClass + 10565 3 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 4 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 7: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 8: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 9: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x0000000101918ec8 JVM_IsPrimitiveClass + 25176 5 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 6 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 7 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 10: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x000000010191abb5 JVM_IsPrimitiveClass + 32581 4 libjvm.dylib 0x000000010191a70a JVM_IsPrimitiveClass + 31386 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 11: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 12: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x0000000102803414 0 + 4336923668 12 ??? 0x00000001028003ea 0 + 4336911338 13 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 14 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 15 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 16 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 17 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 18 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 19 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 20 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 21 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 22 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 13: 0 ??? 0x0000000102817034 0 + 4337004596 1 ??? 0x000000010280304e 0 + 4336922702 2 ??? 0x0000000102803093 0 + 4336922771 3 ??? 0x000000010280356d 0 + 4336924013 4 ??? 0x0000000102803093 0 + 4336922771 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x000000010280356d 0 + 4336924013 8 ??? 0x0000000102803093 0 + 4336922771 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x0000000102802f3a 0 + 4336922426 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102802f3a 0 + 4336922426 14 ??? 0x0000000102802f3a 0 + 4336922426 15 ??? 0x0000000102803162 0 + 4336922978 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102802f3a 0 + 4336922426 19 ??? 0x0000000102802f3a 0 + 4336922426 20 ??? 0x00000001028003ea 0 + 4336911338 21 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 22 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 23 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 24 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 25 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 26 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 27 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 28 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 29 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 30 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 14: 0 libSystem.B.dylib 0x00007fff840f210e accept + 10 1 libnet.jnilib 0x00000006ff6b6b11 Java_java_net_PlainSocketImpl_socketAccept + 277 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x0000000102802f3a 0 + 4336922426 4 ??? 0x0000000102802f3a 0 + 4336922426 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x0000000102803414 0 + 4336923668 8 ??? 0x00000001028003ea 0 + 4336911338 9 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 10 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 11 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 12 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 13 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 14 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 15 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 16 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 17 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 18 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 15: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x000000010280304e 0 + 4336922702 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102803414 0 + 4336923668 14 ??? 0x0000000102803093 0 + 4336922771 15 ??? 0x0000000102803093 0 + 4336922771 16 ??? 0x0000000102803093 0 + 4336922771 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102803414 0 + 4336923668 19 ??? 0x00000001028003ea 0 + 4336911338 20 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 21 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 22 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 23 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 24 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 25 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 26 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 27 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 28 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 29 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 Crashed: 0 librxtxSerial.jnilib 0x00000006ff70f418 read_byte_array + 68 1 librxtxSerial.jnilib 0x00000006ff70f9b3 Java_gnu_io_RXTXPort_readByte + 93 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x000000010280304e 0 + 4336922702 4 ??? 0x000000010280304e 0 + 4336922702 5 ??? 0x0000000102803414 0 + 4336923668 6 ??? 0x00000001028003ea 0 + 4336911338 7 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 8 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 9 libjvm.dylib 0x00000001018e5be8 JVM_Lseek + 241544 10 libjvm.dylib 0x0000000101900b11 JVM_MonitorWait + 17249 11 libjvm.dylib 0x0000000101a1e59e JVM_DisableCompiler + 1166 12 librxtxSerial.jnilib 0x00000006ff70d91e send_event + 132 13 librxtxSerial.jnilib 0x00000006ff70e82b report_serial_events + 92 14 librxtxSerial.jnilib 0x00000006ff7108c9 Java_gnu_io_RXTXPort_eventLoop + 237 15 ??? 0x000000010280e878 0 + 4336969848 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x00000001028003ea 0 + 4336911338 18 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 19 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 20 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 21 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 22 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 23 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 24 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 25 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 26 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 27 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 17: 0 libSystem.B.dylib 0x00007fff84074d02 __semwait_signal + 10 1 libSystem.B.dylib 0x00007fff840dce91 usleep + 57 2 librxtxSerial.jnilib 0x00000006ff70d729 drain_loop + 45 3 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 4 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 crashed with X86 Thread State (64-bit): rax: 0x00000000029507c0 rbx: 0x0000000000000041 rcx: 0x0000000000000065 rdx: 0x0000000000000002 rdi: 0x00000006ff71205e rsi: 0x00000006ff711c67 rbp: 0x0000000702950000 rsp: 0x000000070294fef0 r8: 0x000000000000004d r9: 0x00000006e21d64c0 r10: 0x00000006e21d38e8 r11: 0x00000000000000d2 r12: 0x00000001020de998 r13: 0x00000006e21d93b0 r14: 0x0000000000000032 r15: 0x00000000029507c0 rip: 0x00000006ff70f418 rfl: 0x0000000000010202 cr2: 0x00000000029507c8 Continued in the message part 2 -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:41 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:41 +1100 Subject: [Rxtx] Part 2 re rxtx 2.2 pre... and MacOSX Message-ID: Continued from Part 1. Binary Images: 0x100000000 - 0x100000fff JavaApplicationStub ??? (???) /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationS tub 0x100004000 - 0x100011fff com.apple.JavaApplicationLauncher 12.2.0 (12.2.0) /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/JavaApplicationLauncher 0x10001a000 - 0x100022ffd com.apple.JavaVM 12.2.0 (12.2.0) <2b178e8d4bbcc0aa427c2f3f71bb2fcb> /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM 0x100055000 - 0x10005dff0 libverify.dylib ??? (???) <56eac95084cb86cd1339a721b1353182> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libveri fy.dylib 0x100063000 - 0x10006cffb JavaNativeFoundation ??? (???) <68ca6409dc49542301edda1e0744ac69> /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNative Foundation.framework/Versions/A/JavaNativeFoundation 0x1000a8000 - 0x1000c7fef libjava.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjava .jnilib 0x1000d8000 - 0x1000e5ffb libzip.jnilib ??? (???) <5b6dce7c9a1f25aa5dff1a633c9dc342> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libzip. jnilib 0x101803000 - 0x101eafff3 libjvm.dylib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bundle/Libra ries/libjvm.dylib 0x6ec2c5000 - 0x6ec2c6fff liblauncher.jnilib ??? (???) <567fa54a222b965b2c4aefea21d9800a> /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/Resources/liblauncher.jnilib 0x6ec431000 - 0x6ec5e4fff libawt.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libawt. jnilib 0x6fdc3b000 - 0x6fdc3cfff ATSHI.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/Resources/ATSHI.dylib 0x6fdd6e000 - 0x6fdd6efff libcmm.jnilib ??? (???) <114e1a620a6920d77bf09bd57a7f7d52> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libcmm. jnilib 0x6fdd9e000 - 0x6fde1fff7 libfontmanager.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libfont manager.jnilib 0x6fdf41000 - 0x6fdf8ffff libsuncmm.jnilib ??? (???) <47330f1f17822de3a5cf921e07615cf7> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libsunc mm.jnilib 0x6fdf95000 - 0x6fdfc4ff7 libjpeg.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjpeg .jnilib 0x6ff6ae000 - 0x6ff6baffb libnet.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnet. jnilib 0x6ff6c0000 - 0x6ff6c4fff libnio.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnio. jnilib 0x6ff6d4000 - 0x6ff6e8ff7 libdcpr.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libdcpr .jnilib 0x6ff70c000 - 0x6ff713fff +librxtxSerial.jnilib ??? (???) <5133deacebd01ceab7d528c541241956> /Library/Java/Extensions/librxtxSerial.jnilib 0x6ff734000 - 0x6ff74bfef libJapaneseConverter.dylib ??? (???) <64cca6bb4650a269f49a8427507e4963> /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib 0x70204f000 - 0x702218fef com.apple.RawCamera.bundle 2.0.10 (2.0.10) /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera 0x7fff5fc00000 - 0x7fff5fc2e643 dyld 97.1 (???) /usr/lib/dyld 0x7fff80003000 - 0x7fff80146ffb com.apple.audio.toolbox.AudioToolbox 1.5.2 (1.5.2) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x7fff801d2000 - 0x7fff801d5ffb com.apple.help 1.1 (36) <9000c05ccad96fdcc25bc35264abf587> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.frame work/Versions/A/Help 0x7fff801d6000 - 0x7fff80211fff com.apple.AE 402.2 (402.2) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.f ramework/Versions/A/AE 0x7fff80212000 - 0x7fff80257fef libRIP.A.dylib ??? (???) <8c818d7fd3dc57839ac48caf107ff4c0> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x7fff80258000 - 0x7fff8029bfef com.apple.QD 3.11.54 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/QD.framework/Versions/A/QD 0x7fff8029c000 - 0x7fff802dffef libTIFF.dylib ??? (???) <86be7909f46cc044a887cbb60ab7826d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x7fff802e0000 - 0x7fff803d4fff libobjc.A.dylib ??? (???) <118dc1ae05e685ad64290352fc94f1f0> /usr/lib/libobjc.A.dylib 0x7fff803d5000 - 0x7fff8045dfe7 libsqlite3.0.dylib ??? (???) <3c7ab3523b816dbd3e039ee7e6e2c580> /usr/lib/libsqlite3.0.dylib 0x7fff8045e000 - 0x7fff80466ffa libbsm.dylib ??? (???) <4d838c0d8a74fe61c781a53a8723303d> /usr/lib/libbsm.dylib 0x7fff80467000 - 0x7fff80497fff com.apple.shortcut 1 (1.0) <9822328df9321a661af3afcc841e8f80> /System/Library/PrivateFrameworks/Shortcut.framework/Versions/A/Shortcut 0x7fff80498000 - 0x7fff8049bfff com.apple.securityhi 3.0 (30817) <00ddd6e60692b62b7649573eab8aef5a> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI .framework/Versions/A/SecurityHI 0x7fff8049c000 - 0x7fff8049efff com.apple.print.framework.Print 218.0.2 (220.1) <2b847a0a1cd885f596a4d10409d50ba3> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.fram ework/Versions/A/Print 0x7fff8049f000 - 0x7fff805dbfe9 com.apple.ImageIO.framework 2.0.4 (2.0.4) <47dcdc0b5986b2c157e0b6dae48ce464> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/ImageIO 0x7fff805dc000 - 0x7fff805f9fef com.apple.CoreVideo 1.5.1 (1.5.1) <78253b3fe8d3dcc90f159d7ed866c295> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x7fff805fa000 - 0x7fff8068bfff com.apple.SearchKit 1.2.1 (1.2.1) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Sear chKit.framework/Versions/A/SearchKit 0x7fff8068c000 - 0x7fff80e49fef libBLAS.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libBLAS.dylib 0x7fff80e4a000 - 0x7fff81416fff com.apple.CoreGraphics 1.407.2 (???) <436dbc70f8c9b29b3beb1d2de220acf2> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/CoreGraphics 0x7fff81417000 - 0x7fff8141dfff com.apple.DiskArbitration 2.2.1 (2.2.1) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitrat ion 0x7fff8141e000 - 0x7fff8145bff7 com.apple.SystemConfiguration 1.9.2 (1.9.2) <150119d0cecb0c80f6736b9881c2411e> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemCo nfiguration 0x7fff8145c000 - 0x7fff81523fec com.apple.CFNetwork 422.11 (422.11) <570ca46de3b907cb1c8e33fc62f562b4> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNe twork.framework/Versions/A/CFNetwork 0x7fff81524000 - 0x7fff8152dfff libCGATS.A.dylib ??? (???) <722a0bbd58740d46739008e881010631> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib 0x7fff8152e000 - 0x7fff81533fff com.apple.CommonPanels 1.2.4 (85) <2cec1ecc95cf1ecea8bea030975a46b8> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPane ls.framework/Versions/A/CommonPanels 0x7fff81534000 - 0x7fff817cffe3 com.apple.Foundation 6.5.7 (677.22) <8134977fcc57198a53dc494b60592980> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x7fff817d0000 - 0x7fff817d0ffd com.apple.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x7fff817d1000 - 0x7fff81cf1fc6 libGLProgrammability.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgra mmability.dylib 0x7fff81cf2000 - 0x7fff81cf4fff com.apple.NavigationServices 3.5.2 (163) <7cb7f3fe7f9d56ec89ef28a6d3a1da7d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Navigation Services.framework/Versions/A/NavigationServices 0x7fff81cf5000 - 0x7fff81d32fe7 com.apple.coreui 1.2 (62) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x7fff81d33000 - 0x7fff81d33fff com.apple.Carbon 136 (136) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x7fff81d34000 - 0x7fff81d42fff libCSync.A.dylib ??? (???) <61f6cc104b3e9b77cd583635a3a9a5cf> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x7fff81d43000 - 0x7fff81d45ff9 libRadiance.dylib ??? (???) <6d9f2235e8f70a7aedfc59383a7548d8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x7fff81d46000 - 0x7fff81db5ff9 com.apple.print.framework.PrintCore 5.5.3 (245.3) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/PrintCore.framework/Versions/A/PrintCore 0x7fff81db6000 - 0x7fff81db6ff8 com.apple.ApplicationServices 34 (34) <81cd02cc2ccf4e47e51d03db860da556> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Applicat ionServices 0x7fff81db7000 - 0x7fff81dd8fff libresolv.9.dylib ??? (???) <38318f9fbcfbdb384e0f9b08cc0e757a> /usr/lib/libresolv.9.dylib 0x7fff81dd9000 - 0x7fff81e4ffef libvMisc.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvMisc.dylib 0x7fff81e50000 - 0x7fff81e52ff7 libffi.dylib ??? (???) <920bb19728451f35703bb95dc908c7ca> /usr/lib/libffi.dylib 0x7fff81e53000 - 0x7fff81eeefe7 com.apple.ink.framework 101.3 (86) <60c6579faf114ea9677fd9ae25389ed2> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framew ork/Versions/A/Ink 0x7fff81eef000 - 0x7fff81f0dfff libPng.dylib ??? (???) <4017eab74319a648dfd73b7d503e557d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x7fff81f0e000 - 0x7fff81f24ff9 com.apple.ImageCapture 5.0.1 (5.0.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCaptu re.framework/Versions/A/ImageCapture 0x7fff81f25000 - 0x7fff81f3dfff com.apple.DictionaryServices 1.0.0 (1.0.0) <78ea11e9a92120f76d69efa24b8d1f95> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Dict ionaryServices.framework/Versions/A/DictionaryServices 0x7fff81f3e000 - 0x7fff81f42fff libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib 0x7fff81f43000 - 0x7fff81fe3fe3 com.apple.ApplicationServices.ATS 3.4 (???) <47cf09bf78935889f17f1b6b09badf0d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/ATS 0x7fff81fe4000 - 0x7fff8211bfff com.apple.CoreFoundation 6.5.5 (476.17) <51930d43c7c2d8fb24148cbfc05bba0f> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundatio n 0x7fff8211c000 - 0x7fff82126fff com.apple.speech.recognition.framework 3.7.24 (3.7.24) <2399374b096b284345daba82e2cb833d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechReco gnition.framework/Versions/A/SpeechRecognition 0x7fff82127000 - 0x7fff82159ff7 libauto.dylib ??? (???) /usr/lib/libauto.dylib 0x7fff8215a000 - 0x7fff821cefe7 libstdc++.6.dylib ??? (???) <565ee6f798f7fef6f804c60682787280> /usr/lib/libstdc++.6.dylib 0x7fff821cf000 - 0x7fff8228dfff edu.mit.Kerberos 6.0.12 (6.0.12) /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x7fff8228e000 - 0x7fff8228effb com.apple.installserver.framework 1.0 (8) /System/Library/PrivateFrameworks/InstallServer.framework/Versions/A/Install Server 0x7fff8228f000 - 0x7fff82293fff libGIF.dylib ??? (???) <66436b84211fe0e723051eab15af0aca> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x7fff82294000 - 0x7fff8258ffe3 com.apple.CoreServices.CarbonCore 786.10 (786.10) <2ac701edf3ca98a86ae9d5f733200b40> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Carb onCore.framework/Versions/A/CarbonCore 0x7fff82590000 - 0x7fff825aafff libvDSP.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvDSP.dylib 0x7fff825ab000 - 0x7fff827b1ff3 com.apple.security 5.0.4 (34102) <47c559b17c1f51998e7a981d0fbec4c8> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x7fff827b2000 - 0x7fff827d9fff libxslt.1.dylib ??? (???) /usr/lib/libxslt.1.dylib 0x7fff827da000 - 0x7fff82948fff libicucore.A.dylib ??? (???) <374ddaf141bf88dba00ab9058f2dbad6> /usr/lib/libicucore.A.dylib 0x7fff82949000 - 0x7fff8295dff7 libGL.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x7fff8295e000 - 0x7fff83286fff com.apple.AppKit 6.5.6 (949.43) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x7fff83287000 - 0x7fff83667fef com.apple.QuartzCore 1.5.7 (1.5.7) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x7fff83668000 - 0x7fff836b8fe7 com.apple.Metadata 10.5.2 (398.25) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Meta data.framework/Versions/A/Metadata 0x7fff836b9000 - 0x7fff836baff3 com.apple.audio.units.AudioUnit 1.5 (1.5) /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x7fff836bb000 - 0x7fff83710fe3 com.apple.HIServices 1.7.0 (???) <6bef766448d67adb91901b432629ea0f> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/HIServices.framework/Versions/A/HIServices 0x7fff83711000 - 0x7fff83711ffd com.apple.Accelerate.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/vecLib 0x7fff83712000 - 0x7fff837a7ffb com.apple.LaunchServices 290.3 (290.3) <56544e16c5192d2ce72df772901fcaef> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Laun chServices.framework/Versions/A/LaunchServices 0x7fff837a8000 - 0x7fff8382ffef com.apple.audio.CoreAudio 3.1.1 (3.1.1) <9c1714647fd7515c900362ad2ac76874> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x7fff83830000 - 0x7fff83893fef libGLU.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dyli b 0x7fff83894000 - 0x7fff838a2ff9 com.apple.helpdata 1.0.1 (14.2) /System/Library/PrivateFrameworks/HelpData.framework/Versions/A/HelpData 0x7fff838a3000 - 0x7fff838afff1 libgcc_s.1.dylib ??? (???) <23fa31a628c1ea8a62ac529fa333b6e1> /usr/lib/libgcc_s.1.dylib 0x7fff838b0000 - 0x7fff838d2fff libJPEG.dylib ??? (???) <4257ab268996bbeb93b47946df181cdc> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x7fff838d3000 - 0x7fff838d3ffd com.apple.Accelerate 1.4.2 (Accelerate 1.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x7fff838d4000 - 0x7fff838d4ff8 com.apple.Cocoa 6.5 (???) <8c59f679ffbd9178134df1d83dedde28> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa 0x7fff838d5000 - 0x7fff839cafff libxml2.2.dylib ??? (???) <8226d1180354f493954c5fa1fc0e1154> /usr/lib/libxml2.2.dylib 0x7fff839cb000 - 0x7fff839dafe7 com.apple.opengl 1.5.9 (1.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x7fff839db000 - 0x7fff83cc2feb com.apple.HIToolbox 1.5.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. framework/Versions/A/HIToolbox 0x7fff83cc3000 - 0x7fff83d03fef com.apple.framework.IOKit 1.5.1 (???) <17e6707127a60c5e2d7a9bd2b7bf2db0> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x7fff83d04000 - 0x7fff83dc8fe2 com.apple.vImage 3.0 (3.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage .framework/Versions/A/vImage 0x7fff83dc9000 - 0x7fff83df3fff libcups.2.dylib ??? (???) /usr/lib/libcups.2.dylib 0x7fff83df4000 - 0x7fff83df4ffa com.apple.CoreServices 32 (32) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x7fff83df5000 - 0x7fff83ed6fff libcrypto.0.9.7.dylib ??? (???) <66f1f8773bd9fdfdcfd09e2b4b010636> /usr/lib/libcrypto.0.9.7.dylib 0x7fff83ed7000 - 0x7fff83f87fef com.apple.CoreServices.OSServices 226.5 (226.5) <1c38f727b3ad3293272db7323b37c735> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSSe rvices.framework/Versions/A/OSServices 0x7fff83f88000 - 0x7fff83fa2fff com.apple.openscripting 1.2.8 (???) <0674c4e3353c677c9f58df3297ae559b> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScript ing.framework/Versions/A/OpenScripting 0x7fff83fa3000 - 0x7fff83fdfff7 libGLImage.dylib ??? (???) <02258bcdbe8defdb254acc077a81dd9b> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage. dylib 0x7fff83fe0000 - 0x7fff83ff1fff com.apple.speech.synthesis.framework 3.7.1 (3.7.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x7fff83ff2000 - 0x7fff8406cff3 com.apple.CoreText 2.0.3 (???) <827bbfef670df72316719c25bfb39915> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreText.framework/Versions/A/CoreText 0x7fff8406d000 - 0x7fff841f8ffb libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0x7fff841f9000 - 0x7fff8420affd libz.1.dylib ??? (???) /usr/lib/libz.1.dylib 0x7fff8420b000 - 0x7fff842befef com.apple.DesktopServices 1.4.7 (1.4.7) /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/D esktopServicesPriv 0x7fff842bf000 - 0x7fff84677fff libLAPACK.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libLAPACK.dylib 0x7fff84678000 - 0x7fff84743fef com.apple.ColorSync 4.5.1 (4.5.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ColorSync.framework/Versions/A/ColorSync 0x7fff84744000 - 0x7fff84847feb com.apple.CoreData 100.1 (186) <074abc7f43f81f7885e4d0674a8be4bc> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x7fffffe00000 - 0x7fffffe01780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0xfffffffffffec000 - 0xfffffffffffeffff libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib SYSTEM CONFIG Model: MacPro3,1, BootROM MP31.006C.B05, 8 processors, Quad-Core Intel Xeon, 2.8 GHz, 32 GB Graphics: kHW_ATIrv630Item, ATI Radeon HD 2600, spdisplays_pcie_device, 256 MB Memory Module: DIMM Riser B/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Bluetooth: Version 2.1.3f8, 2 service, 1 devices, 1 incoming serial ports Network Service: Ethernet 2, Ethernet, en1 PCI Card: ATI Radeon HD 2600, display, Slot-1 Serial ATA Device: WDC WD3200AAJS-41VWA0, 298.09 GB Parallel ATA Device: PIONEER DVD-RW DVR-112D USB Device: Keyboard Hub, (null) mA USB Device: Apple Optical USB Mouse, (null) mA USB Device: Apple Keyboard, (null) mA USB Device: hub_device, (null) mA USB Device: Apple Cinema HD Display, (null) mA USB Device: Keyspan USA-28Xb, (null) mA USB Device: Bluetooth USB Host Controller, (null) mA FireWire Device: built-in_hub, unknown_value, unknown_speed FireWire Device: My Book, WD, 800mbit_speed FireWire Device: unknown_device, unknown_value, unknown_speed -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From jaakko.sipari at gmail.com Thu Jan 22 03:00:03 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 22 Jan 2009 12:00:03 +0200 Subject: [Rxtx] RXTX compilation with GCJ possible? Message-ID: <901f25b80901220200s53792317o374b80cbb6066a52@mail.gmail.com> Hi! Does anyone have experience on using RXTX in a GCJ compiled Java application? I'm interested whether this is possible in Windows and/or in Linux platforms. And of course what does it take to get it work, or does it just work out of the box. Ultimately my aim here would be to move to a more time deterministic system by utilizing GCJ, jRate & Javolution and possibly run the RXTX (and other important) threads at a priority higher than the garbage collector. This of course would require some modification for the RXTX threads to run in a Javolution pool context or non allocating real time contexts so they wouldn't produce any garbage, but that's something to hack on later. For now I'd just like to know if there are any obstacles on the road to compiling & running RXTX with GCJ. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/5592681a/attachment-0005.html From jmudd at dtiweb.net Thu Jan 22 06:21:03 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Thu, 22 Jan 2009 08:21:03 -0500 Subject: [Rxtx] Hot unplugging of a USB device References: <4977BEEA.4020708@gatworks.com> Message-ID: U. George, Thanks for the information. How did you resolve your USB/GPS device on Linux? My application has to run on both Linux and Windows eventually. Thanks, Jerry -----Original Message----- From: U. George [mailto:netbeans at gatworks.com] Sent: Wednesday, January 21, 2009 7:34 PM To: Jerry Mudd Cc: rxtx at qbang.org Subject: Re: [Rxtx] Hot unplugging of a USB device > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From m.kirkland at comcast.net Thu Jan 22 09:21:01 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Thu, 22 Jan 2009 08:21:01 -0800 Subject: [Rxtx] Serial port control lines change with call to getPortIdentifiers() on Linux Message-ID: <94443DEFFD574B6CA8DDB2B201D9E007@bengal.net> Hi All ! I have noticed an issue with RXTX on Ubuntu Linux 8.10 that has prevented me from being able to use RXTX on Linux. I have noticed this issue on both the rxtx 2.1.7 and the new rxtx2.2pre1. When I execute the following line to get the ports on a system - java.util.Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); Both DTR and RTS become active on ttyS0 and only ttyS0, not ttyS1 (I only have 2 ports). I see this prior to opening any ports or making any other calls to RXTX. I have stepped it though with the debugger and I am sure this is the trigger. My application uses these control lines to perform functions other then the standard flow control so it is critical that I be able to control them exactly. I would also think that folks using RXTX for more standard serial IO would also have issues with devices starting to talk before a listener was ready. I checked Windows XP and I do not see this issue (but I only have a com1 on the Windows computer). I also noticed that the DTR line blips when setting up a port on 2.2.pre1 like it does on 2.1.7r2. This it the same issue that the folks at http://www.codeskin.com/ patched. I see this issue on both Linux and Windows XP. Any help or clues would be greatly appreciated. If I can provide any additional info or do any testing I would be glad to help out to get version 2.2 in top shape for release. BTW I have written a simple dynamic loader to load the RXTX jar and native code that is drive by the os.name and os.arch system properties. I would be more then happy to contribute this to the project if folks though it would be useful. Its more convenient then having to manage copying the files around to various JVM's. TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/eab26bae/attachment-0003.html From josefk_5 at yahoo.com Fri Jan 23 09:44:06 2009 From: josefk_5 at yahoo.com (Josef Kahsay) Date: Fri, 23 Jan 2009 08:44:06 -0800 (PST) Subject: [Rxtx] Help on Accessing RS232 Message-ID: <509617.88308.qm@web38205.mail.mud.yahoo.com> Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS From m.kirkland at comcast.net Sat Jan 24 01:28:52 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Sat, 24 Jan 2009 00:28:52 -0800 Subject: [Rxtx] Help on Accessing RS232 In-Reply-To: <509617.88308.qm@web38205.mail.mud.yahoo.com> References: <509617.88308.qm@web38205.mail.mud.yahoo.com> Message-ID: <665887C02E1446708CE392FE0BD73D79@bengal.net> It seems to me that you are having a classic java classpath issue. Java classpath issues can be annoying to solve sometimes. As some random guesses I would suggest you look at the following. 1 - You might not be running the JVM from the location that you think you are (gets me all the time). I which Windows had a which command. 2 - You don't mention what development environment you are using like Eclipse etc., and if you are trying to run the demo from inside the development environment. If so, do whatever is appropriate for the development environment to control the classpath. In Eclipse this would involve adding a "User Library" to point to the jar and native code. 3 - Once you get the classpath ok, the next thing you might run into is not being able to load the native library. 4 - I have found that on XP I can place the RXTX jar and native library in the same directory as my application's jar file (and a class-path entry in the application's jar file manifest) and it all works. 5 - If you need more control of managing different versions of RXTX for different OS platforms, I have a dynamic RXTX loader I can send you (but I recommend getting the simple case working first). Let me know if this helps. Mike -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Josef Kahsay Sent: Friday, January 23, 2009 8:44 AM To: rxtx at qbang.org Subject: [Rxtx] Help on Accessing RS232 Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0023.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0023.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0021.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0021.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0021.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0021.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0020.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0018.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0018.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0018.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0018.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0018.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0015.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0015.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0015.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment-0014.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0014.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment-0014.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment-0014.html From tjarvi at qbang.org Wed Jan 14 18:56:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 14 Jan 2009 18:56:50 -0700 (MST) Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Message-ID: On Wed, 14 Jan 2009, Jaakko Sipari wrote: > Hi (again)! > > Could someone clarify what these methods actually do and are they even > implemented? Do I get into trouble with buffer values of 0 (if I want to > handle the buffers myself)? > rxtx does not have buffers. It was not clear to me at the time why there would be a buffer when java already provides buffered input and output streams that can sit on top of rxtx. One reason I can see for implementing buffers in rxtx is to get data off the port so select() can block. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Wed Jan 14 23:23:08 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 15 Jan 2009 08:23:08 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> Message-ID: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Here's the same message for the list also. Forgot to do "Reply to all" ---------- Forwarded message ---------- From: Jaakko Sipari Date: Thu, Jan 15, 2009 at 8:22 AM Subject: Re: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize To: Trent Jarvi On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! >> >> Could someone clarify what these methods actually do and are they even >> implemented? Do I get into trouble with buffer values of 0 (if I want to >> handle the buffers myself)? >> >> > rxtx does not have buffers. It was not clear to me at the time why there > would be a buffer when java already provides buffered input and output > streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data off > the port so select() can block. > So basically those methods have currently no effect at all? - Jaakko -- Jaakko Sipari tel. +358451238191 eMail. jaakko.sipari at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090115/8b4c47c0/attachment-0013.html From tjarvi at qbang.org Thu Jan 15 18:37:12 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 15 Jan 2009 18:37:12 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: On Thu, 15 Jan 2009, Jaakko Sipari wrote: > Here's the same message for the list also. Forgot to do "Reply to all" > > ---------- Forwarded message ---------- > From: Jaakko Sipari > Date: Thu, Jan 15, 2009 at 8:22 AM > Subject: Re: [Rxtx] The functionality behind setInputBufferSize & > setOutputBufferSize > To: Trent Jarvi > > > On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! > > Could someone clarify what these methods actually do > and are they even > implemented? Do I get into trouble with buffer > values of 0 (if I want to > handle the buffers myself)? > > > rxtx does not have buffers. ?It was not clear to me at the time why > there would be a buffer when java already provides buffered input and > output streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data > off the port so select() can block. > > > So basically those methods have currently no effect at all? > Correct. You can use BufferedInputStream and BufferedOutputStream from the Java API once you get the Input/OutputStream from rxtx. But changing the input and output buffer size in rxtx is not going to change behavior. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Fri Jan 16 01:22:37 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Fri, 16 Jan 2009 10:22:37 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> > So basically those methods have currently no effect at all? >> >> > Correct. You can use BufferedInputStream and BufferedOutputStream from the > Java API once you get the Input/OutputStream from rxtx. But changing the > input and output buffer size in rxtx is not going to change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > I assume there still is some kind of buffer in rxtx (or the serial port driver) in case of processing delays. I mean, if the serial port gives data faster than can be read from the Java program using rxtx it isn't just thrown away, right? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090116/3bd9a52e/attachment-0012.html From tjarvi at qbang.org Fri Jan 16 05:17:24 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 16 Jan 2009 05:17:24 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> Message-ID: On Fri, 16 Jan 2009, Jaakko Sipari wrote: > > So basically those methods have currently no effect > at all? > > > Correct. ?You can use BufferedInputStream and BufferedOutputStream > from the Java API once you get the Input/OutputStream from rxtx. ?But > changing the input and output buffer size in rxtx is not going to > change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > > > > I assume there still is some kind of buffer in rxtx (or the serial port > driver) in case of processing delays. I mean, if the serial port gives data > faster than can be read from the Java program using rxtx it isn't just > thrown away, right? > The UART can usually hold a few bytes. The kernel driver can buffer the input. In practice, it works. With Sun commapi, the typical application has 4 buffers between the user and the incomming data. With rxtx, it is 3. BufferedInputStream -> commapi/rxtx -> kernel driver -> UART If you really do run into overflows on the UART, then hardware flow control is what you should be using and tinkering with rxtx to avoid it is not a very sound approach. -- Trent Jarvi tjarvi at qbang.org From llowrey at nuclearwinter.com Sun Jan 18 12:49:39 2009 From: llowrey at nuclearwinter.com (Larkin Lowrey) Date: Sun, 18 Jan 2009 13:49:39 -0600 Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain Message-ID: <497387D3.9040201@nuclearwinter.com> After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when running code that uses RXTXComm. The crashes only occur when using 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. As far as I can tell, the crash happens immediately on start. I can't see any evidence of much, if anything, happening before the crash. The code used to work and only stopped working after the "upgrade" to FC10. I have tried RXTX v2.1 and 2.2pre1. Any ideas? Here's the error: # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode linux-amd64) # Problematic frame: # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 --Larkin From tjarvi at qbang.org Mon Jan 19 17:48:34 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 19 Jan 2009 17:48:34 -0700 (MST) Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain In-Reply-To: <497387D3.9040201@nuclearwinter.com> References: <497387D3.9040201@nuclearwinter.com> Message-ID: On Sun, 18 Jan 2009, Larkin Lowrey wrote: > After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when > running code that uses RXTXComm. The crashes only occur when using > 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. > > As far as I can tell, the crash happens immediately on start. I can't > see any evidence of much, if anything, happening before the crash. > > The code used to work and only stopped working after the "upgrade" to > FC10. I have tried RXTX v2.1 and 2.2pre1. > > Any ideas? > > Here's the error: > > # > # An unexpected error has been detected by Java Runtime Environment: > # > # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 > # > # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode > linux-amd64) > # Problematic frame: > # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 > > > --Larkin Hi Larkin, I can think of 2 segv's in rxtx that may apply. Both are fixed in rxtx 2.2pre.. The first was that pointers required by nativeDrain needed to be stored in something larger than a 32 bit integer in java. This resulted in a crash like you see the first time the 'nativedrain' thread tried to use the pointer. The second was a concurrency issue George resolved with synchronization. The crash was usually during close but happened in the 'nativedrain' thread. (eventLoop) As mentioned, these are both fixed in the prerelease. There is a class provided in recent versions of RXTX that allow you confirm the version being used: gnu.io.RXTXVersion with member methods getVersion() and nativeGetVersion(). This allows you to confirm that you are indeed using the version you think you are. -- Trent Jarvi tjarvi at qbang.org From alexandrepoletto at gmail.com Wed Jan 21 11:48:07 2009 From: alexandrepoletto at gmail.com (Alexandre Poletto) Date: Wed, 21 Jan 2009 16:48:07 -0200 Subject: [Rxtx] work in windows but dont work in linux Message-ID: hi folks, I have an application to communicate with the serial port using rxtx, in the windows os my application works well, but when i try to run in the linux os i open the port (in windows "COM1", in Linux "/dev/ttyS0") send my commandes but i never receive any answer. I'm using ubuntu 8.10 and java 1.5, there is any configuration in that i'm missing? Thanks for the help! ps: Sorry form my bad english :( -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/70baea51/attachment-0006.html From jmudd at dtiweb.net Wed Jan 21 14:08:04 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Wed, 21 Jan 2009 16:08:04 -0500 Subject: [Rxtx] Hot unplugging of a USB device Message-ID: Looking to see if the issues surrounding an uplugging of a USB device have been resolved. I see from the mail list archives and bug reports that others have noted this issue. I have a USB GPS Receiver that is plugged into a Windows (XP) system and am using Netbeans 6.5 and Java jdk 1.6 and RXTX 2.1.7 and 2.2pre1. In the thread that is reading data via listening for a SerialEvent I can capture a Java IOException: No error in readArray. The application is essentially hung at this point. Only a termination of the application will clear it up and not leave the port hung. I had read in the archives that this is because the event loop in the native code portion is continually putting out the exceptions. I had also seen that this might be addressed in future releases. Any help is appreciated. Thanks, Jerry ________________________________ Jerry Mudd Senior Programmer 21795 Shangri-La Drive, Ste C Lexington Park, MD 20653 (301) 737-8893 (301) 737-8897 Fax jmudd at dtiweb.net www.dtiweb.net This message may contain sensitive, proprietary and/or privileged information. Disclosure is not authorized unless provided in writing by Defense Technologies, Inc. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0006.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 6296 bytes Desc: image001.gif Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0006.gif From netbeans at gatworks.com Wed Jan 21 17:33:46 2009 From: netbeans at gatworks.com (U. George) Date: Wed, 21 Jan 2009 19:33:46 -0500 Subject: [Rxtx] Hot unplugging of a USB device In-Reply-To: References: Message-ID: <4977BEEA.4020708@gatworks.com> > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:34 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:34 +1100 Subject: [Rxtx] Part 1 of 2 parts re rxtx 2.2 pre.. and OSX Message-ID: Hi, I have tried out the latest version of rxtx on a mac and can report that running with ImageJ (32 bit ) all seems to be fine. However when I attempt to use it with ImageJ64, I get a crash whenever the serial port is used. The details follow. What I did. Ran our plug-in in ImageJ 64 bit (1.42g) for Measuring, which is using the latest rxtx (the beta 2.2 compiled on 30 December 2008) for MacOSX 10.5.x) I installed this by putting the two files in the directory ~ LIBRARY/JAVA/EXTENSIONS. The Plug-in uses the serial port. The window we put up to show the numbers from the stage appeared, but only with the default "0" (zero) in each row, which is what we put there until we get data back from the port and the device attached. Then it crashed. I should point out that this all works fine using ImageJ (32 bit) 1.42g, on the same platform. So the only difference is the use of ImageJ 64 bit, and I guess the version of rxtx for 64 bit. I hope that cleverer people than me can throw some light onto this little problem. ImageJ64 seems to work ok until rxtx is called, although I haven't tried much so far, just some 3D rendering with 1 Gb of image data, which all went well, apart from the fact that the data was marginal. I am now showing the data supplied by the report to Apple window. This has three tabs, one to write your information in, one called Problem Details, and the third called SYSTEM CONFIG. These are pasted in below. Best wishes Noel Problem Details Process: JavaApplicationStub [463] Path: /Applications/ImageJ/ImageJ64.app/Contents/MacOS/JavaApplicationStub Identifier: gov.nih.info.rsb.ImageJ Version: ??? (10.2) Code Type: X86-64 (Native) Parent Process: launchd [398] Date/Time: 2009-01-19 10:48:09.342 +1100 OS Version: Mac OS X 10.5.6 (9G55) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000000029507c8 Crashed Thread: 16 Application Specific Information: Java information: Exception type: Bus Error (0xa) at pc=0x00000006ff70f418 Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0_07-b06-57 mixed mode macosx-amd64) Current thread (0x00000001020de800): JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] Stack: [0x0000000702851000,0x0000000702951000] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j gnu.io.RXTXPort.readByte()I+0 j gnu.io.RXTXPort$SerialInputStream.read()I+81 j SerialConnection.serialEvent(Lgnu/io/SerialPortEvent;)V+41 j gnu.io.RXTXPort.sendEvent(IZ)Z+382 v ~BufferBlob::StubRoutines (1) j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~BufferBlob::StubRoutines (1) Java Threads: ( => current thread ) =>0x00000001020de800 JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] 0x00000001020e8800 JavaThread "Measure XYZ" [_thread_blocked, id=44384256, stack(0x0000000702954000,0x0000000702a54000)] 0x0000000102001000 JavaThread "DestroyJavaVM" [_thread_blocked, id=25169920, stack(0x0000000101001000,0x0000000101801000)] 0x00000001020da800 JavaThread "SocketListener" [_thread_in_native, id=29671424, stack(0x0000000701b4c000,0x0000000701c4c000)] 0x00000001020b4800 JavaThread "AWT-EventQueue-0" [_thread_in_Java, id=-27992064, stack(0x00000006fe44e000,0x00000006fe54e000)] 0x0000000102096000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=-34344960, stack(0x00000006fde3f000,0x00000006fdf3f000)] 0x0000000102078000 JavaThread "AWT-Shutdown" [_thread_blocked, id=-58392576, stack(0x00000006fc750000,0x00000006fc850000)] 0x0000000102077800 JavaThread "AWT-AppKit" daemon [_thread_in_native, id=1886770976, stack(0x00007fff5f400000,0x00007fff5fc00000)] 0x0000000102044800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=-333877248, stack(0x00000006ec097000,0x00000006ec197000)] 0x0000000102043000 JavaThread "CompilerThread1" daemon [_thread_blocked, id=-334938112, stack(0x00000006ebf94000,0x00000006ec094000)] 0x0000000102041800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=-335998976, stack(0x00000006ebe91000,0x00000006ebf91000)] 0x0000000102041000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=-337059840, stack(0x00000006ebd8e000,0x00000006ebe8e000)] 0x0000000102029800 JavaThread "Finalizer" daemon [_thread_blocked, id=-338214912, stack(0x00000006ebc74000,0x00000006ebd74000)] 0x0000000102028800 JavaThread "Reference Handler" daemon [_thread_blocked, id=-339333120, stack(0x00000006ebb63000,0x00000006ebc63000)] Other Threads: 0x0000000102020800 VMThread [stack: 0x00000006eba60000,0x00000006ebb60000] [id=-340393984] 0x0000000102046000 WatcherThread [stack: 0x00000006ec19a000,0x00000006ec29a000] [id=-332816384] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 76480K, used 14448K [0x0000000105800000, 0x000000010ad50000, 0x00000002f9800000) eden space 65600K, 22% used [0x0000000105800000, 0x000000010661c398, 0x0000000109810000) from space 10880K, 0% used [0x0000000109810000, 0x0000000109810000, 0x000000010a2b0000) to space 10880K, 0% used [0x000000010a2b0000, 0x000000010a2b0000, 0x000000010ad50000) tenured generation total 174784K, used 0K [0x00000002f9800000, 0x00000003042b0000, 0x00000006e1800000) the space 174784K, 0% used [0x00000002f9800000, 0x00000002f9800000, 0x00000002f9800200, 0x00000003042b0000) compacting perm gen total 21248K, used 10319K [0x00000006e1800000, 0x00000006e2cc0000, 0x00000006e6c00000) the space 21248K, 48% used [0x00000006e1800000, 0x00000006e2213d28, 0x00000006e2213e00, 0x00000006e2cc0000) No shared spaces configured. Virtual Machine Arguments: JVM Args: -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher. framework/Resources/LauncherSupport.jar -Xms256m -Xmx24000m -Dcom.apple.macos.useScreenMenuBar=false -Dcom.apple.mrj.application.growbox.intrudes=false -Dcom.apple.mrj.application.live-resize=true -Dcom.apple.hwaccel=false -Dapple.awt.Antialiasing=false -Dcom.apple.smallTabs=true -Dapple.awt.brushMetalLook=false Java Command: Launcher Type: generic Physical Memory: Page Size = 4k, Total = 2048M, Free = 30996M Thread 0: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 com.apple.CoreFoundation 0x00007fff8204dc4f CFRunLoopRunSpecific + 1631 3 com.apple.HIToolbox 0x00007fff839fdda2 RunCurrentEventLoopInMode + 278 4 com.apple.HIToolbox 0x00007fff839fdbd8 ReceiveNextEventCommon + 322 5 com.apple.HIToolbox 0x00007fff839fda83 BlockUntilNextEventMatchingListInMode + 79 6 com.apple.AppKit 0x00007fff8299d3b0 _DPSNextEvent + 603 7 com.apple.AppKit 0x00007fff8299ccf1 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 136 8 com.apple.AppKit 0x00007fff82996a84 -[NSApplication run] + 455 9 libawt.jnilib 0x00000006ec433257 +[AWTStarter startAWT:] + 1343 10 libawt.jnilib 0x00000006ec432c46 -[CPerformer perform] + 112 11 com.apple.Foundation 0x00007fff8153f2b4 __NSThreadPerformPerform + 148 12 com.apple.CoreFoundation 0x00007fff8204e0e8 CFRunLoopRunSpecific + 2808 13 ...ple.JavaApplicationLauncher 0x0000000100005165 startupJava(LauncherArgsStruct*) + 235 14 ...ple.JavaApplicationLauncher 0x000000010000579c launchJavaApplication + 1224 15 JavaApplicationStub 0x0000000100000b9c 0x100000000 + 2972 Thread 1: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x0000000101a93b61 JVM_GetCPFieldModifiers + 128961 5 libjvm.dylib 0x0000000101a93a36 JVM_GetCPFieldModifiers + 128662 6 ...ple.JavaApplicationLauncher 0x000000010000c0ce startJavaApplication + 2886 7 ...ple.JavaApplicationLauncher 0x000000010000506d java_main_stub(void*) + 9 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 2: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libSystem.B.dylib 0x00007fff840db0b0 mach_msg_server + 436 3 libjvm.dylib 0x000000010181176d JNI_CreateJavaVM_Impl + 53277 4 libjvm.dylib 0x0000000101811375 JNI_CreateJavaVM_Impl + 52261 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 3: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x00000001018e452f JVM_Lseek + 235727 5 libjvm.dylib 0x00000001018e42df JVM_Lseek + 235135 6 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 7 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 8 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 4: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x00000001028003ea 0 + 4336911338 11 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 12 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 13 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 14 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 15 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 16 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 17 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 18 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 19 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 20 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 5: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 6: 0 libSystem.B.dylib 0x00007fff8406dd72 semaphore_wait_trap + 10 1 libjvm.dylib 0x0000000101915bdb JVM_IsPrimitiveClass + 12139 2 libjvm.dylib 0x00000001019155b5 JVM_IsPrimitiveClass + 10565 3 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 4 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 7: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 8: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 9: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x0000000101918ec8 JVM_IsPrimitiveClass + 25176 5 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 6 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 7 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 10: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x000000010191abb5 JVM_IsPrimitiveClass + 32581 4 libjvm.dylib 0x000000010191a70a JVM_IsPrimitiveClass + 31386 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 11: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 12: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x0000000102803414 0 + 4336923668 12 ??? 0x00000001028003ea 0 + 4336911338 13 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 14 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 15 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 16 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 17 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 18 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 19 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 20 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 21 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 22 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 13: 0 ??? 0x0000000102817034 0 + 4337004596 1 ??? 0x000000010280304e 0 + 4336922702 2 ??? 0x0000000102803093 0 + 4336922771 3 ??? 0x000000010280356d 0 + 4336924013 4 ??? 0x0000000102803093 0 + 4336922771 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x000000010280356d 0 + 4336924013 8 ??? 0x0000000102803093 0 + 4336922771 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x0000000102802f3a 0 + 4336922426 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102802f3a 0 + 4336922426 14 ??? 0x0000000102802f3a 0 + 4336922426 15 ??? 0x0000000102803162 0 + 4336922978 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102802f3a 0 + 4336922426 19 ??? 0x0000000102802f3a 0 + 4336922426 20 ??? 0x00000001028003ea 0 + 4336911338 21 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 22 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 23 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 24 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 25 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 26 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 27 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 28 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 29 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 30 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 14: 0 libSystem.B.dylib 0x00007fff840f210e accept + 10 1 libnet.jnilib 0x00000006ff6b6b11 Java_java_net_PlainSocketImpl_socketAccept + 277 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x0000000102802f3a 0 + 4336922426 4 ??? 0x0000000102802f3a 0 + 4336922426 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x0000000102803414 0 + 4336923668 8 ??? 0x00000001028003ea 0 + 4336911338 9 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 10 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 11 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 12 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 13 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 14 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 15 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 16 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 17 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 18 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 15: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x000000010280304e 0 + 4336922702 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102803414 0 + 4336923668 14 ??? 0x0000000102803093 0 + 4336922771 15 ??? 0x0000000102803093 0 + 4336922771 16 ??? 0x0000000102803093 0 + 4336922771 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102803414 0 + 4336923668 19 ??? 0x00000001028003ea 0 + 4336911338 20 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 21 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 22 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 23 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 24 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 25 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 26 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 27 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 28 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 29 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 Crashed: 0 librxtxSerial.jnilib 0x00000006ff70f418 read_byte_array + 68 1 librxtxSerial.jnilib 0x00000006ff70f9b3 Java_gnu_io_RXTXPort_readByte + 93 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x000000010280304e 0 + 4336922702 4 ??? 0x000000010280304e 0 + 4336922702 5 ??? 0x0000000102803414 0 + 4336923668 6 ??? 0x00000001028003ea 0 + 4336911338 7 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 8 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 9 libjvm.dylib 0x00000001018e5be8 JVM_Lseek + 241544 10 libjvm.dylib 0x0000000101900b11 JVM_MonitorWait + 17249 11 libjvm.dylib 0x0000000101a1e59e JVM_DisableCompiler + 1166 12 librxtxSerial.jnilib 0x00000006ff70d91e send_event + 132 13 librxtxSerial.jnilib 0x00000006ff70e82b report_serial_events + 92 14 librxtxSerial.jnilib 0x00000006ff7108c9 Java_gnu_io_RXTXPort_eventLoop + 237 15 ??? 0x000000010280e878 0 + 4336969848 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x00000001028003ea 0 + 4336911338 18 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 19 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 20 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 21 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 22 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 23 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 24 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 25 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 26 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 27 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 17: 0 libSystem.B.dylib 0x00007fff84074d02 __semwait_signal + 10 1 libSystem.B.dylib 0x00007fff840dce91 usleep + 57 2 librxtxSerial.jnilib 0x00000006ff70d729 drain_loop + 45 3 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 4 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 crashed with X86 Thread State (64-bit): rax: 0x00000000029507c0 rbx: 0x0000000000000041 rcx: 0x0000000000000065 rdx: 0x0000000000000002 rdi: 0x00000006ff71205e rsi: 0x00000006ff711c67 rbp: 0x0000000702950000 rsp: 0x000000070294fef0 r8: 0x000000000000004d r9: 0x00000006e21d64c0 r10: 0x00000006e21d38e8 r11: 0x00000000000000d2 r12: 0x00000001020de998 r13: 0x00000006e21d93b0 r14: 0x0000000000000032 r15: 0x00000000029507c0 rip: 0x00000006ff70f418 rfl: 0x0000000000010202 cr2: 0x00000000029507c8 Continued in the message part 2 -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:41 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:41 +1100 Subject: [Rxtx] Part 2 re rxtx 2.2 pre... and MacOSX Message-ID: Continued from Part 1. Binary Images: 0x100000000 - 0x100000fff JavaApplicationStub ??? (???) /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationS tub 0x100004000 - 0x100011fff com.apple.JavaApplicationLauncher 12.2.0 (12.2.0) /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/JavaApplicationLauncher 0x10001a000 - 0x100022ffd com.apple.JavaVM 12.2.0 (12.2.0) <2b178e8d4bbcc0aa427c2f3f71bb2fcb> /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM 0x100055000 - 0x10005dff0 libverify.dylib ??? (???) <56eac95084cb86cd1339a721b1353182> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libveri fy.dylib 0x100063000 - 0x10006cffb JavaNativeFoundation ??? (???) <68ca6409dc49542301edda1e0744ac69> /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNative Foundation.framework/Versions/A/JavaNativeFoundation 0x1000a8000 - 0x1000c7fef libjava.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjava .jnilib 0x1000d8000 - 0x1000e5ffb libzip.jnilib ??? (???) <5b6dce7c9a1f25aa5dff1a633c9dc342> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libzip. jnilib 0x101803000 - 0x101eafff3 libjvm.dylib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bundle/Libra ries/libjvm.dylib 0x6ec2c5000 - 0x6ec2c6fff liblauncher.jnilib ??? (???) <567fa54a222b965b2c4aefea21d9800a> /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/Resources/liblauncher.jnilib 0x6ec431000 - 0x6ec5e4fff libawt.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libawt. jnilib 0x6fdc3b000 - 0x6fdc3cfff ATSHI.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/Resources/ATSHI.dylib 0x6fdd6e000 - 0x6fdd6efff libcmm.jnilib ??? (???) <114e1a620a6920d77bf09bd57a7f7d52> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libcmm. jnilib 0x6fdd9e000 - 0x6fde1fff7 libfontmanager.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libfont manager.jnilib 0x6fdf41000 - 0x6fdf8ffff libsuncmm.jnilib ??? (???) <47330f1f17822de3a5cf921e07615cf7> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libsunc mm.jnilib 0x6fdf95000 - 0x6fdfc4ff7 libjpeg.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjpeg .jnilib 0x6ff6ae000 - 0x6ff6baffb libnet.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnet. jnilib 0x6ff6c0000 - 0x6ff6c4fff libnio.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnio. jnilib 0x6ff6d4000 - 0x6ff6e8ff7 libdcpr.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libdcpr .jnilib 0x6ff70c000 - 0x6ff713fff +librxtxSerial.jnilib ??? (???) <5133deacebd01ceab7d528c541241956> /Library/Java/Extensions/librxtxSerial.jnilib 0x6ff734000 - 0x6ff74bfef libJapaneseConverter.dylib ??? (???) <64cca6bb4650a269f49a8427507e4963> /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib 0x70204f000 - 0x702218fef com.apple.RawCamera.bundle 2.0.10 (2.0.10) /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera 0x7fff5fc00000 - 0x7fff5fc2e643 dyld 97.1 (???) /usr/lib/dyld 0x7fff80003000 - 0x7fff80146ffb com.apple.audio.toolbox.AudioToolbox 1.5.2 (1.5.2) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x7fff801d2000 - 0x7fff801d5ffb com.apple.help 1.1 (36) <9000c05ccad96fdcc25bc35264abf587> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.frame work/Versions/A/Help 0x7fff801d6000 - 0x7fff80211fff com.apple.AE 402.2 (402.2) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.f ramework/Versions/A/AE 0x7fff80212000 - 0x7fff80257fef libRIP.A.dylib ??? (???) <8c818d7fd3dc57839ac48caf107ff4c0> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x7fff80258000 - 0x7fff8029bfef com.apple.QD 3.11.54 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/QD.framework/Versions/A/QD 0x7fff8029c000 - 0x7fff802dffef libTIFF.dylib ??? (???) <86be7909f46cc044a887cbb60ab7826d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x7fff802e0000 - 0x7fff803d4fff libobjc.A.dylib ??? (???) <118dc1ae05e685ad64290352fc94f1f0> /usr/lib/libobjc.A.dylib 0x7fff803d5000 - 0x7fff8045dfe7 libsqlite3.0.dylib ??? (???) <3c7ab3523b816dbd3e039ee7e6e2c580> /usr/lib/libsqlite3.0.dylib 0x7fff8045e000 - 0x7fff80466ffa libbsm.dylib ??? (???) <4d838c0d8a74fe61c781a53a8723303d> /usr/lib/libbsm.dylib 0x7fff80467000 - 0x7fff80497fff com.apple.shortcut 1 (1.0) <9822328df9321a661af3afcc841e8f80> /System/Library/PrivateFrameworks/Shortcut.framework/Versions/A/Shortcut 0x7fff80498000 - 0x7fff8049bfff com.apple.securityhi 3.0 (30817) <00ddd6e60692b62b7649573eab8aef5a> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI .framework/Versions/A/SecurityHI 0x7fff8049c000 - 0x7fff8049efff com.apple.print.framework.Print 218.0.2 (220.1) <2b847a0a1cd885f596a4d10409d50ba3> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.fram ework/Versions/A/Print 0x7fff8049f000 - 0x7fff805dbfe9 com.apple.ImageIO.framework 2.0.4 (2.0.4) <47dcdc0b5986b2c157e0b6dae48ce464> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/ImageIO 0x7fff805dc000 - 0x7fff805f9fef com.apple.CoreVideo 1.5.1 (1.5.1) <78253b3fe8d3dcc90f159d7ed866c295> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x7fff805fa000 - 0x7fff8068bfff com.apple.SearchKit 1.2.1 (1.2.1) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Sear chKit.framework/Versions/A/SearchKit 0x7fff8068c000 - 0x7fff80e49fef libBLAS.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libBLAS.dylib 0x7fff80e4a000 - 0x7fff81416fff com.apple.CoreGraphics 1.407.2 (???) <436dbc70f8c9b29b3beb1d2de220acf2> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/CoreGraphics 0x7fff81417000 - 0x7fff8141dfff com.apple.DiskArbitration 2.2.1 (2.2.1) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitrat ion 0x7fff8141e000 - 0x7fff8145bff7 com.apple.SystemConfiguration 1.9.2 (1.9.2) <150119d0cecb0c80f6736b9881c2411e> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemCo nfiguration 0x7fff8145c000 - 0x7fff81523fec com.apple.CFNetwork 422.11 (422.11) <570ca46de3b907cb1c8e33fc62f562b4> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNe twork.framework/Versions/A/CFNetwork 0x7fff81524000 - 0x7fff8152dfff libCGATS.A.dylib ??? (???) <722a0bbd58740d46739008e881010631> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib 0x7fff8152e000 - 0x7fff81533fff com.apple.CommonPanels 1.2.4 (85) <2cec1ecc95cf1ecea8bea030975a46b8> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPane ls.framework/Versions/A/CommonPanels 0x7fff81534000 - 0x7fff817cffe3 com.apple.Foundation 6.5.7 (677.22) <8134977fcc57198a53dc494b60592980> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x7fff817d0000 - 0x7fff817d0ffd com.apple.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x7fff817d1000 - 0x7fff81cf1fc6 libGLProgrammability.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgra mmability.dylib 0x7fff81cf2000 - 0x7fff81cf4fff com.apple.NavigationServices 3.5.2 (163) <7cb7f3fe7f9d56ec89ef28a6d3a1da7d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Navigation Services.framework/Versions/A/NavigationServices 0x7fff81cf5000 - 0x7fff81d32fe7 com.apple.coreui 1.2 (62) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x7fff81d33000 - 0x7fff81d33fff com.apple.Carbon 136 (136) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x7fff81d34000 - 0x7fff81d42fff libCSync.A.dylib ??? (???) <61f6cc104b3e9b77cd583635a3a9a5cf> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x7fff81d43000 - 0x7fff81d45ff9 libRadiance.dylib ??? (???) <6d9f2235e8f70a7aedfc59383a7548d8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x7fff81d46000 - 0x7fff81db5ff9 com.apple.print.framework.PrintCore 5.5.3 (245.3) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/PrintCore.framework/Versions/A/PrintCore 0x7fff81db6000 - 0x7fff81db6ff8 com.apple.ApplicationServices 34 (34) <81cd02cc2ccf4e47e51d03db860da556> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Applicat ionServices 0x7fff81db7000 - 0x7fff81dd8fff libresolv.9.dylib ??? (???) <38318f9fbcfbdb384e0f9b08cc0e757a> /usr/lib/libresolv.9.dylib 0x7fff81dd9000 - 0x7fff81e4ffef libvMisc.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvMisc.dylib 0x7fff81e50000 - 0x7fff81e52ff7 libffi.dylib ??? (???) <920bb19728451f35703bb95dc908c7ca> /usr/lib/libffi.dylib 0x7fff81e53000 - 0x7fff81eeefe7 com.apple.ink.framework 101.3 (86) <60c6579faf114ea9677fd9ae25389ed2> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framew ork/Versions/A/Ink 0x7fff81eef000 - 0x7fff81f0dfff libPng.dylib ??? (???) <4017eab74319a648dfd73b7d503e557d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x7fff81f0e000 - 0x7fff81f24ff9 com.apple.ImageCapture 5.0.1 (5.0.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCaptu re.framework/Versions/A/ImageCapture 0x7fff81f25000 - 0x7fff81f3dfff com.apple.DictionaryServices 1.0.0 (1.0.0) <78ea11e9a92120f76d69efa24b8d1f95> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Dict ionaryServices.framework/Versions/A/DictionaryServices 0x7fff81f3e000 - 0x7fff81f42fff libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib 0x7fff81f43000 - 0x7fff81fe3fe3 com.apple.ApplicationServices.ATS 3.4 (???) <47cf09bf78935889f17f1b6b09badf0d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/ATS 0x7fff81fe4000 - 0x7fff8211bfff com.apple.CoreFoundation 6.5.5 (476.17) <51930d43c7c2d8fb24148cbfc05bba0f> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundatio n 0x7fff8211c000 - 0x7fff82126fff com.apple.speech.recognition.framework 3.7.24 (3.7.24) <2399374b096b284345daba82e2cb833d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechReco gnition.framework/Versions/A/SpeechRecognition 0x7fff82127000 - 0x7fff82159ff7 libauto.dylib ??? (???) /usr/lib/libauto.dylib 0x7fff8215a000 - 0x7fff821cefe7 libstdc++.6.dylib ??? (???) <565ee6f798f7fef6f804c60682787280> /usr/lib/libstdc++.6.dylib 0x7fff821cf000 - 0x7fff8228dfff edu.mit.Kerberos 6.0.12 (6.0.12) /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x7fff8228e000 - 0x7fff8228effb com.apple.installserver.framework 1.0 (8) /System/Library/PrivateFrameworks/InstallServer.framework/Versions/A/Install Server 0x7fff8228f000 - 0x7fff82293fff libGIF.dylib ??? (???) <66436b84211fe0e723051eab15af0aca> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x7fff82294000 - 0x7fff8258ffe3 com.apple.CoreServices.CarbonCore 786.10 (786.10) <2ac701edf3ca98a86ae9d5f733200b40> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Carb onCore.framework/Versions/A/CarbonCore 0x7fff82590000 - 0x7fff825aafff libvDSP.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvDSP.dylib 0x7fff825ab000 - 0x7fff827b1ff3 com.apple.security 5.0.4 (34102) <47c559b17c1f51998e7a981d0fbec4c8> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x7fff827b2000 - 0x7fff827d9fff libxslt.1.dylib ??? (???) /usr/lib/libxslt.1.dylib 0x7fff827da000 - 0x7fff82948fff libicucore.A.dylib ??? (???) <374ddaf141bf88dba00ab9058f2dbad6> /usr/lib/libicucore.A.dylib 0x7fff82949000 - 0x7fff8295dff7 libGL.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x7fff8295e000 - 0x7fff83286fff com.apple.AppKit 6.5.6 (949.43) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x7fff83287000 - 0x7fff83667fef com.apple.QuartzCore 1.5.7 (1.5.7) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x7fff83668000 - 0x7fff836b8fe7 com.apple.Metadata 10.5.2 (398.25) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Meta data.framework/Versions/A/Metadata 0x7fff836b9000 - 0x7fff836baff3 com.apple.audio.units.AudioUnit 1.5 (1.5) /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x7fff836bb000 - 0x7fff83710fe3 com.apple.HIServices 1.7.0 (???) <6bef766448d67adb91901b432629ea0f> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/HIServices.framework/Versions/A/HIServices 0x7fff83711000 - 0x7fff83711ffd com.apple.Accelerate.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/vecLib 0x7fff83712000 - 0x7fff837a7ffb com.apple.LaunchServices 290.3 (290.3) <56544e16c5192d2ce72df772901fcaef> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Laun chServices.framework/Versions/A/LaunchServices 0x7fff837a8000 - 0x7fff8382ffef com.apple.audio.CoreAudio 3.1.1 (3.1.1) <9c1714647fd7515c900362ad2ac76874> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x7fff83830000 - 0x7fff83893fef libGLU.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dyli b 0x7fff83894000 - 0x7fff838a2ff9 com.apple.helpdata 1.0.1 (14.2) /System/Library/PrivateFrameworks/HelpData.framework/Versions/A/HelpData 0x7fff838a3000 - 0x7fff838afff1 libgcc_s.1.dylib ??? (???) <23fa31a628c1ea8a62ac529fa333b6e1> /usr/lib/libgcc_s.1.dylib 0x7fff838b0000 - 0x7fff838d2fff libJPEG.dylib ??? (???) <4257ab268996bbeb93b47946df181cdc> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x7fff838d3000 - 0x7fff838d3ffd com.apple.Accelerate 1.4.2 (Accelerate 1.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x7fff838d4000 - 0x7fff838d4ff8 com.apple.Cocoa 6.5 (???) <8c59f679ffbd9178134df1d83dedde28> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa 0x7fff838d5000 - 0x7fff839cafff libxml2.2.dylib ??? (???) <8226d1180354f493954c5fa1fc0e1154> /usr/lib/libxml2.2.dylib 0x7fff839cb000 - 0x7fff839dafe7 com.apple.opengl 1.5.9 (1.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x7fff839db000 - 0x7fff83cc2feb com.apple.HIToolbox 1.5.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. framework/Versions/A/HIToolbox 0x7fff83cc3000 - 0x7fff83d03fef com.apple.framework.IOKit 1.5.1 (???) <17e6707127a60c5e2d7a9bd2b7bf2db0> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x7fff83d04000 - 0x7fff83dc8fe2 com.apple.vImage 3.0 (3.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage .framework/Versions/A/vImage 0x7fff83dc9000 - 0x7fff83df3fff libcups.2.dylib ??? (???) /usr/lib/libcups.2.dylib 0x7fff83df4000 - 0x7fff83df4ffa com.apple.CoreServices 32 (32) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x7fff83df5000 - 0x7fff83ed6fff libcrypto.0.9.7.dylib ??? (???) <66f1f8773bd9fdfdcfd09e2b4b010636> /usr/lib/libcrypto.0.9.7.dylib 0x7fff83ed7000 - 0x7fff83f87fef com.apple.CoreServices.OSServices 226.5 (226.5) <1c38f727b3ad3293272db7323b37c735> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSSe rvices.framework/Versions/A/OSServices 0x7fff83f88000 - 0x7fff83fa2fff com.apple.openscripting 1.2.8 (???) <0674c4e3353c677c9f58df3297ae559b> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScript ing.framework/Versions/A/OpenScripting 0x7fff83fa3000 - 0x7fff83fdfff7 libGLImage.dylib ??? (???) <02258bcdbe8defdb254acc077a81dd9b> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage. dylib 0x7fff83fe0000 - 0x7fff83ff1fff com.apple.speech.synthesis.framework 3.7.1 (3.7.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x7fff83ff2000 - 0x7fff8406cff3 com.apple.CoreText 2.0.3 (???) <827bbfef670df72316719c25bfb39915> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreText.framework/Versions/A/CoreText 0x7fff8406d000 - 0x7fff841f8ffb libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0x7fff841f9000 - 0x7fff8420affd libz.1.dylib ??? (???) /usr/lib/libz.1.dylib 0x7fff8420b000 - 0x7fff842befef com.apple.DesktopServices 1.4.7 (1.4.7) /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/D esktopServicesPriv 0x7fff842bf000 - 0x7fff84677fff libLAPACK.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libLAPACK.dylib 0x7fff84678000 - 0x7fff84743fef com.apple.ColorSync 4.5.1 (4.5.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ColorSync.framework/Versions/A/ColorSync 0x7fff84744000 - 0x7fff84847feb com.apple.CoreData 100.1 (186) <074abc7f43f81f7885e4d0674a8be4bc> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x7fffffe00000 - 0x7fffffe01780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0xfffffffffffec000 - 0xfffffffffffeffff libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib SYSTEM CONFIG Model: MacPro3,1, BootROM MP31.006C.B05, 8 processors, Quad-Core Intel Xeon, 2.8 GHz, 32 GB Graphics: kHW_ATIrv630Item, ATI Radeon HD 2600, spdisplays_pcie_device, 256 MB Memory Module: DIMM Riser B/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Bluetooth: Version 2.1.3f8, 2 service, 1 devices, 1 incoming serial ports Network Service: Ethernet 2, Ethernet, en1 PCI Card: ATI Radeon HD 2600, display, Slot-1 Serial ATA Device: WDC WD3200AAJS-41VWA0, 298.09 GB Parallel ATA Device: PIONEER DVD-RW DVR-112D USB Device: Keyboard Hub, (null) mA USB Device: Apple Optical USB Mouse, (null) mA USB Device: Apple Keyboard, (null) mA USB Device: hub_device, (null) mA USB Device: Apple Cinema HD Display, (null) mA USB Device: Keyspan USA-28Xb, (null) mA USB Device: Bluetooth USB Host Controller, (null) mA FireWire Device: built-in_hub, unknown_value, unknown_speed FireWire Device: My Book, WD, 800mbit_speed FireWire Device: unknown_device, unknown_value, unknown_speed -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From jaakko.sipari at gmail.com Thu Jan 22 03:00:03 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 22 Jan 2009 12:00:03 +0200 Subject: [Rxtx] RXTX compilation with GCJ possible? Message-ID: <901f25b80901220200s53792317o374b80cbb6066a52@mail.gmail.com> Hi! Does anyone have experience on using RXTX in a GCJ compiled Java application? I'm interested whether this is possible in Windows and/or in Linux platforms. And of course what does it take to get it work, or does it just work out of the box. Ultimately my aim here would be to move to a more time deterministic system by utilizing GCJ, jRate & Javolution and possibly run the RXTX (and other important) threads at a priority higher than the garbage collector. This of course would require some modification for the RXTX threads to run in a Javolution pool context or non allocating real time contexts so they wouldn't produce any garbage, but that's something to hack on later. For now I'd just like to know if there are any obstacles on the road to compiling & running RXTX with GCJ. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/5592681a/attachment-0006.html From jmudd at dtiweb.net Thu Jan 22 06:21:03 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Thu, 22 Jan 2009 08:21:03 -0500 Subject: [Rxtx] Hot unplugging of a USB device References: <4977BEEA.4020708@gatworks.com> Message-ID: U. George, Thanks for the information. How did you resolve your USB/GPS device on Linux? My application has to run on both Linux and Windows eventually. Thanks, Jerry -----Original Message----- From: U. George [mailto:netbeans at gatworks.com] Sent: Wednesday, January 21, 2009 7:34 PM To: Jerry Mudd Cc: rxtx at qbang.org Subject: Re: [Rxtx] Hot unplugging of a USB device > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From m.kirkland at comcast.net Thu Jan 22 09:21:01 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Thu, 22 Jan 2009 08:21:01 -0800 Subject: [Rxtx] Serial port control lines change with call to getPortIdentifiers() on Linux Message-ID: <94443DEFFD574B6CA8DDB2B201D9E007@bengal.net> Hi All ! I have noticed an issue with RXTX on Ubuntu Linux 8.10 that has prevented me from being able to use RXTX on Linux. I have noticed this issue on both the rxtx 2.1.7 and the new rxtx2.2pre1. When I execute the following line to get the ports on a system - java.util.Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); Both DTR and RTS become active on ttyS0 and only ttyS0, not ttyS1 (I only have 2 ports). I see this prior to opening any ports or making any other calls to RXTX. I have stepped it though with the debugger and I am sure this is the trigger. My application uses these control lines to perform functions other then the standard flow control so it is critical that I be able to control them exactly. I would also think that folks using RXTX for more standard serial IO would also have issues with devices starting to talk before a listener was ready. I checked Windows XP and I do not see this issue (but I only have a com1 on the Windows computer). I also noticed that the DTR line blips when setting up a port on 2.2.pre1 like it does on 2.1.7r2. This it the same issue that the folks at http://www.codeskin.com/ patched. I see this issue on both Linux and Windows XP. Any help or clues would be greatly appreciated. If I can provide any additional info or do any testing I would be glad to help out to get version 2.2 in top shape for release. BTW I have written a simple dynamic loader to load the RXTX jar and native code that is drive by the os.name and os.arch system properties. I would be more then happy to contribute this to the project if folks though it would be useful. Its more convenient then having to manage copying the files around to various JVM's. TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/eab26bae/attachment-0004.html From josefk_5 at yahoo.com Fri Jan 23 09:44:06 2009 From: josefk_5 at yahoo.com (Josef Kahsay) Date: Fri, 23 Jan 2009 08:44:06 -0800 (PST) Subject: [Rxtx] Help on Accessing RS232 Message-ID: <509617.88308.qm@web38205.mail.mud.yahoo.com> Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS From m.kirkland at comcast.net Sat Jan 24 01:28:52 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Sat, 24 Jan 2009 00:28:52 -0800 Subject: [Rxtx] Help on Accessing RS232 In-Reply-To: <509617.88308.qm@web38205.mail.mud.yahoo.com> References: <509617.88308.qm@web38205.mail.mud.yahoo.com> Message-ID: <665887C02E1446708CE392FE0BD73D79@bengal.net> It seems to me that you are having a classic java classpath issue. Java classpath issues can be annoying to solve sometimes. As some random guesses I would suggest you look at the following. 1 - You might not be running the JVM from the location that you think you are (gets me all the time). I which Windows had a which command. 2 - You don't mention what development environment you are using like Eclipse etc., and if you are trying to run the demo from inside the development environment. If so, do whatever is appropriate for the development environment to control the classpath. In Eclipse this would involve adding a "User Library" to point to the jar and native code. 3 - Once you get the classpath ok, the next thing you might run into is not being able to load the native library. 4 - I have found that on XP I can place the RXTX jar and native library in the same directory as my application's jar file (and a class-path entry in the application's jar file manifest) and it all works. 5 - If you need more control of managing different versions of RXTX for different OS platforms, I have a dynamic RXTX loader I can send you (but I recommend getting the simple case working first). Let me know if this helps. Mike -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Josef Kahsay Sent: Friday, January 23, 2009 8:44 AM To: rxtx at qbang.org Subject: [Rxtx] Help on Accessing RS232 Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jacomoman at hotmail.com Mon Jan 26 12:12:27 2009 From: jacomoman at hotmail.com (Joseph Schmoley) Date: Mon, 26 Jan 2009 11:12:27 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: Message-ID: Hi All, First, let me thank you all for your effort on this excellent project. I've been using the Win32 binaries in the 2.1-7r2 package without any problems on WinXP Pro (32-bit). I then tried the .jnilib of the same version on my Mac OSX 10.5 64-bit darwin and got the familiar UnsatisfiedLinkError problem. I read up on all the mailing list archive messages and found this one (http://mailman.qbang.org/pipermail/rxtx/2008-May/2436699.html) suggesting that perhaps rxtx-devel from CVS would have a fix. So I got latest rxtx-devel + commapi-0-0-1 as suggested by the CVS page at rxtx.org. I even set my CFLAGS and LDFLAGS to include "-arch x86_64 -arch ppc64", but as it turned out, the latest configure script didn't need it. In any case, I configured and built rxtx-devel with no errors (that I could see) and transferred the resulting i386-apple-darwin9.6.0/librxtxSerial.jnilib to where my java.library.path is pointing to and ran my test class. Whereas before I was getting UnsatisfiedLinkError, I now simply get this: Invalid memory access of location 22d927c8 rip=22356420 Invalid memory access of location 22d9292c rip=22357540 [error occurred during error reporting (null), id 0xa] ./run-class.sh: line 10: 15647 Segmentation fault java -Djava.library.path=./lib/native -Dapp.logging.file.path=./log/runtime.log -classpath .:${MYCP} ${CLASSNAME} "${CMD}" run-class.sh is simply a script I've got to run my test class and all that class does is invoke the RXTX API, first one being: CommPortIdentifier.getPortIdentifiers(). Has anyone had any luck with getting latest CVS sources to work on Mac OS X 10.5 64-bit? Any help/pointers would be greatly appreciated. Thank you in advance. -Jac I've attached my configure and make output as txt files. Here's all my build/machine environment info, as per the troubleshooting wiki page: Mac OS X 10.5.6 (9G55) ----------------------------------------------- /usr/bin/java -version java version "1.6.0_07" Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153) Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode) ----------------------------------------------- Darwin my-macbook.local 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 ----------------------------------------------- autoconf (GNU Autoconf) 2.61 Copyright (C) 2006 Free Software Foundation, Inc. This is free software. You may redistribute copies of it under the terms of the GNU General Public License . There is NO WARRANTY, to the extent permitted by law. Written by David J. MacKenzie and Akim Demaille. ----------------------------------------------- automake (GNU automake) 1.10 Written by Tom Tromey and Alexandre Duret-Lutz . Copyright 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ----------------------------------------------- $ libtool -V Apple Computer, Inc. version cctools-698.1 ----------------------------------------------- GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program built for powerpc-apple-darwin9.0 ----------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: my-configure.out.txt Type: application/octet-stream Size: 6934 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090126/89d9c7f6/attachment-0002.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: my-make.out.txt Type: application/octet-stream Size: 7737 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090126/89d9c7f6/attachment-0003.obj From kintel at sim.no Mon Jan 26 16:16:19 2009 From: kintel at sim.no (Marius Kintel) Date: Tue, 27 Jan 2009 00:16:19 +0100 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: Message-ID: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Hi Jac, I've had the same issue, and I suggested a patch to partially fix it a while back: http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html I don't know the status of this in the current incarnation of the rxtx code and I have reverted to Java-1.5 since then.. ~/= Marius -- We are Elektropeople for a better living. From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0024.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0024.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0022.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0022.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0022.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0022.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0021.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0019.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0019.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0019.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0019.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0019.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0016.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0016.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0016.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment-0015.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0015.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment-0015.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment-0015.html From tjarvi at qbang.org Wed Jan 14 18:56:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 14 Jan 2009 18:56:50 -0700 (MST) Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Message-ID: On Wed, 14 Jan 2009, Jaakko Sipari wrote: > Hi (again)! > > Could someone clarify what these methods actually do and are they even > implemented? Do I get into trouble with buffer values of 0 (if I want to > handle the buffers myself)? > rxtx does not have buffers. It was not clear to me at the time why there would be a buffer when java already provides buffered input and output streams that can sit on top of rxtx. One reason I can see for implementing buffers in rxtx is to get data off the port so select() can block. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Wed Jan 14 23:23:08 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 15 Jan 2009 08:23:08 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> Message-ID: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Here's the same message for the list also. Forgot to do "Reply to all" ---------- Forwarded message ---------- From: Jaakko Sipari Date: Thu, Jan 15, 2009 at 8:22 AM Subject: Re: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize To: Trent Jarvi On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! >> >> Could someone clarify what these methods actually do and are they even >> implemented? Do I get into trouble with buffer values of 0 (if I want to >> handle the buffers myself)? >> >> > rxtx does not have buffers. It was not clear to me at the time why there > would be a buffer when java already provides buffered input and output > streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data off > the port so select() can block. > So basically those methods have currently no effect at all? - Jaakko -- Jaakko Sipari tel. +358451238191 eMail. jaakko.sipari at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090115/8b4c47c0/attachment-0014.html From tjarvi at qbang.org Thu Jan 15 18:37:12 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 15 Jan 2009 18:37:12 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: On Thu, 15 Jan 2009, Jaakko Sipari wrote: > Here's the same message for the list also. Forgot to do "Reply to all" > > ---------- Forwarded message ---------- > From: Jaakko Sipari > Date: Thu, Jan 15, 2009 at 8:22 AM > Subject: Re: [Rxtx] The functionality behind setInputBufferSize & > setOutputBufferSize > To: Trent Jarvi > > > On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! > > Could someone clarify what these methods actually do > and are they even > implemented? Do I get into trouble with buffer > values of 0 (if I want to > handle the buffers myself)? > > > rxtx does not have buffers. ?It was not clear to me at the time why > there would be a buffer when java already provides buffered input and > output streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data > off the port so select() can block. > > > So basically those methods have currently no effect at all? > Correct. You can use BufferedInputStream and BufferedOutputStream from the Java API once you get the Input/OutputStream from rxtx. But changing the input and output buffer size in rxtx is not going to change behavior. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Fri Jan 16 01:22:37 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Fri, 16 Jan 2009 10:22:37 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> > So basically those methods have currently no effect at all? >> >> > Correct. You can use BufferedInputStream and BufferedOutputStream from the > Java API once you get the Input/OutputStream from rxtx. But changing the > input and output buffer size in rxtx is not going to change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > I assume there still is some kind of buffer in rxtx (or the serial port driver) in case of processing delays. I mean, if the serial port gives data faster than can be read from the Java program using rxtx it isn't just thrown away, right? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090116/3bd9a52e/attachment-0013.html From tjarvi at qbang.org Fri Jan 16 05:17:24 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 16 Jan 2009 05:17:24 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> Message-ID: On Fri, 16 Jan 2009, Jaakko Sipari wrote: > > So basically those methods have currently no effect > at all? > > > Correct. ?You can use BufferedInputStream and BufferedOutputStream > from the Java API once you get the Input/OutputStream from rxtx. ?But > changing the input and output buffer size in rxtx is not going to > change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > > > > I assume there still is some kind of buffer in rxtx (or the serial port > driver) in case of processing delays. I mean, if the serial port gives data > faster than can be read from the Java program using rxtx it isn't just > thrown away, right? > The UART can usually hold a few bytes. The kernel driver can buffer the input. In practice, it works. With Sun commapi, the typical application has 4 buffers between the user and the incomming data. With rxtx, it is 3. BufferedInputStream -> commapi/rxtx -> kernel driver -> UART If you really do run into overflows on the UART, then hardware flow control is what you should be using and tinkering with rxtx to avoid it is not a very sound approach. -- Trent Jarvi tjarvi at qbang.org From llowrey at nuclearwinter.com Sun Jan 18 12:49:39 2009 From: llowrey at nuclearwinter.com (Larkin Lowrey) Date: Sun, 18 Jan 2009 13:49:39 -0600 Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain Message-ID: <497387D3.9040201@nuclearwinter.com> After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when running code that uses RXTXComm. The crashes only occur when using 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. As far as I can tell, the crash happens immediately on start. I can't see any evidence of much, if anything, happening before the crash. The code used to work and only stopped working after the "upgrade" to FC10. I have tried RXTX v2.1 and 2.2pre1. Any ideas? Here's the error: # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode linux-amd64) # Problematic frame: # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 --Larkin From tjarvi at qbang.org Mon Jan 19 17:48:34 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 19 Jan 2009 17:48:34 -0700 (MST) Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain In-Reply-To: <497387D3.9040201@nuclearwinter.com> References: <497387D3.9040201@nuclearwinter.com> Message-ID: On Sun, 18 Jan 2009, Larkin Lowrey wrote: > After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when > running code that uses RXTXComm. The crashes only occur when using > 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. > > As far as I can tell, the crash happens immediately on start. I can't > see any evidence of much, if anything, happening before the crash. > > The code used to work and only stopped working after the "upgrade" to > FC10. I have tried RXTX v2.1 and 2.2pre1. > > Any ideas? > > Here's the error: > > # > # An unexpected error has been detected by Java Runtime Environment: > # > # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 > # > # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode > linux-amd64) > # Problematic frame: > # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 > > > --Larkin Hi Larkin, I can think of 2 segv's in rxtx that may apply. Both are fixed in rxtx 2.2pre.. The first was that pointers required by nativeDrain needed to be stored in something larger than a 32 bit integer in java. This resulted in a crash like you see the first time the 'nativedrain' thread tried to use the pointer. The second was a concurrency issue George resolved with synchronization. The crash was usually during close but happened in the 'nativedrain' thread. (eventLoop) As mentioned, these are both fixed in the prerelease. There is a class provided in recent versions of RXTX that allow you confirm the version being used: gnu.io.RXTXVersion with member methods getVersion() and nativeGetVersion(). This allows you to confirm that you are indeed using the version you think you are. -- Trent Jarvi tjarvi at qbang.org From alexandrepoletto at gmail.com Wed Jan 21 11:48:07 2009 From: alexandrepoletto at gmail.com (Alexandre Poletto) Date: Wed, 21 Jan 2009 16:48:07 -0200 Subject: [Rxtx] work in windows but dont work in linux Message-ID: hi folks, I have an application to communicate with the serial port using rxtx, in the windows os my application works well, but when i try to run in the linux os i open the port (in windows "COM1", in Linux "/dev/ttyS0") send my commandes but i never receive any answer. I'm using ubuntu 8.10 and java 1.5, there is any configuration in that i'm missing? Thanks for the help! ps: Sorry form my bad english :( -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/70baea51/attachment-0007.html From jmudd at dtiweb.net Wed Jan 21 14:08:04 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Wed, 21 Jan 2009 16:08:04 -0500 Subject: [Rxtx] Hot unplugging of a USB device Message-ID: Looking to see if the issues surrounding an uplugging of a USB device have been resolved. I see from the mail list archives and bug reports that others have noted this issue. I have a USB GPS Receiver that is plugged into a Windows (XP) system and am using Netbeans 6.5 and Java jdk 1.6 and RXTX 2.1.7 and 2.2pre1. In the thread that is reading data via listening for a SerialEvent I can capture a Java IOException: No error in readArray. The application is essentially hung at this point. Only a termination of the application will clear it up and not leave the port hung. I had read in the archives that this is because the event loop in the native code portion is continually putting out the exceptions. I had also seen that this might be addressed in future releases. Any help is appreciated. Thanks, Jerry ________________________________ Jerry Mudd Senior Programmer 21795 Shangri-La Drive, Ste C Lexington Park, MD 20653 (301) 737-8893 (301) 737-8897 Fax jmudd at dtiweb.net www.dtiweb.net This message may contain sensitive, proprietary and/or privileged information. Disclosure is not authorized unless provided in writing by Defense Technologies, Inc. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0007.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 6296 bytes Desc: image001.gif Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0007.gif From netbeans at gatworks.com Wed Jan 21 17:33:46 2009 From: netbeans at gatworks.com (U. George) Date: Wed, 21 Jan 2009 19:33:46 -0500 Subject: [Rxtx] Hot unplugging of a USB device In-Reply-To: References: Message-ID: <4977BEEA.4020708@gatworks.com> > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:34 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:34 +1100 Subject: [Rxtx] Part 1 of 2 parts re rxtx 2.2 pre.. and OSX Message-ID: Hi, I have tried out the latest version of rxtx on a mac and can report that running with ImageJ (32 bit ) all seems to be fine. However when I attempt to use it with ImageJ64, I get a crash whenever the serial port is used. The details follow. What I did. Ran our plug-in in ImageJ 64 bit (1.42g) for Measuring, which is using the latest rxtx (the beta 2.2 compiled on 30 December 2008) for MacOSX 10.5.x) I installed this by putting the two files in the directory ~ LIBRARY/JAVA/EXTENSIONS. The Plug-in uses the serial port. The window we put up to show the numbers from the stage appeared, but only with the default "0" (zero) in each row, which is what we put there until we get data back from the port and the device attached. Then it crashed. I should point out that this all works fine using ImageJ (32 bit) 1.42g, on the same platform. So the only difference is the use of ImageJ 64 bit, and I guess the version of rxtx for 64 bit. I hope that cleverer people than me can throw some light onto this little problem. ImageJ64 seems to work ok until rxtx is called, although I haven't tried much so far, just some 3D rendering with 1 Gb of image data, which all went well, apart from the fact that the data was marginal. I am now showing the data supplied by the report to Apple window. This has three tabs, one to write your information in, one called Problem Details, and the third called SYSTEM CONFIG. These are pasted in below. Best wishes Noel Problem Details Process: JavaApplicationStub [463] Path: /Applications/ImageJ/ImageJ64.app/Contents/MacOS/JavaApplicationStub Identifier: gov.nih.info.rsb.ImageJ Version: ??? (10.2) Code Type: X86-64 (Native) Parent Process: launchd [398] Date/Time: 2009-01-19 10:48:09.342 +1100 OS Version: Mac OS X 10.5.6 (9G55) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000000029507c8 Crashed Thread: 16 Application Specific Information: Java information: Exception type: Bus Error (0xa) at pc=0x00000006ff70f418 Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0_07-b06-57 mixed mode macosx-amd64) Current thread (0x00000001020de800): JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] Stack: [0x0000000702851000,0x0000000702951000] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j gnu.io.RXTXPort.readByte()I+0 j gnu.io.RXTXPort$SerialInputStream.read()I+81 j SerialConnection.serialEvent(Lgnu/io/SerialPortEvent;)V+41 j gnu.io.RXTXPort.sendEvent(IZ)Z+382 v ~BufferBlob::StubRoutines (1) j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~BufferBlob::StubRoutines (1) Java Threads: ( => current thread ) =>0x00000001020de800 JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] 0x00000001020e8800 JavaThread "Measure XYZ" [_thread_blocked, id=44384256, stack(0x0000000702954000,0x0000000702a54000)] 0x0000000102001000 JavaThread "DestroyJavaVM" [_thread_blocked, id=25169920, stack(0x0000000101001000,0x0000000101801000)] 0x00000001020da800 JavaThread "SocketListener" [_thread_in_native, id=29671424, stack(0x0000000701b4c000,0x0000000701c4c000)] 0x00000001020b4800 JavaThread "AWT-EventQueue-0" [_thread_in_Java, id=-27992064, stack(0x00000006fe44e000,0x00000006fe54e000)] 0x0000000102096000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=-34344960, stack(0x00000006fde3f000,0x00000006fdf3f000)] 0x0000000102078000 JavaThread "AWT-Shutdown" [_thread_blocked, id=-58392576, stack(0x00000006fc750000,0x00000006fc850000)] 0x0000000102077800 JavaThread "AWT-AppKit" daemon [_thread_in_native, id=1886770976, stack(0x00007fff5f400000,0x00007fff5fc00000)] 0x0000000102044800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=-333877248, stack(0x00000006ec097000,0x00000006ec197000)] 0x0000000102043000 JavaThread "CompilerThread1" daemon [_thread_blocked, id=-334938112, stack(0x00000006ebf94000,0x00000006ec094000)] 0x0000000102041800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=-335998976, stack(0x00000006ebe91000,0x00000006ebf91000)] 0x0000000102041000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=-337059840, stack(0x00000006ebd8e000,0x00000006ebe8e000)] 0x0000000102029800 JavaThread "Finalizer" daemon [_thread_blocked, id=-338214912, stack(0x00000006ebc74000,0x00000006ebd74000)] 0x0000000102028800 JavaThread "Reference Handler" daemon [_thread_blocked, id=-339333120, stack(0x00000006ebb63000,0x00000006ebc63000)] Other Threads: 0x0000000102020800 VMThread [stack: 0x00000006eba60000,0x00000006ebb60000] [id=-340393984] 0x0000000102046000 WatcherThread [stack: 0x00000006ec19a000,0x00000006ec29a000] [id=-332816384] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 76480K, used 14448K [0x0000000105800000, 0x000000010ad50000, 0x00000002f9800000) eden space 65600K, 22% used [0x0000000105800000, 0x000000010661c398, 0x0000000109810000) from space 10880K, 0% used [0x0000000109810000, 0x0000000109810000, 0x000000010a2b0000) to space 10880K, 0% used [0x000000010a2b0000, 0x000000010a2b0000, 0x000000010ad50000) tenured generation total 174784K, used 0K [0x00000002f9800000, 0x00000003042b0000, 0x00000006e1800000) the space 174784K, 0% used [0x00000002f9800000, 0x00000002f9800000, 0x00000002f9800200, 0x00000003042b0000) compacting perm gen total 21248K, used 10319K [0x00000006e1800000, 0x00000006e2cc0000, 0x00000006e6c00000) the space 21248K, 48% used [0x00000006e1800000, 0x00000006e2213d28, 0x00000006e2213e00, 0x00000006e2cc0000) No shared spaces configured. Virtual Machine Arguments: JVM Args: -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher. framework/Resources/LauncherSupport.jar -Xms256m -Xmx24000m -Dcom.apple.macos.useScreenMenuBar=false -Dcom.apple.mrj.application.growbox.intrudes=false -Dcom.apple.mrj.application.live-resize=true -Dcom.apple.hwaccel=false -Dapple.awt.Antialiasing=false -Dcom.apple.smallTabs=true -Dapple.awt.brushMetalLook=false Java Command: Launcher Type: generic Physical Memory: Page Size = 4k, Total = 2048M, Free = 30996M Thread 0: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 com.apple.CoreFoundation 0x00007fff8204dc4f CFRunLoopRunSpecific + 1631 3 com.apple.HIToolbox 0x00007fff839fdda2 RunCurrentEventLoopInMode + 278 4 com.apple.HIToolbox 0x00007fff839fdbd8 ReceiveNextEventCommon + 322 5 com.apple.HIToolbox 0x00007fff839fda83 BlockUntilNextEventMatchingListInMode + 79 6 com.apple.AppKit 0x00007fff8299d3b0 _DPSNextEvent + 603 7 com.apple.AppKit 0x00007fff8299ccf1 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 136 8 com.apple.AppKit 0x00007fff82996a84 -[NSApplication run] + 455 9 libawt.jnilib 0x00000006ec433257 +[AWTStarter startAWT:] + 1343 10 libawt.jnilib 0x00000006ec432c46 -[CPerformer perform] + 112 11 com.apple.Foundation 0x00007fff8153f2b4 __NSThreadPerformPerform + 148 12 com.apple.CoreFoundation 0x00007fff8204e0e8 CFRunLoopRunSpecific + 2808 13 ...ple.JavaApplicationLauncher 0x0000000100005165 startupJava(LauncherArgsStruct*) + 235 14 ...ple.JavaApplicationLauncher 0x000000010000579c launchJavaApplication + 1224 15 JavaApplicationStub 0x0000000100000b9c 0x100000000 + 2972 Thread 1: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x0000000101a93b61 JVM_GetCPFieldModifiers + 128961 5 libjvm.dylib 0x0000000101a93a36 JVM_GetCPFieldModifiers + 128662 6 ...ple.JavaApplicationLauncher 0x000000010000c0ce startJavaApplication + 2886 7 ...ple.JavaApplicationLauncher 0x000000010000506d java_main_stub(void*) + 9 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 2: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libSystem.B.dylib 0x00007fff840db0b0 mach_msg_server + 436 3 libjvm.dylib 0x000000010181176d JNI_CreateJavaVM_Impl + 53277 4 libjvm.dylib 0x0000000101811375 JNI_CreateJavaVM_Impl + 52261 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 3: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x00000001018e452f JVM_Lseek + 235727 5 libjvm.dylib 0x00000001018e42df JVM_Lseek + 235135 6 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 7 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 8 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 4: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x00000001028003ea 0 + 4336911338 11 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 12 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 13 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 14 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 15 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 16 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 17 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 18 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 19 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 20 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 5: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 6: 0 libSystem.B.dylib 0x00007fff8406dd72 semaphore_wait_trap + 10 1 libjvm.dylib 0x0000000101915bdb JVM_IsPrimitiveClass + 12139 2 libjvm.dylib 0x00000001019155b5 JVM_IsPrimitiveClass + 10565 3 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 4 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 7: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 8: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 9: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x0000000101918ec8 JVM_IsPrimitiveClass + 25176 5 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 6 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 7 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 10: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x000000010191abb5 JVM_IsPrimitiveClass + 32581 4 libjvm.dylib 0x000000010191a70a JVM_IsPrimitiveClass + 31386 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 11: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 12: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x0000000102803414 0 + 4336923668 12 ??? 0x00000001028003ea 0 + 4336911338 13 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 14 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 15 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 16 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 17 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 18 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 19 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 20 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 21 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 22 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 13: 0 ??? 0x0000000102817034 0 + 4337004596 1 ??? 0x000000010280304e 0 + 4336922702 2 ??? 0x0000000102803093 0 + 4336922771 3 ??? 0x000000010280356d 0 + 4336924013 4 ??? 0x0000000102803093 0 + 4336922771 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x000000010280356d 0 + 4336924013 8 ??? 0x0000000102803093 0 + 4336922771 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x0000000102802f3a 0 + 4336922426 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102802f3a 0 + 4336922426 14 ??? 0x0000000102802f3a 0 + 4336922426 15 ??? 0x0000000102803162 0 + 4336922978 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102802f3a 0 + 4336922426 19 ??? 0x0000000102802f3a 0 + 4336922426 20 ??? 0x00000001028003ea 0 + 4336911338 21 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 22 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 23 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 24 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 25 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 26 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 27 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 28 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 29 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 30 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 14: 0 libSystem.B.dylib 0x00007fff840f210e accept + 10 1 libnet.jnilib 0x00000006ff6b6b11 Java_java_net_PlainSocketImpl_socketAccept + 277 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x0000000102802f3a 0 + 4336922426 4 ??? 0x0000000102802f3a 0 + 4336922426 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x0000000102803414 0 + 4336923668 8 ??? 0x00000001028003ea 0 + 4336911338 9 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 10 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 11 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 12 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 13 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 14 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 15 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 16 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 17 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 18 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 15: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x000000010280304e 0 + 4336922702 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102803414 0 + 4336923668 14 ??? 0x0000000102803093 0 + 4336922771 15 ??? 0x0000000102803093 0 + 4336922771 16 ??? 0x0000000102803093 0 + 4336922771 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102803414 0 + 4336923668 19 ??? 0x00000001028003ea 0 + 4336911338 20 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 21 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 22 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 23 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 24 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 25 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 26 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 27 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 28 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 29 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 Crashed: 0 librxtxSerial.jnilib 0x00000006ff70f418 read_byte_array + 68 1 librxtxSerial.jnilib 0x00000006ff70f9b3 Java_gnu_io_RXTXPort_readByte + 93 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x000000010280304e 0 + 4336922702 4 ??? 0x000000010280304e 0 + 4336922702 5 ??? 0x0000000102803414 0 + 4336923668 6 ??? 0x00000001028003ea 0 + 4336911338 7 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 8 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 9 libjvm.dylib 0x00000001018e5be8 JVM_Lseek + 241544 10 libjvm.dylib 0x0000000101900b11 JVM_MonitorWait + 17249 11 libjvm.dylib 0x0000000101a1e59e JVM_DisableCompiler + 1166 12 librxtxSerial.jnilib 0x00000006ff70d91e send_event + 132 13 librxtxSerial.jnilib 0x00000006ff70e82b report_serial_events + 92 14 librxtxSerial.jnilib 0x00000006ff7108c9 Java_gnu_io_RXTXPort_eventLoop + 237 15 ??? 0x000000010280e878 0 + 4336969848 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x00000001028003ea 0 + 4336911338 18 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 19 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 20 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 21 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 22 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 23 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 24 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 25 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 26 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 27 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 17: 0 libSystem.B.dylib 0x00007fff84074d02 __semwait_signal + 10 1 libSystem.B.dylib 0x00007fff840dce91 usleep + 57 2 librxtxSerial.jnilib 0x00000006ff70d729 drain_loop + 45 3 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 4 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 crashed with X86 Thread State (64-bit): rax: 0x00000000029507c0 rbx: 0x0000000000000041 rcx: 0x0000000000000065 rdx: 0x0000000000000002 rdi: 0x00000006ff71205e rsi: 0x00000006ff711c67 rbp: 0x0000000702950000 rsp: 0x000000070294fef0 r8: 0x000000000000004d r9: 0x00000006e21d64c0 r10: 0x00000006e21d38e8 r11: 0x00000000000000d2 r12: 0x00000001020de998 r13: 0x00000006e21d93b0 r14: 0x0000000000000032 r15: 0x00000000029507c0 rip: 0x00000006ff70f418 rfl: 0x0000000000010202 cr2: 0x00000000029507c8 Continued in the message part 2 -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:41 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:41 +1100 Subject: [Rxtx] Part 2 re rxtx 2.2 pre... and MacOSX Message-ID: Continued from Part 1. Binary Images: 0x100000000 - 0x100000fff JavaApplicationStub ??? (???) /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationS tub 0x100004000 - 0x100011fff com.apple.JavaApplicationLauncher 12.2.0 (12.2.0) /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/JavaApplicationLauncher 0x10001a000 - 0x100022ffd com.apple.JavaVM 12.2.0 (12.2.0) <2b178e8d4bbcc0aa427c2f3f71bb2fcb> /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM 0x100055000 - 0x10005dff0 libverify.dylib ??? (???) <56eac95084cb86cd1339a721b1353182> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libveri fy.dylib 0x100063000 - 0x10006cffb JavaNativeFoundation ??? (???) <68ca6409dc49542301edda1e0744ac69> /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNative Foundation.framework/Versions/A/JavaNativeFoundation 0x1000a8000 - 0x1000c7fef libjava.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjava .jnilib 0x1000d8000 - 0x1000e5ffb libzip.jnilib ??? (???) <5b6dce7c9a1f25aa5dff1a633c9dc342> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libzip. jnilib 0x101803000 - 0x101eafff3 libjvm.dylib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bundle/Libra ries/libjvm.dylib 0x6ec2c5000 - 0x6ec2c6fff liblauncher.jnilib ??? (???) <567fa54a222b965b2c4aefea21d9800a> /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/Resources/liblauncher.jnilib 0x6ec431000 - 0x6ec5e4fff libawt.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libawt. jnilib 0x6fdc3b000 - 0x6fdc3cfff ATSHI.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/Resources/ATSHI.dylib 0x6fdd6e000 - 0x6fdd6efff libcmm.jnilib ??? (???) <114e1a620a6920d77bf09bd57a7f7d52> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libcmm. jnilib 0x6fdd9e000 - 0x6fde1fff7 libfontmanager.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libfont manager.jnilib 0x6fdf41000 - 0x6fdf8ffff libsuncmm.jnilib ??? (???) <47330f1f17822de3a5cf921e07615cf7> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libsunc mm.jnilib 0x6fdf95000 - 0x6fdfc4ff7 libjpeg.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjpeg .jnilib 0x6ff6ae000 - 0x6ff6baffb libnet.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnet. jnilib 0x6ff6c0000 - 0x6ff6c4fff libnio.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnio. jnilib 0x6ff6d4000 - 0x6ff6e8ff7 libdcpr.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libdcpr .jnilib 0x6ff70c000 - 0x6ff713fff +librxtxSerial.jnilib ??? (???) <5133deacebd01ceab7d528c541241956> /Library/Java/Extensions/librxtxSerial.jnilib 0x6ff734000 - 0x6ff74bfef libJapaneseConverter.dylib ??? (???) <64cca6bb4650a269f49a8427507e4963> /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib 0x70204f000 - 0x702218fef com.apple.RawCamera.bundle 2.0.10 (2.0.10) /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera 0x7fff5fc00000 - 0x7fff5fc2e643 dyld 97.1 (???) /usr/lib/dyld 0x7fff80003000 - 0x7fff80146ffb com.apple.audio.toolbox.AudioToolbox 1.5.2 (1.5.2) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x7fff801d2000 - 0x7fff801d5ffb com.apple.help 1.1 (36) <9000c05ccad96fdcc25bc35264abf587> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.frame work/Versions/A/Help 0x7fff801d6000 - 0x7fff80211fff com.apple.AE 402.2 (402.2) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.f ramework/Versions/A/AE 0x7fff80212000 - 0x7fff80257fef libRIP.A.dylib ??? (???) <8c818d7fd3dc57839ac48caf107ff4c0> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x7fff80258000 - 0x7fff8029bfef com.apple.QD 3.11.54 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/QD.framework/Versions/A/QD 0x7fff8029c000 - 0x7fff802dffef libTIFF.dylib ??? (???) <86be7909f46cc044a887cbb60ab7826d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x7fff802e0000 - 0x7fff803d4fff libobjc.A.dylib ??? (???) <118dc1ae05e685ad64290352fc94f1f0> /usr/lib/libobjc.A.dylib 0x7fff803d5000 - 0x7fff8045dfe7 libsqlite3.0.dylib ??? (???) <3c7ab3523b816dbd3e039ee7e6e2c580> /usr/lib/libsqlite3.0.dylib 0x7fff8045e000 - 0x7fff80466ffa libbsm.dylib ??? (???) <4d838c0d8a74fe61c781a53a8723303d> /usr/lib/libbsm.dylib 0x7fff80467000 - 0x7fff80497fff com.apple.shortcut 1 (1.0) <9822328df9321a661af3afcc841e8f80> /System/Library/PrivateFrameworks/Shortcut.framework/Versions/A/Shortcut 0x7fff80498000 - 0x7fff8049bfff com.apple.securityhi 3.0 (30817) <00ddd6e60692b62b7649573eab8aef5a> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI .framework/Versions/A/SecurityHI 0x7fff8049c000 - 0x7fff8049efff com.apple.print.framework.Print 218.0.2 (220.1) <2b847a0a1cd885f596a4d10409d50ba3> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.fram ework/Versions/A/Print 0x7fff8049f000 - 0x7fff805dbfe9 com.apple.ImageIO.framework 2.0.4 (2.0.4) <47dcdc0b5986b2c157e0b6dae48ce464> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/ImageIO 0x7fff805dc000 - 0x7fff805f9fef com.apple.CoreVideo 1.5.1 (1.5.1) <78253b3fe8d3dcc90f159d7ed866c295> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x7fff805fa000 - 0x7fff8068bfff com.apple.SearchKit 1.2.1 (1.2.1) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Sear chKit.framework/Versions/A/SearchKit 0x7fff8068c000 - 0x7fff80e49fef libBLAS.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libBLAS.dylib 0x7fff80e4a000 - 0x7fff81416fff com.apple.CoreGraphics 1.407.2 (???) <436dbc70f8c9b29b3beb1d2de220acf2> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/CoreGraphics 0x7fff81417000 - 0x7fff8141dfff com.apple.DiskArbitration 2.2.1 (2.2.1) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitrat ion 0x7fff8141e000 - 0x7fff8145bff7 com.apple.SystemConfiguration 1.9.2 (1.9.2) <150119d0cecb0c80f6736b9881c2411e> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemCo nfiguration 0x7fff8145c000 - 0x7fff81523fec com.apple.CFNetwork 422.11 (422.11) <570ca46de3b907cb1c8e33fc62f562b4> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNe twork.framework/Versions/A/CFNetwork 0x7fff81524000 - 0x7fff8152dfff libCGATS.A.dylib ??? (???) <722a0bbd58740d46739008e881010631> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib 0x7fff8152e000 - 0x7fff81533fff com.apple.CommonPanels 1.2.4 (85) <2cec1ecc95cf1ecea8bea030975a46b8> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPane ls.framework/Versions/A/CommonPanels 0x7fff81534000 - 0x7fff817cffe3 com.apple.Foundation 6.5.7 (677.22) <8134977fcc57198a53dc494b60592980> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x7fff817d0000 - 0x7fff817d0ffd com.apple.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x7fff817d1000 - 0x7fff81cf1fc6 libGLProgrammability.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgra mmability.dylib 0x7fff81cf2000 - 0x7fff81cf4fff com.apple.NavigationServices 3.5.2 (163) <7cb7f3fe7f9d56ec89ef28a6d3a1da7d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Navigation Services.framework/Versions/A/NavigationServices 0x7fff81cf5000 - 0x7fff81d32fe7 com.apple.coreui 1.2 (62) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x7fff81d33000 - 0x7fff81d33fff com.apple.Carbon 136 (136) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x7fff81d34000 - 0x7fff81d42fff libCSync.A.dylib ??? (???) <61f6cc104b3e9b77cd583635a3a9a5cf> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x7fff81d43000 - 0x7fff81d45ff9 libRadiance.dylib ??? (???) <6d9f2235e8f70a7aedfc59383a7548d8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x7fff81d46000 - 0x7fff81db5ff9 com.apple.print.framework.PrintCore 5.5.3 (245.3) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/PrintCore.framework/Versions/A/PrintCore 0x7fff81db6000 - 0x7fff81db6ff8 com.apple.ApplicationServices 34 (34) <81cd02cc2ccf4e47e51d03db860da556> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Applicat ionServices 0x7fff81db7000 - 0x7fff81dd8fff libresolv.9.dylib ??? (???) <38318f9fbcfbdb384e0f9b08cc0e757a> /usr/lib/libresolv.9.dylib 0x7fff81dd9000 - 0x7fff81e4ffef libvMisc.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvMisc.dylib 0x7fff81e50000 - 0x7fff81e52ff7 libffi.dylib ??? (???) <920bb19728451f35703bb95dc908c7ca> /usr/lib/libffi.dylib 0x7fff81e53000 - 0x7fff81eeefe7 com.apple.ink.framework 101.3 (86) <60c6579faf114ea9677fd9ae25389ed2> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framew ork/Versions/A/Ink 0x7fff81eef000 - 0x7fff81f0dfff libPng.dylib ??? (???) <4017eab74319a648dfd73b7d503e557d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x7fff81f0e000 - 0x7fff81f24ff9 com.apple.ImageCapture 5.0.1 (5.0.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCaptu re.framework/Versions/A/ImageCapture 0x7fff81f25000 - 0x7fff81f3dfff com.apple.DictionaryServices 1.0.0 (1.0.0) <78ea11e9a92120f76d69efa24b8d1f95> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Dict ionaryServices.framework/Versions/A/DictionaryServices 0x7fff81f3e000 - 0x7fff81f42fff libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib 0x7fff81f43000 - 0x7fff81fe3fe3 com.apple.ApplicationServices.ATS 3.4 (???) <47cf09bf78935889f17f1b6b09badf0d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/ATS 0x7fff81fe4000 - 0x7fff8211bfff com.apple.CoreFoundation 6.5.5 (476.17) <51930d43c7c2d8fb24148cbfc05bba0f> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundatio n 0x7fff8211c000 - 0x7fff82126fff com.apple.speech.recognition.framework 3.7.24 (3.7.24) <2399374b096b284345daba82e2cb833d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechReco gnition.framework/Versions/A/SpeechRecognition 0x7fff82127000 - 0x7fff82159ff7 libauto.dylib ??? (???) /usr/lib/libauto.dylib 0x7fff8215a000 - 0x7fff821cefe7 libstdc++.6.dylib ??? (???) <565ee6f798f7fef6f804c60682787280> /usr/lib/libstdc++.6.dylib 0x7fff821cf000 - 0x7fff8228dfff edu.mit.Kerberos 6.0.12 (6.0.12) /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x7fff8228e000 - 0x7fff8228effb com.apple.installserver.framework 1.0 (8) /System/Library/PrivateFrameworks/InstallServer.framework/Versions/A/Install Server 0x7fff8228f000 - 0x7fff82293fff libGIF.dylib ??? (???) <66436b84211fe0e723051eab15af0aca> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x7fff82294000 - 0x7fff8258ffe3 com.apple.CoreServices.CarbonCore 786.10 (786.10) <2ac701edf3ca98a86ae9d5f733200b40> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Carb onCore.framework/Versions/A/CarbonCore 0x7fff82590000 - 0x7fff825aafff libvDSP.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvDSP.dylib 0x7fff825ab000 - 0x7fff827b1ff3 com.apple.security 5.0.4 (34102) <47c559b17c1f51998e7a981d0fbec4c8> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x7fff827b2000 - 0x7fff827d9fff libxslt.1.dylib ??? (???) /usr/lib/libxslt.1.dylib 0x7fff827da000 - 0x7fff82948fff libicucore.A.dylib ??? (???) <374ddaf141bf88dba00ab9058f2dbad6> /usr/lib/libicucore.A.dylib 0x7fff82949000 - 0x7fff8295dff7 libGL.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x7fff8295e000 - 0x7fff83286fff com.apple.AppKit 6.5.6 (949.43) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x7fff83287000 - 0x7fff83667fef com.apple.QuartzCore 1.5.7 (1.5.7) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x7fff83668000 - 0x7fff836b8fe7 com.apple.Metadata 10.5.2 (398.25) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Meta data.framework/Versions/A/Metadata 0x7fff836b9000 - 0x7fff836baff3 com.apple.audio.units.AudioUnit 1.5 (1.5) /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x7fff836bb000 - 0x7fff83710fe3 com.apple.HIServices 1.7.0 (???) <6bef766448d67adb91901b432629ea0f> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/HIServices.framework/Versions/A/HIServices 0x7fff83711000 - 0x7fff83711ffd com.apple.Accelerate.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/vecLib 0x7fff83712000 - 0x7fff837a7ffb com.apple.LaunchServices 290.3 (290.3) <56544e16c5192d2ce72df772901fcaef> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Laun chServices.framework/Versions/A/LaunchServices 0x7fff837a8000 - 0x7fff8382ffef com.apple.audio.CoreAudio 3.1.1 (3.1.1) <9c1714647fd7515c900362ad2ac76874> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x7fff83830000 - 0x7fff83893fef libGLU.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dyli b 0x7fff83894000 - 0x7fff838a2ff9 com.apple.helpdata 1.0.1 (14.2) /System/Library/PrivateFrameworks/HelpData.framework/Versions/A/HelpData 0x7fff838a3000 - 0x7fff838afff1 libgcc_s.1.dylib ??? (???) <23fa31a628c1ea8a62ac529fa333b6e1> /usr/lib/libgcc_s.1.dylib 0x7fff838b0000 - 0x7fff838d2fff libJPEG.dylib ??? (???) <4257ab268996bbeb93b47946df181cdc> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x7fff838d3000 - 0x7fff838d3ffd com.apple.Accelerate 1.4.2 (Accelerate 1.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x7fff838d4000 - 0x7fff838d4ff8 com.apple.Cocoa 6.5 (???) <8c59f679ffbd9178134df1d83dedde28> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa 0x7fff838d5000 - 0x7fff839cafff libxml2.2.dylib ??? (???) <8226d1180354f493954c5fa1fc0e1154> /usr/lib/libxml2.2.dylib 0x7fff839cb000 - 0x7fff839dafe7 com.apple.opengl 1.5.9 (1.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x7fff839db000 - 0x7fff83cc2feb com.apple.HIToolbox 1.5.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. framework/Versions/A/HIToolbox 0x7fff83cc3000 - 0x7fff83d03fef com.apple.framework.IOKit 1.5.1 (???) <17e6707127a60c5e2d7a9bd2b7bf2db0> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x7fff83d04000 - 0x7fff83dc8fe2 com.apple.vImage 3.0 (3.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage .framework/Versions/A/vImage 0x7fff83dc9000 - 0x7fff83df3fff libcups.2.dylib ??? (???) /usr/lib/libcups.2.dylib 0x7fff83df4000 - 0x7fff83df4ffa com.apple.CoreServices 32 (32) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x7fff83df5000 - 0x7fff83ed6fff libcrypto.0.9.7.dylib ??? (???) <66f1f8773bd9fdfdcfd09e2b4b010636> /usr/lib/libcrypto.0.9.7.dylib 0x7fff83ed7000 - 0x7fff83f87fef com.apple.CoreServices.OSServices 226.5 (226.5) <1c38f727b3ad3293272db7323b37c735> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSSe rvices.framework/Versions/A/OSServices 0x7fff83f88000 - 0x7fff83fa2fff com.apple.openscripting 1.2.8 (???) <0674c4e3353c677c9f58df3297ae559b> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScript ing.framework/Versions/A/OpenScripting 0x7fff83fa3000 - 0x7fff83fdfff7 libGLImage.dylib ??? (???) <02258bcdbe8defdb254acc077a81dd9b> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage. dylib 0x7fff83fe0000 - 0x7fff83ff1fff com.apple.speech.synthesis.framework 3.7.1 (3.7.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x7fff83ff2000 - 0x7fff8406cff3 com.apple.CoreText 2.0.3 (???) <827bbfef670df72316719c25bfb39915> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreText.framework/Versions/A/CoreText 0x7fff8406d000 - 0x7fff841f8ffb libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0x7fff841f9000 - 0x7fff8420affd libz.1.dylib ??? (???) /usr/lib/libz.1.dylib 0x7fff8420b000 - 0x7fff842befef com.apple.DesktopServices 1.4.7 (1.4.7) /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/D esktopServicesPriv 0x7fff842bf000 - 0x7fff84677fff libLAPACK.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libLAPACK.dylib 0x7fff84678000 - 0x7fff84743fef com.apple.ColorSync 4.5.1 (4.5.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ColorSync.framework/Versions/A/ColorSync 0x7fff84744000 - 0x7fff84847feb com.apple.CoreData 100.1 (186) <074abc7f43f81f7885e4d0674a8be4bc> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x7fffffe00000 - 0x7fffffe01780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0xfffffffffffec000 - 0xfffffffffffeffff libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib SYSTEM CONFIG Model: MacPro3,1, BootROM MP31.006C.B05, 8 processors, Quad-Core Intel Xeon, 2.8 GHz, 32 GB Graphics: kHW_ATIrv630Item, ATI Radeon HD 2600, spdisplays_pcie_device, 256 MB Memory Module: DIMM Riser B/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Bluetooth: Version 2.1.3f8, 2 service, 1 devices, 1 incoming serial ports Network Service: Ethernet 2, Ethernet, en1 PCI Card: ATI Radeon HD 2600, display, Slot-1 Serial ATA Device: WDC WD3200AAJS-41VWA0, 298.09 GB Parallel ATA Device: PIONEER DVD-RW DVR-112D USB Device: Keyboard Hub, (null) mA USB Device: Apple Optical USB Mouse, (null) mA USB Device: Apple Keyboard, (null) mA USB Device: hub_device, (null) mA USB Device: Apple Cinema HD Display, (null) mA USB Device: Keyspan USA-28Xb, (null) mA USB Device: Bluetooth USB Host Controller, (null) mA FireWire Device: built-in_hub, unknown_value, unknown_speed FireWire Device: My Book, WD, 800mbit_speed FireWire Device: unknown_device, unknown_value, unknown_speed -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From jaakko.sipari at gmail.com Thu Jan 22 03:00:03 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 22 Jan 2009 12:00:03 +0200 Subject: [Rxtx] RXTX compilation with GCJ possible? Message-ID: <901f25b80901220200s53792317o374b80cbb6066a52@mail.gmail.com> Hi! Does anyone have experience on using RXTX in a GCJ compiled Java application? I'm interested whether this is possible in Windows and/or in Linux platforms. And of course what does it take to get it work, or does it just work out of the box. Ultimately my aim here would be to move to a more time deterministic system by utilizing GCJ, jRate & Javolution and possibly run the RXTX (and other important) threads at a priority higher than the garbage collector. This of course would require some modification for the RXTX threads to run in a Javolution pool context or non allocating real time contexts so they wouldn't produce any garbage, but that's something to hack on later. For now I'd just like to know if there are any obstacles on the road to compiling & running RXTX with GCJ. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/5592681a/attachment-0007.html From jmudd at dtiweb.net Thu Jan 22 06:21:03 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Thu, 22 Jan 2009 08:21:03 -0500 Subject: [Rxtx] Hot unplugging of a USB device References: <4977BEEA.4020708@gatworks.com> Message-ID: U. George, Thanks for the information. How did you resolve your USB/GPS device on Linux? My application has to run on both Linux and Windows eventually. Thanks, Jerry -----Original Message----- From: U. George [mailto:netbeans at gatworks.com] Sent: Wednesday, January 21, 2009 7:34 PM To: Jerry Mudd Cc: rxtx at qbang.org Subject: Re: [Rxtx] Hot unplugging of a USB device > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From m.kirkland at comcast.net Thu Jan 22 09:21:01 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Thu, 22 Jan 2009 08:21:01 -0800 Subject: [Rxtx] Serial port control lines change with call to getPortIdentifiers() on Linux Message-ID: <94443DEFFD574B6CA8DDB2B201D9E007@bengal.net> Hi All ! I have noticed an issue with RXTX on Ubuntu Linux 8.10 that has prevented me from being able to use RXTX on Linux. I have noticed this issue on both the rxtx 2.1.7 and the new rxtx2.2pre1. When I execute the following line to get the ports on a system - java.util.Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); Both DTR and RTS become active on ttyS0 and only ttyS0, not ttyS1 (I only have 2 ports). I see this prior to opening any ports or making any other calls to RXTX. I have stepped it though with the debugger and I am sure this is the trigger. My application uses these control lines to perform functions other then the standard flow control so it is critical that I be able to control them exactly. I would also think that folks using RXTX for more standard serial IO would also have issues with devices starting to talk before a listener was ready. I checked Windows XP and I do not see this issue (but I only have a com1 on the Windows computer). I also noticed that the DTR line blips when setting up a port on 2.2.pre1 like it does on 2.1.7r2. This it the same issue that the folks at http://www.codeskin.com/ patched. I see this issue on both Linux and Windows XP. Any help or clues would be greatly appreciated. If I can provide any additional info or do any testing I would be glad to help out to get version 2.2 in top shape for release. BTW I have written a simple dynamic loader to load the RXTX jar and native code that is drive by the os.name and os.arch system properties. I would be more then happy to contribute this to the project if folks though it would be useful. Its more convenient then having to manage copying the files around to various JVM's. TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/eab26bae/attachment-0006.html From josefk_5 at yahoo.com Fri Jan 23 09:44:06 2009 From: josefk_5 at yahoo.com (Josef Kahsay) Date: Fri, 23 Jan 2009 08:44:06 -0800 (PST) Subject: [Rxtx] Help on Accessing RS232 Message-ID: <509617.88308.qm@web38205.mail.mud.yahoo.com> Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS From m.kirkland at comcast.net Sat Jan 24 01:28:52 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Sat, 24 Jan 2009 00:28:52 -0800 Subject: [Rxtx] Help on Accessing RS232 In-Reply-To: <509617.88308.qm@web38205.mail.mud.yahoo.com> References: <509617.88308.qm@web38205.mail.mud.yahoo.com> Message-ID: <665887C02E1446708CE392FE0BD73D79@bengal.net> It seems to me that you are having a classic java classpath issue. Java classpath issues can be annoying to solve sometimes. As some random guesses I would suggest you look at the following. 1 - You might not be running the JVM from the location that you think you are (gets me all the time). I which Windows had a which command. 2 - You don't mention what development environment you are using like Eclipse etc., and if you are trying to run the demo from inside the development environment. If so, do whatever is appropriate for the development environment to control the classpath. In Eclipse this would involve adding a "User Library" to point to the jar and native code. 3 - Once you get the classpath ok, the next thing you might run into is not being able to load the native library. 4 - I have found that on XP I can place the RXTX jar and native library in the same directory as my application's jar file (and a class-path entry in the application's jar file manifest) and it all works. 5 - If you need more control of managing different versions of RXTX for different OS platforms, I have a dynamic RXTX loader I can send you (but I recommend getting the simple case working first). Let me know if this helps. Mike -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Josef Kahsay Sent: Friday, January 23, 2009 8:44 AM To: rxtx at qbang.org Subject: [Rxtx] Help on Accessing RS232 Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jacomoman at hotmail.com Mon Jan 26 12:12:27 2009 From: jacomoman at hotmail.com (Joseph Schmoley) Date: Mon, 26 Jan 2009 11:12:27 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: Message-ID: Hi All, First, let me thank you all for your effort on this excellent project. I've been using the Win32 binaries in the 2.1-7r2 package without any problems on WinXP Pro (32-bit). I then tried the .jnilib of the same version on my Mac OSX 10.5 64-bit darwin and got the familiar UnsatisfiedLinkError problem. I read up on all the mailing list archive messages and found this one (http://mailman.qbang.org/pipermail/rxtx/2008-May/2436699.html) suggesting that perhaps rxtx-devel from CVS would have a fix. So I got latest rxtx-devel + commapi-0-0-1 as suggested by the CVS page at rxtx.org. I even set my CFLAGS and LDFLAGS to include "-arch x86_64 -arch ppc64", but as it turned out, the latest configure script didn't need it. In any case, I configured and built rxtx-devel with no errors (that I could see) and transferred the resulting i386-apple-darwin9.6.0/librxtxSerial.jnilib to where my java.library.path is pointing to and ran my test class. Whereas before I was getting UnsatisfiedLinkError, I now simply get this: Invalid memory access of location 22d927c8 rip=22356420 Invalid memory access of location 22d9292c rip=22357540 [error occurred during error reporting (null), id 0xa] ./run-class.sh: line 10: 15647 Segmentation fault java -Djava.library.path=./lib/native -Dapp.logging.file.path=./log/runtime.log -classpath .:${MYCP} ${CLASSNAME} "${CMD}" run-class.sh is simply a script I've got to run my test class and all that class does is invoke the RXTX API, first one being: CommPortIdentifier.getPortIdentifiers(). Has anyone had any luck with getting latest CVS sources to work on Mac OS X 10.5 64-bit? Any help/pointers would be greatly appreciated. Thank you in advance. -Jac I've attached my configure and make output as txt files. Here's all my build/machine environment info, as per the troubleshooting wiki page: Mac OS X 10.5.6 (9G55) ----------------------------------------------- /usr/bin/java -version java version "1.6.0_07" Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153) Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode) ----------------------------------------------- Darwin my-macbook.local 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 ----------------------------------------------- autoconf (GNU Autoconf) 2.61 Copyright (C) 2006 Free Software Foundation, Inc. This is free software. You may redistribute copies of it under the terms of the GNU General Public License . There is NO WARRANTY, to the extent permitted by law. Written by David J. MacKenzie and Akim Demaille. ----------------------------------------------- automake (GNU automake) 1.10 Written by Tom Tromey and Alexandre Duret-Lutz . Copyright 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ----------------------------------------------- $ libtool -V Apple Computer, Inc. version cctools-698.1 ----------------------------------------------- GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program built for powerpc-apple-darwin9.0 ----------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: my-configure.out.txt Type: application/octet-stream Size: 6934 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090126/89d9c7f6/attachment-0004.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: my-make.out.txt Type: application/octet-stream Size: 7737 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090126/89d9c7f6/attachment-0005.obj From kintel at sim.no Mon Jan 26 16:16:19 2009 From: kintel at sim.no (Marius Kintel) Date: Tue, 27 Jan 2009 00:16:19 +0100 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: Message-ID: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Hi Jac, I've had the same issue, and I suggested a patch to partially fix it a while back: http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html I don't know the status of this in the current incarnation of the rxtx code and I have reverted to Java-1.5 since then.. ~/= Marius -- We are Elektropeople for a better living. From tjarvi at qbang.org Tue Jan 27 08:08:54 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 27 Jan 2009 08:08:54 -0700 (MST) Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: On Tue, 27 Jan 2009, Marius Kintel wrote: > Hi Jac, > > I've had the same issue, and I suggested a patch to partially fix it a > while back: > http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html > > I don't know the status of this in the current incarnation of the rxtx > code and I have reverted to Java-1.5 since then.. > > ~/= Marius > > -- > We are Elektropeople for a better living. > Hmm. That did not get in. I can add it and put a new prerelease out this week. The eis must be a regression. I was sure we fixed that. -- Trent Jarvi tjarvi at qbang.org From jacomoman at hotmail.com Tue Jan 27 08:48:16 2009 From: jacomoman at hotmail.com (Joseph Schmoley) Date: Tue, 27 Jan 2009 07:48:16 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: That would be excellent Trent. I've got a project partially on hold because of this. It runs great on Win32 (XP/Vista), it just has to do the same on Mac 64-bit and Linux 32-bit. I look forward to this pre-release. Again, thanks a bunch to you and all the other code contributors for this excellent project. I wish I could donate something to you guys. I couldn't find a donation link anywhere. RxTx has been a great help with my project. -Jac From: Trent Jarvi Sent: Tuesday, January 27, 2009 7:08 AM To: Marius Kintel Cc: Joseph Schmoley ; rxtx at qbang.org Subject: Re: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit On Tue, 27 Jan 2009, Marius Kintel wrote: > Hi Jac, > > I've had the same issue, and I suggested a patch to partially fix it a > while back: > http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html > > I don't know the status of this in the current incarnation of the rxtx > code and I have reverted to Java-1.5 since then.. > > ~/= Marius > > -- > We are Elektropeople for a better living. > Hmm. That did not get in. I can add it and put a new prerelease out this week. The eis must be a regression. I was sure we fixed that. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090127/bbd287bb/attachment.html From bschlining at gmail.com Tue Jan 27 09:38:26 2009 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 27 Jan 2009 08:38:26 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: > That would be excellent Trent. I've got a project partially on hold > because of this. It runs great on Win32 (XP/Vista), it just has to do the > same on Mac 64-bit and Linux 32-bit. I look forward to this pre-release. > I'm in the same spot too. Looking forward to the pre-release! -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090127/2275013b/attachment.html From andrew.paverd at rorotika.com Wed Jan 28 03:14:58 2009 From: andrew.paverd at rorotika.com (Andrew Paverd) Date: Wed, 28 Jan 2009 12:14:58 +0200 Subject: [Rxtx] RXTX not working on Solaris Message-ID: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Hi all, I am attempting to use RXTX on a Sun SPARC server running Solaris. I have tried the binaries from both the latest release (2.1-7) and the pre-release (2.2pre1). The 2.1-7 driver gives the following error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: fatal: libgcc_s.so.1: open failed: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)" I'm not sure what this "libgcc_s.so.1" file does in terms of RXTX but its absence is preventing the application from running. With the 2.2pre1 binary, the application loads without any issue but does not detect any comm-ports. I know that there are multiple ports available because when using the Sun javax.comm library for Solaris SPARC, the ports are all correctly discovered and the application can read from and write to them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in the 2.2 release. Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if so, how did you do it (which versions did you use etc.)? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090128/a97b220d/attachment.html From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0025.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0025.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0023.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0023.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0023.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0023.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0022.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0020.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0020.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0020.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0020.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0020.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0017.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0017.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0017.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment-0016.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0016.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment-0016.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment-0016.html From tjarvi at qbang.org Wed Jan 14 18:56:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 14 Jan 2009 18:56:50 -0700 (MST) Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Message-ID: On Wed, 14 Jan 2009, Jaakko Sipari wrote: > Hi (again)! > > Could someone clarify what these methods actually do and are they even > implemented? Do I get into trouble with buffer values of 0 (if I want to > handle the buffers myself)? > rxtx does not have buffers. It was not clear to me at the time why there would be a buffer when java already provides buffered input and output streams that can sit on top of rxtx. One reason I can see for implementing buffers in rxtx is to get data off the port so select() can block. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Wed Jan 14 23:23:08 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 15 Jan 2009 08:23:08 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> Message-ID: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Here's the same message for the list also. Forgot to do "Reply to all" ---------- Forwarded message ---------- From: Jaakko Sipari Date: Thu, Jan 15, 2009 at 8:22 AM Subject: Re: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize To: Trent Jarvi On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! >> >> Could someone clarify what these methods actually do and are they even >> implemented? Do I get into trouble with buffer values of 0 (if I want to >> handle the buffers myself)? >> >> > rxtx does not have buffers. It was not clear to me at the time why there > would be a buffer when java already provides buffered input and output > streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data off > the port so select() can block. > So basically those methods have currently no effect at all? - Jaakko -- Jaakko Sipari tel. +358451238191 eMail. jaakko.sipari at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090115/8b4c47c0/attachment-0015.html From tjarvi at qbang.org Thu Jan 15 18:37:12 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 15 Jan 2009 18:37:12 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: On Thu, 15 Jan 2009, Jaakko Sipari wrote: > Here's the same message for the list also. Forgot to do "Reply to all" > > ---------- Forwarded message ---------- > From: Jaakko Sipari > Date: Thu, Jan 15, 2009 at 8:22 AM > Subject: Re: [Rxtx] The functionality behind setInputBufferSize & > setOutputBufferSize > To: Trent Jarvi > > > On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! > > Could someone clarify what these methods actually do > and are they even > implemented? Do I get into trouble with buffer > values of 0 (if I want to > handle the buffers myself)? > > > rxtx does not have buffers. ?It was not clear to me at the time why > there would be a buffer when java already provides buffered input and > output streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data > off the port so select() can block. > > > So basically those methods have currently no effect at all? > Correct. You can use BufferedInputStream and BufferedOutputStream from the Java API once you get the Input/OutputStream from rxtx. But changing the input and output buffer size in rxtx is not going to change behavior. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Fri Jan 16 01:22:37 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Fri, 16 Jan 2009 10:22:37 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> > So basically those methods have currently no effect at all? >> >> > Correct. You can use BufferedInputStream and BufferedOutputStream from the > Java API once you get the Input/OutputStream from rxtx. But changing the > input and output buffer size in rxtx is not going to change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > I assume there still is some kind of buffer in rxtx (or the serial port driver) in case of processing delays. I mean, if the serial port gives data faster than can be read from the Java program using rxtx it isn't just thrown away, right? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090116/3bd9a52e/attachment-0014.html From tjarvi at qbang.org Fri Jan 16 05:17:24 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 16 Jan 2009 05:17:24 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> Message-ID: On Fri, 16 Jan 2009, Jaakko Sipari wrote: > > So basically those methods have currently no effect > at all? > > > Correct. ?You can use BufferedInputStream and BufferedOutputStream > from the Java API once you get the Input/OutputStream from rxtx. ?But > changing the input and output buffer size in rxtx is not going to > change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > > > > I assume there still is some kind of buffer in rxtx (or the serial port > driver) in case of processing delays. I mean, if the serial port gives data > faster than can be read from the Java program using rxtx it isn't just > thrown away, right? > The UART can usually hold a few bytes. The kernel driver can buffer the input. In practice, it works. With Sun commapi, the typical application has 4 buffers between the user and the incomming data. With rxtx, it is 3. BufferedInputStream -> commapi/rxtx -> kernel driver -> UART If you really do run into overflows on the UART, then hardware flow control is what you should be using and tinkering with rxtx to avoid it is not a very sound approach. -- Trent Jarvi tjarvi at qbang.org From llowrey at nuclearwinter.com Sun Jan 18 12:49:39 2009 From: llowrey at nuclearwinter.com (Larkin Lowrey) Date: Sun, 18 Jan 2009 13:49:39 -0600 Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain Message-ID: <497387D3.9040201@nuclearwinter.com> After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when running code that uses RXTXComm. The crashes only occur when using 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. As far as I can tell, the crash happens immediately on start. I can't see any evidence of much, if anything, happening before the crash. The code used to work and only stopped working after the "upgrade" to FC10. I have tried RXTX v2.1 and 2.2pre1. Any ideas? Here's the error: # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode linux-amd64) # Problematic frame: # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 --Larkin From tjarvi at qbang.org Mon Jan 19 17:48:34 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 19 Jan 2009 17:48:34 -0700 (MST) Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain In-Reply-To: <497387D3.9040201@nuclearwinter.com> References: <497387D3.9040201@nuclearwinter.com> Message-ID: On Sun, 18 Jan 2009, Larkin Lowrey wrote: > After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when > running code that uses RXTXComm. The crashes only occur when using > 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. > > As far as I can tell, the crash happens immediately on start. I can't > see any evidence of much, if anything, happening before the crash. > > The code used to work and only stopped working after the "upgrade" to > FC10. I have tried RXTX v2.1 and 2.2pre1. > > Any ideas? > > Here's the error: > > # > # An unexpected error has been detected by Java Runtime Environment: > # > # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 > # > # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode > linux-amd64) > # Problematic frame: > # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 > > > --Larkin Hi Larkin, I can think of 2 segv's in rxtx that may apply. Both are fixed in rxtx 2.2pre.. The first was that pointers required by nativeDrain needed to be stored in something larger than a 32 bit integer in java. This resulted in a crash like you see the first time the 'nativedrain' thread tried to use the pointer. The second was a concurrency issue George resolved with synchronization. The crash was usually during close but happened in the 'nativedrain' thread. (eventLoop) As mentioned, these are both fixed in the prerelease. There is a class provided in recent versions of RXTX that allow you confirm the version being used: gnu.io.RXTXVersion with member methods getVersion() and nativeGetVersion(). This allows you to confirm that you are indeed using the version you think you are. -- Trent Jarvi tjarvi at qbang.org From alexandrepoletto at gmail.com Wed Jan 21 11:48:07 2009 From: alexandrepoletto at gmail.com (Alexandre Poletto) Date: Wed, 21 Jan 2009 16:48:07 -0200 Subject: [Rxtx] work in windows but dont work in linux Message-ID: hi folks, I have an application to communicate with the serial port using rxtx, in the windows os my application works well, but when i try to run in the linux os i open the port (in windows "COM1", in Linux "/dev/ttyS0") send my commandes but i never receive any answer. I'm using ubuntu 8.10 and java 1.5, there is any configuration in that i'm missing? Thanks for the help! ps: Sorry form my bad english :( -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/70baea51/attachment-0008.html From jmudd at dtiweb.net Wed Jan 21 14:08:04 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Wed, 21 Jan 2009 16:08:04 -0500 Subject: [Rxtx] Hot unplugging of a USB device Message-ID: Looking to see if the issues surrounding an uplugging of a USB device have been resolved. I see from the mail list archives and bug reports that others have noted this issue. I have a USB GPS Receiver that is plugged into a Windows (XP) system and am using Netbeans 6.5 and Java jdk 1.6 and RXTX 2.1.7 and 2.2pre1. In the thread that is reading data via listening for a SerialEvent I can capture a Java IOException: No error in readArray. The application is essentially hung at this point. Only a termination of the application will clear it up and not leave the port hung. I had read in the archives that this is because the event loop in the native code portion is continually putting out the exceptions. I had also seen that this might be addressed in future releases. Any help is appreciated. Thanks, Jerry ________________________________ Jerry Mudd Senior Programmer 21795 Shangri-La Drive, Ste C Lexington Park, MD 20653 (301) 737-8893 (301) 737-8897 Fax jmudd at dtiweb.net www.dtiweb.net This message may contain sensitive, proprietary and/or privileged information. Disclosure is not authorized unless provided in writing by Defense Technologies, Inc. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0008.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 6296 bytes Desc: image001.gif Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0008.gif From netbeans at gatworks.com Wed Jan 21 17:33:46 2009 From: netbeans at gatworks.com (U. George) Date: Wed, 21 Jan 2009 19:33:46 -0500 Subject: [Rxtx] Hot unplugging of a USB device In-Reply-To: References: Message-ID: <4977BEEA.4020708@gatworks.com> > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:34 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:34 +1100 Subject: [Rxtx] Part 1 of 2 parts re rxtx 2.2 pre.. and OSX Message-ID: Hi, I have tried out the latest version of rxtx on a mac and can report that running with ImageJ (32 bit ) all seems to be fine. However when I attempt to use it with ImageJ64, I get a crash whenever the serial port is used. The details follow. What I did. Ran our plug-in in ImageJ 64 bit (1.42g) for Measuring, which is using the latest rxtx (the beta 2.2 compiled on 30 December 2008) for MacOSX 10.5.x) I installed this by putting the two files in the directory ~ LIBRARY/JAVA/EXTENSIONS. The Plug-in uses the serial port. The window we put up to show the numbers from the stage appeared, but only with the default "0" (zero) in each row, which is what we put there until we get data back from the port and the device attached. Then it crashed. I should point out that this all works fine using ImageJ (32 bit) 1.42g, on the same platform. So the only difference is the use of ImageJ 64 bit, and I guess the version of rxtx for 64 bit. I hope that cleverer people than me can throw some light onto this little problem. ImageJ64 seems to work ok until rxtx is called, although I haven't tried much so far, just some 3D rendering with 1 Gb of image data, which all went well, apart from the fact that the data was marginal. I am now showing the data supplied by the report to Apple window. This has three tabs, one to write your information in, one called Problem Details, and the third called SYSTEM CONFIG. These are pasted in below. Best wishes Noel Problem Details Process: JavaApplicationStub [463] Path: /Applications/ImageJ/ImageJ64.app/Contents/MacOS/JavaApplicationStub Identifier: gov.nih.info.rsb.ImageJ Version: ??? (10.2) Code Type: X86-64 (Native) Parent Process: launchd [398] Date/Time: 2009-01-19 10:48:09.342 +1100 OS Version: Mac OS X 10.5.6 (9G55) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000000029507c8 Crashed Thread: 16 Application Specific Information: Java information: Exception type: Bus Error (0xa) at pc=0x00000006ff70f418 Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0_07-b06-57 mixed mode macosx-amd64) Current thread (0x00000001020de800): JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] Stack: [0x0000000702851000,0x0000000702951000] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j gnu.io.RXTXPort.readByte()I+0 j gnu.io.RXTXPort$SerialInputStream.read()I+81 j SerialConnection.serialEvent(Lgnu/io/SerialPortEvent;)V+41 j gnu.io.RXTXPort.sendEvent(IZ)Z+382 v ~BufferBlob::StubRoutines (1) j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~BufferBlob::StubRoutines (1) Java Threads: ( => current thread ) =>0x00000001020de800 JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] 0x00000001020e8800 JavaThread "Measure XYZ" [_thread_blocked, id=44384256, stack(0x0000000702954000,0x0000000702a54000)] 0x0000000102001000 JavaThread "DestroyJavaVM" [_thread_blocked, id=25169920, stack(0x0000000101001000,0x0000000101801000)] 0x00000001020da800 JavaThread "SocketListener" [_thread_in_native, id=29671424, stack(0x0000000701b4c000,0x0000000701c4c000)] 0x00000001020b4800 JavaThread "AWT-EventQueue-0" [_thread_in_Java, id=-27992064, stack(0x00000006fe44e000,0x00000006fe54e000)] 0x0000000102096000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=-34344960, stack(0x00000006fde3f000,0x00000006fdf3f000)] 0x0000000102078000 JavaThread "AWT-Shutdown" [_thread_blocked, id=-58392576, stack(0x00000006fc750000,0x00000006fc850000)] 0x0000000102077800 JavaThread "AWT-AppKit" daemon [_thread_in_native, id=1886770976, stack(0x00007fff5f400000,0x00007fff5fc00000)] 0x0000000102044800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=-333877248, stack(0x00000006ec097000,0x00000006ec197000)] 0x0000000102043000 JavaThread "CompilerThread1" daemon [_thread_blocked, id=-334938112, stack(0x00000006ebf94000,0x00000006ec094000)] 0x0000000102041800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=-335998976, stack(0x00000006ebe91000,0x00000006ebf91000)] 0x0000000102041000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=-337059840, stack(0x00000006ebd8e000,0x00000006ebe8e000)] 0x0000000102029800 JavaThread "Finalizer" daemon [_thread_blocked, id=-338214912, stack(0x00000006ebc74000,0x00000006ebd74000)] 0x0000000102028800 JavaThread "Reference Handler" daemon [_thread_blocked, id=-339333120, stack(0x00000006ebb63000,0x00000006ebc63000)] Other Threads: 0x0000000102020800 VMThread [stack: 0x00000006eba60000,0x00000006ebb60000] [id=-340393984] 0x0000000102046000 WatcherThread [stack: 0x00000006ec19a000,0x00000006ec29a000] [id=-332816384] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 76480K, used 14448K [0x0000000105800000, 0x000000010ad50000, 0x00000002f9800000) eden space 65600K, 22% used [0x0000000105800000, 0x000000010661c398, 0x0000000109810000) from space 10880K, 0% used [0x0000000109810000, 0x0000000109810000, 0x000000010a2b0000) to space 10880K, 0% used [0x000000010a2b0000, 0x000000010a2b0000, 0x000000010ad50000) tenured generation total 174784K, used 0K [0x00000002f9800000, 0x00000003042b0000, 0x00000006e1800000) the space 174784K, 0% used [0x00000002f9800000, 0x00000002f9800000, 0x00000002f9800200, 0x00000003042b0000) compacting perm gen total 21248K, used 10319K [0x00000006e1800000, 0x00000006e2cc0000, 0x00000006e6c00000) the space 21248K, 48% used [0x00000006e1800000, 0x00000006e2213d28, 0x00000006e2213e00, 0x00000006e2cc0000) No shared spaces configured. Virtual Machine Arguments: JVM Args: -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher. framework/Resources/LauncherSupport.jar -Xms256m -Xmx24000m -Dcom.apple.macos.useScreenMenuBar=false -Dcom.apple.mrj.application.growbox.intrudes=false -Dcom.apple.mrj.application.live-resize=true -Dcom.apple.hwaccel=false -Dapple.awt.Antialiasing=false -Dcom.apple.smallTabs=true -Dapple.awt.brushMetalLook=false Java Command: Launcher Type: generic Physical Memory: Page Size = 4k, Total = 2048M, Free = 30996M Thread 0: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 com.apple.CoreFoundation 0x00007fff8204dc4f CFRunLoopRunSpecific + 1631 3 com.apple.HIToolbox 0x00007fff839fdda2 RunCurrentEventLoopInMode + 278 4 com.apple.HIToolbox 0x00007fff839fdbd8 ReceiveNextEventCommon + 322 5 com.apple.HIToolbox 0x00007fff839fda83 BlockUntilNextEventMatchingListInMode + 79 6 com.apple.AppKit 0x00007fff8299d3b0 _DPSNextEvent + 603 7 com.apple.AppKit 0x00007fff8299ccf1 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 136 8 com.apple.AppKit 0x00007fff82996a84 -[NSApplication run] + 455 9 libawt.jnilib 0x00000006ec433257 +[AWTStarter startAWT:] + 1343 10 libawt.jnilib 0x00000006ec432c46 -[CPerformer perform] + 112 11 com.apple.Foundation 0x00007fff8153f2b4 __NSThreadPerformPerform + 148 12 com.apple.CoreFoundation 0x00007fff8204e0e8 CFRunLoopRunSpecific + 2808 13 ...ple.JavaApplicationLauncher 0x0000000100005165 startupJava(LauncherArgsStruct*) + 235 14 ...ple.JavaApplicationLauncher 0x000000010000579c launchJavaApplication + 1224 15 JavaApplicationStub 0x0000000100000b9c 0x100000000 + 2972 Thread 1: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x0000000101a93b61 JVM_GetCPFieldModifiers + 128961 5 libjvm.dylib 0x0000000101a93a36 JVM_GetCPFieldModifiers + 128662 6 ...ple.JavaApplicationLauncher 0x000000010000c0ce startJavaApplication + 2886 7 ...ple.JavaApplicationLauncher 0x000000010000506d java_main_stub(void*) + 9 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 2: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libSystem.B.dylib 0x00007fff840db0b0 mach_msg_server + 436 3 libjvm.dylib 0x000000010181176d JNI_CreateJavaVM_Impl + 53277 4 libjvm.dylib 0x0000000101811375 JNI_CreateJavaVM_Impl + 52261 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 3: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x00000001018e452f JVM_Lseek + 235727 5 libjvm.dylib 0x00000001018e42df JVM_Lseek + 235135 6 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 7 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 8 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 4: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x00000001028003ea 0 + 4336911338 11 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 12 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 13 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 14 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 15 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 16 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 17 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 18 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 19 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 20 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 5: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 6: 0 libSystem.B.dylib 0x00007fff8406dd72 semaphore_wait_trap + 10 1 libjvm.dylib 0x0000000101915bdb JVM_IsPrimitiveClass + 12139 2 libjvm.dylib 0x00000001019155b5 JVM_IsPrimitiveClass + 10565 3 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 4 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 7: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 8: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 9: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x0000000101918ec8 JVM_IsPrimitiveClass + 25176 5 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 6 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 7 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 10: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x000000010191abb5 JVM_IsPrimitiveClass + 32581 4 libjvm.dylib 0x000000010191a70a JVM_IsPrimitiveClass + 31386 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 11: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 12: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x0000000102803414 0 + 4336923668 12 ??? 0x00000001028003ea 0 + 4336911338 13 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 14 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 15 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 16 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 17 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 18 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 19 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 20 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 21 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 22 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 13: 0 ??? 0x0000000102817034 0 + 4337004596 1 ??? 0x000000010280304e 0 + 4336922702 2 ??? 0x0000000102803093 0 + 4336922771 3 ??? 0x000000010280356d 0 + 4336924013 4 ??? 0x0000000102803093 0 + 4336922771 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x000000010280356d 0 + 4336924013 8 ??? 0x0000000102803093 0 + 4336922771 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x0000000102802f3a 0 + 4336922426 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102802f3a 0 + 4336922426 14 ??? 0x0000000102802f3a 0 + 4336922426 15 ??? 0x0000000102803162 0 + 4336922978 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102802f3a 0 + 4336922426 19 ??? 0x0000000102802f3a 0 + 4336922426 20 ??? 0x00000001028003ea 0 + 4336911338 21 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 22 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 23 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 24 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 25 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 26 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 27 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 28 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 29 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 30 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 14: 0 libSystem.B.dylib 0x00007fff840f210e accept + 10 1 libnet.jnilib 0x00000006ff6b6b11 Java_java_net_PlainSocketImpl_socketAccept + 277 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x0000000102802f3a 0 + 4336922426 4 ??? 0x0000000102802f3a 0 + 4336922426 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x0000000102803414 0 + 4336923668 8 ??? 0x00000001028003ea 0 + 4336911338 9 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 10 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 11 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 12 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 13 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 14 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 15 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 16 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 17 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 18 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 15: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x000000010280304e 0 + 4336922702 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102803414 0 + 4336923668 14 ??? 0x0000000102803093 0 + 4336922771 15 ??? 0x0000000102803093 0 + 4336922771 16 ??? 0x0000000102803093 0 + 4336922771 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102803414 0 + 4336923668 19 ??? 0x00000001028003ea 0 + 4336911338 20 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 21 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 22 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 23 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 24 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 25 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 26 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 27 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 28 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 29 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 Crashed: 0 librxtxSerial.jnilib 0x00000006ff70f418 read_byte_array + 68 1 librxtxSerial.jnilib 0x00000006ff70f9b3 Java_gnu_io_RXTXPort_readByte + 93 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x000000010280304e 0 + 4336922702 4 ??? 0x000000010280304e 0 + 4336922702 5 ??? 0x0000000102803414 0 + 4336923668 6 ??? 0x00000001028003ea 0 + 4336911338 7 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 8 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 9 libjvm.dylib 0x00000001018e5be8 JVM_Lseek + 241544 10 libjvm.dylib 0x0000000101900b11 JVM_MonitorWait + 17249 11 libjvm.dylib 0x0000000101a1e59e JVM_DisableCompiler + 1166 12 librxtxSerial.jnilib 0x00000006ff70d91e send_event + 132 13 librxtxSerial.jnilib 0x00000006ff70e82b report_serial_events + 92 14 librxtxSerial.jnilib 0x00000006ff7108c9 Java_gnu_io_RXTXPort_eventLoop + 237 15 ??? 0x000000010280e878 0 + 4336969848 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x00000001028003ea 0 + 4336911338 18 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 19 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 20 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 21 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 22 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 23 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 24 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 25 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 26 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 27 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 17: 0 libSystem.B.dylib 0x00007fff84074d02 __semwait_signal + 10 1 libSystem.B.dylib 0x00007fff840dce91 usleep + 57 2 librxtxSerial.jnilib 0x00000006ff70d729 drain_loop + 45 3 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 4 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 crashed with X86 Thread State (64-bit): rax: 0x00000000029507c0 rbx: 0x0000000000000041 rcx: 0x0000000000000065 rdx: 0x0000000000000002 rdi: 0x00000006ff71205e rsi: 0x00000006ff711c67 rbp: 0x0000000702950000 rsp: 0x000000070294fef0 r8: 0x000000000000004d r9: 0x00000006e21d64c0 r10: 0x00000006e21d38e8 r11: 0x00000000000000d2 r12: 0x00000001020de998 r13: 0x00000006e21d93b0 r14: 0x0000000000000032 r15: 0x00000000029507c0 rip: 0x00000006ff70f418 rfl: 0x0000000000010202 cr2: 0x00000000029507c8 Continued in the message part 2 -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:41 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:41 +1100 Subject: [Rxtx] Part 2 re rxtx 2.2 pre... and MacOSX Message-ID: Continued from Part 1. Binary Images: 0x100000000 - 0x100000fff JavaApplicationStub ??? (???) /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationS tub 0x100004000 - 0x100011fff com.apple.JavaApplicationLauncher 12.2.0 (12.2.0) /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/JavaApplicationLauncher 0x10001a000 - 0x100022ffd com.apple.JavaVM 12.2.0 (12.2.0) <2b178e8d4bbcc0aa427c2f3f71bb2fcb> /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM 0x100055000 - 0x10005dff0 libverify.dylib ??? (???) <56eac95084cb86cd1339a721b1353182> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libveri fy.dylib 0x100063000 - 0x10006cffb JavaNativeFoundation ??? (???) <68ca6409dc49542301edda1e0744ac69> /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNative Foundation.framework/Versions/A/JavaNativeFoundation 0x1000a8000 - 0x1000c7fef libjava.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjava .jnilib 0x1000d8000 - 0x1000e5ffb libzip.jnilib ??? (???) <5b6dce7c9a1f25aa5dff1a633c9dc342> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libzip. jnilib 0x101803000 - 0x101eafff3 libjvm.dylib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bundle/Libra ries/libjvm.dylib 0x6ec2c5000 - 0x6ec2c6fff liblauncher.jnilib ??? (???) <567fa54a222b965b2c4aefea21d9800a> /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/Resources/liblauncher.jnilib 0x6ec431000 - 0x6ec5e4fff libawt.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libawt. jnilib 0x6fdc3b000 - 0x6fdc3cfff ATSHI.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/Resources/ATSHI.dylib 0x6fdd6e000 - 0x6fdd6efff libcmm.jnilib ??? (???) <114e1a620a6920d77bf09bd57a7f7d52> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libcmm. jnilib 0x6fdd9e000 - 0x6fde1fff7 libfontmanager.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libfont manager.jnilib 0x6fdf41000 - 0x6fdf8ffff libsuncmm.jnilib ??? (???) <47330f1f17822de3a5cf921e07615cf7> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libsunc mm.jnilib 0x6fdf95000 - 0x6fdfc4ff7 libjpeg.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjpeg .jnilib 0x6ff6ae000 - 0x6ff6baffb libnet.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnet. jnilib 0x6ff6c0000 - 0x6ff6c4fff libnio.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnio. jnilib 0x6ff6d4000 - 0x6ff6e8ff7 libdcpr.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libdcpr .jnilib 0x6ff70c000 - 0x6ff713fff +librxtxSerial.jnilib ??? (???) <5133deacebd01ceab7d528c541241956> /Library/Java/Extensions/librxtxSerial.jnilib 0x6ff734000 - 0x6ff74bfef libJapaneseConverter.dylib ??? (???) <64cca6bb4650a269f49a8427507e4963> /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib 0x70204f000 - 0x702218fef com.apple.RawCamera.bundle 2.0.10 (2.0.10) /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera 0x7fff5fc00000 - 0x7fff5fc2e643 dyld 97.1 (???) /usr/lib/dyld 0x7fff80003000 - 0x7fff80146ffb com.apple.audio.toolbox.AudioToolbox 1.5.2 (1.5.2) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x7fff801d2000 - 0x7fff801d5ffb com.apple.help 1.1 (36) <9000c05ccad96fdcc25bc35264abf587> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.frame work/Versions/A/Help 0x7fff801d6000 - 0x7fff80211fff com.apple.AE 402.2 (402.2) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.f ramework/Versions/A/AE 0x7fff80212000 - 0x7fff80257fef libRIP.A.dylib ??? (???) <8c818d7fd3dc57839ac48caf107ff4c0> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x7fff80258000 - 0x7fff8029bfef com.apple.QD 3.11.54 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/QD.framework/Versions/A/QD 0x7fff8029c000 - 0x7fff802dffef libTIFF.dylib ??? (???) <86be7909f46cc044a887cbb60ab7826d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x7fff802e0000 - 0x7fff803d4fff libobjc.A.dylib ??? (???) <118dc1ae05e685ad64290352fc94f1f0> /usr/lib/libobjc.A.dylib 0x7fff803d5000 - 0x7fff8045dfe7 libsqlite3.0.dylib ??? (???) <3c7ab3523b816dbd3e039ee7e6e2c580> /usr/lib/libsqlite3.0.dylib 0x7fff8045e000 - 0x7fff80466ffa libbsm.dylib ??? (???) <4d838c0d8a74fe61c781a53a8723303d> /usr/lib/libbsm.dylib 0x7fff80467000 - 0x7fff80497fff com.apple.shortcut 1 (1.0) <9822328df9321a661af3afcc841e8f80> /System/Library/PrivateFrameworks/Shortcut.framework/Versions/A/Shortcut 0x7fff80498000 - 0x7fff8049bfff com.apple.securityhi 3.0 (30817) <00ddd6e60692b62b7649573eab8aef5a> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI .framework/Versions/A/SecurityHI 0x7fff8049c000 - 0x7fff8049efff com.apple.print.framework.Print 218.0.2 (220.1) <2b847a0a1cd885f596a4d10409d50ba3> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.fram ework/Versions/A/Print 0x7fff8049f000 - 0x7fff805dbfe9 com.apple.ImageIO.framework 2.0.4 (2.0.4) <47dcdc0b5986b2c157e0b6dae48ce464> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/ImageIO 0x7fff805dc000 - 0x7fff805f9fef com.apple.CoreVideo 1.5.1 (1.5.1) <78253b3fe8d3dcc90f159d7ed866c295> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x7fff805fa000 - 0x7fff8068bfff com.apple.SearchKit 1.2.1 (1.2.1) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Sear chKit.framework/Versions/A/SearchKit 0x7fff8068c000 - 0x7fff80e49fef libBLAS.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libBLAS.dylib 0x7fff80e4a000 - 0x7fff81416fff com.apple.CoreGraphics 1.407.2 (???) <436dbc70f8c9b29b3beb1d2de220acf2> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/CoreGraphics 0x7fff81417000 - 0x7fff8141dfff com.apple.DiskArbitration 2.2.1 (2.2.1) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitrat ion 0x7fff8141e000 - 0x7fff8145bff7 com.apple.SystemConfiguration 1.9.2 (1.9.2) <150119d0cecb0c80f6736b9881c2411e> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemCo nfiguration 0x7fff8145c000 - 0x7fff81523fec com.apple.CFNetwork 422.11 (422.11) <570ca46de3b907cb1c8e33fc62f562b4> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNe twork.framework/Versions/A/CFNetwork 0x7fff81524000 - 0x7fff8152dfff libCGATS.A.dylib ??? (???) <722a0bbd58740d46739008e881010631> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib 0x7fff8152e000 - 0x7fff81533fff com.apple.CommonPanels 1.2.4 (85) <2cec1ecc95cf1ecea8bea030975a46b8> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPane ls.framework/Versions/A/CommonPanels 0x7fff81534000 - 0x7fff817cffe3 com.apple.Foundation 6.5.7 (677.22) <8134977fcc57198a53dc494b60592980> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x7fff817d0000 - 0x7fff817d0ffd com.apple.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x7fff817d1000 - 0x7fff81cf1fc6 libGLProgrammability.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgra mmability.dylib 0x7fff81cf2000 - 0x7fff81cf4fff com.apple.NavigationServices 3.5.2 (163) <7cb7f3fe7f9d56ec89ef28a6d3a1da7d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Navigation Services.framework/Versions/A/NavigationServices 0x7fff81cf5000 - 0x7fff81d32fe7 com.apple.coreui 1.2 (62) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x7fff81d33000 - 0x7fff81d33fff com.apple.Carbon 136 (136) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x7fff81d34000 - 0x7fff81d42fff libCSync.A.dylib ??? (???) <61f6cc104b3e9b77cd583635a3a9a5cf> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x7fff81d43000 - 0x7fff81d45ff9 libRadiance.dylib ??? (???) <6d9f2235e8f70a7aedfc59383a7548d8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x7fff81d46000 - 0x7fff81db5ff9 com.apple.print.framework.PrintCore 5.5.3 (245.3) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/PrintCore.framework/Versions/A/PrintCore 0x7fff81db6000 - 0x7fff81db6ff8 com.apple.ApplicationServices 34 (34) <81cd02cc2ccf4e47e51d03db860da556> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Applicat ionServices 0x7fff81db7000 - 0x7fff81dd8fff libresolv.9.dylib ??? (???) <38318f9fbcfbdb384e0f9b08cc0e757a> /usr/lib/libresolv.9.dylib 0x7fff81dd9000 - 0x7fff81e4ffef libvMisc.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvMisc.dylib 0x7fff81e50000 - 0x7fff81e52ff7 libffi.dylib ??? (???) <920bb19728451f35703bb95dc908c7ca> /usr/lib/libffi.dylib 0x7fff81e53000 - 0x7fff81eeefe7 com.apple.ink.framework 101.3 (86) <60c6579faf114ea9677fd9ae25389ed2> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framew ork/Versions/A/Ink 0x7fff81eef000 - 0x7fff81f0dfff libPng.dylib ??? (???) <4017eab74319a648dfd73b7d503e557d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x7fff81f0e000 - 0x7fff81f24ff9 com.apple.ImageCapture 5.0.1 (5.0.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCaptu re.framework/Versions/A/ImageCapture 0x7fff81f25000 - 0x7fff81f3dfff com.apple.DictionaryServices 1.0.0 (1.0.0) <78ea11e9a92120f76d69efa24b8d1f95> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Dict ionaryServices.framework/Versions/A/DictionaryServices 0x7fff81f3e000 - 0x7fff81f42fff libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib 0x7fff81f43000 - 0x7fff81fe3fe3 com.apple.ApplicationServices.ATS 3.4 (???) <47cf09bf78935889f17f1b6b09badf0d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/ATS 0x7fff81fe4000 - 0x7fff8211bfff com.apple.CoreFoundation 6.5.5 (476.17) <51930d43c7c2d8fb24148cbfc05bba0f> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundatio n 0x7fff8211c000 - 0x7fff82126fff com.apple.speech.recognition.framework 3.7.24 (3.7.24) <2399374b096b284345daba82e2cb833d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechReco gnition.framework/Versions/A/SpeechRecognition 0x7fff82127000 - 0x7fff82159ff7 libauto.dylib ??? (???) /usr/lib/libauto.dylib 0x7fff8215a000 - 0x7fff821cefe7 libstdc++.6.dylib ??? (???) <565ee6f798f7fef6f804c60682787280> /usr/lib/libstdc++.6.dylib 0x7fff821cf000 - 0x7fff8228dfff edu.mit.Kerberos 6.0.12 (6.0.12) /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x7fff8228e000 - 0x7fff8228effb com.apple.installserver.framework 1.0 (8) /System/Library/PrivateFrameworks/InstallServer.framework/Versions/A/Install Server 0x7fff8228f000 - 0x7fff82293fff libGIF.dylib ??? (???) <66436b84211fe0e723051eab15af0aca> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x7fff82294000 - 0x7fff8258ffe3 com.apple.CoreServices.CarbonCore 786.10 (786.10) <2ac701edf3ca98a86ae9d5f733200b40> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Carb onCore.framework/Versions/A/CarbonCore 0x7fff82590000 - 0x7fff825aafff libvDSP.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvDSP.dylib 0x7fff825ab000 - 0x7fff827b1ff3 com.apple.security 5.0.4 (34102) <47c559b17c1f51998e7a981d0fbec4c8> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x7fff827b2000 - 0x7fff827d9fff libxslt.1.dylib ??? (???) /usr/lib/libxslt.1.dylib 0x7fff827da000 - 0x7fff82948fff libicucore.A.dylib ??? (???) <374ddaf141bf88dba00ab9058f2dbad6> /usr/lib/libicucore.A.dylib 0x7fff82949000 - 0x7fff8295dff7 libGL.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x7fff8295e000 - 0x7fff83286fff com.apple.AppKit 6.5.6 (949.43) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x7fff83287000 - 0x7fff83667fef com.apple.QuartzCore 1.5.7 (1.5.7) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x7fff83668000 - 0x7fff836b8fe7 com.apple.Metadata 10.5.2 (398.25) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Meta data.framework/Versions/A/Metadata 0x7fff836b9000 - 0x7fff836baff3 com.apple.audio.units.AudioUnit 1.5 (1.5) /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x7fff836bb000 - 0x7fff83710fe3 com.apple.HIServices 1.7.0 (???) <6bef766448d67adb91901b432629ea0f> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/HIServices.framework/Versions/A/HIServices 0x7fff83711000 - 0x7fff83711ffd com.apple.Accelerate.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/vecLib 0x7fff83712000 - 0x7fff837a7ffb com.apple.LaunchServices 290.3 (290.3) <56544e16c5192d2ce72df772901fcaef> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Laun chServices.framework/Versions/A/LaunchServices 0x7fff837a8000 - 0x7fff8382ffef com.apple.audio.CoreAudio 3.1.1 (3.1.1) <9c1714647fd7515c900362ad2ac76874> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x7fff83830000 - 0x7fff83893fef libGLU.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dyli b 0x7fff83894000 - 0x7fff838a2ff9 com.apple.helpdata 1.0.1 (14.2) /System/Library/PrivateFrameworks/HelpData.framework/Versions/A/HelpData 0x7fff838a3000 - 0x7fff838afff1 libgcc_s.1.dylib ??? (???) <23fa31a628c1ea8a62ac529fa333b6e1> /usr/lib/libgcc_s.1.dylib 0x7fff838b0000 - 0x7fff838d2fff libJPEG.dylib ??? (???) <4257ab268996bbeb93b47946df181cdc> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x7fff838d3000 - 0x7fff838d3ffd com.apple.Accelerate 1.4.2 (Accelerate 1.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x7fff838d4000 - 0x7fff838d4ff8 com.apple.Cocoa 6.5 (???) <8c59f679ffbd9178134df1d83dedde28> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa 0x7fff838d5000 - 0x7fff839cafff libxml2.2.dylib ??? (???) <8226d1180354f493954c5fa1fc0e1154> /usr/lib/libxml2.2.dylib 0x7fff839cb000 - 0x7fff839dafe7 com.apple.opengl 1.5.9 (1.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x7fff839db000 - 0x7fff83cc2feb com.apple.HIToolbox 1.5.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. framework/Versions/A/HIToolbox 0x7fff83cc3000 - 0x7fff83d03fef com.apple.framework.IOKit 1.5.1 (???) <17e6707127a60c5e2d7a9bd2b7bf2db0> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x7fff83d04000 - 0x7fff83dc8fe2 com.apple.vImage 3.0 (3.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage .framework/Versions/A/vImage 0x7fff83dc9000 - 0x7fff83df3fff libcups.2.dylib ??? (???) /usr/lib/libcups.2.dylib 0x7fff83df4000 - 0x7fff83df4ffa com.apple.CoreServices 32 (32) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x7fff83df5000 - 0x7fff83ed6fff libcrypto.0.9.7.dylib ??? (???) <66f1f8773bd9fdfdcfd09e2b4b010636> /usr/lib/libcrypto.0.9.7.dylib 0x7fff83ed7000 - 0x7fff83f87fef com.apple.CoreServices.OSServices 226.5 (226.5) <1c38f727b3ad3293272db7323b37c735> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSSe rvices.framework/Versions/A/OSServices 0x7fff83f88000 - 0x7fff83fa2fff com.apple.openscripting 1.2.8 (???) <0674c4e3353c677c9f58df3297ae559b> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScript ing.framework/Versions/A/OpenScripting 0x7fff83fa3000 - 0x7fff83fdfff7 libGLImage.dylib ??? (???) <02258bcdbe8defdb254acc077a81dd9b> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage. dylib 0x7fff83fe0000 - 0x7fff83ff1fff com.apple.speech.synthesis.framework 3.7.1 (3.7.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x7fff83ff2000 - 0x7fff8406cff3 com.apple.CoreText 2.0.3 (???) <827bbfef670df72316719c25bfb39915> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreText.framework/Versions/A/CoreText 0x7fff8406d000 - 0x7fff841f8ffb libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0x7fff841f9000 - 0x7fff8420affd libz.1.dylib ??? (???) /usr/lib/libz.1.dylib 0x7fff8420b000 - 0x7fff842befef com.apple.DesktopServices 1.4.7 (1.4.7) /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/D esktopServicesPriv 0x7fff842bf000 - 0x7fff84677fff libLAPACK.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libLAPACK.dylib 0x7fff84678000 - 0x7fff84743fef com.apple.ColorSync 4.5.1 (4.5.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ColorSync.framework/Versions/A/ColorSync 0x7fff84744000 - 0x7fff84847feb com.apple.CoreData 100.1 (186) <074abc7f43f81f7885e4d0674a8be4bc> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x7fffffe00000 - 0x7fffffe01780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0xfffffffffffec000 - 0xfffffffffffeffff libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib SYSTEM CONFIG Model: MacPro3,1, BootROM MP31.006C.B05, 8 processors, Quad-Core Intel Xeon, 2.8 GHz, 32 GB Graphics: kHW_ATIrv630Item, ATI Radeon HD 2600, spdisplays_pcie_device, 256 MB Memory Module: DIMM Riser B/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Bluetooth: Version 2.1.3f8, 2 service, 1 devices, 1 incoming serial ports Network Service: Ethernet 2, Ethernet, en1 PCI Card: ATI Radeon HD 2600, display, Slot-1 Serial ATA Device: WDC WD3200AAJS-41VWA0, 298.09 GB Parallel ATA Device: PIONEER DVD-RW DVR-112D USB Device: Keyboard Hub, (null) mA USB Device: Apple Optical USB Mouse, (null) mA USB Device: Apple Keyboard, (null) mA USB Device: hub_device, (null) mA USB Device: Apple Cinema HD Display, (null) mA USB Device: Keyspan USA-28Xb, (null) mA USB Device: Bluetooth USB Host Controller, (null) mA FireWire Device: built-in_hub, unknown_value, unknown_speed FireWire Device: My Book, WD, 800mbit_speed FireWire Device: unknown_device, unknown_value, unknown_speed -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From jaakko.sipari at gmail.com Thu Jan 22 03:00:03 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 22 Jan 2009 12:00:03 +0200 Subject: [Rxtx] RXTX compilation with GCJ possible? Message-ID: <901f25b80901220200s53792317o374b80cbb6066a52@mail.gmail.com> Hi! Does anyone have experience on using RXTX in a GCJ compiled Java application? I'm interested whether this is possible in Windows and/or in Linux platforms. And of course what does it take to get it work, or does it just work out of the box. Ultimately my aim here would be to move to a more time deterministic system by utilizing GCJ, jRate & Javolution and possibly run the RXTX (and other important) threads at a priority higher than the garbage collector. This of course would require some modification for the RXTX threads to run in a Javolution pool context or non allocating real time contexts so they wouldn't produce any garbage, but that's something to hack on later. For now I'd just like to know if there are any obstacles on the road to compiling & running RXTX with GCJ. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/5592681a/attachment-0008.html From jmudd at dtiweb.net Thu Jan 22 06:21:03 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Thu, 22 Jan 2009 08:21:03 -0500 Subject: [Rxtx] Hot unplugging of a USB device References: <4977BEEA.4020708@gatworks.com> Message-ID: U. George, Thanks for the information. How did you resolve your USB/GPS device on Linux? My application has to run on both Linux and Windows eventually. Thanks, Jerry -----Original Message----- From: U. George [mailto:netbeans at gatworks.com] Sent: Wednesday, January 21, 2009 7:34 PM To: Jerry Mudd Cc: rxtx at qbang.org Subject: Re: [Rxtx] Hot unplugging of a USB device > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From m.kirkland at comcast.net Thu Jan 22 09:21:01 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Thu, 22 Jan 2009 08:21:01 -0800 Subject: [Rxtx] Serial port control lines change with call to getPortIdentifiers() on Linux Message-ID: <94443DEFFD574B6CA8DDB2B201D9E007@bengal.net> Hi All ! I have noticed an issue with RXTX on Ubuntu Linux 8.10 that has prevented me from being able to use RXTX on Linux. I have noticed this issue on both the rxtx 2.1.7 and the new rxtx2.2pre1. When I execute the following line to get the ports on a system - java.util.Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); Both DTR and RTS become active on ttyS0 and only ttyS0, not ttyS1 (I only have 2 ports). I see this prior to opening any ports or making any other calls to RXTX. I have stepped it though with the debugger and I am sure this is the trigger. My application uses these control lines to perform functions other then the standard flow control so it is critical that I be able to control them exactly. I would also think that folks using RXTX for more standard serial IO would also have issues with devices starting to talk before a listener was ready. I checked Windows XP and I do not see this issue (but I only have a com1 on the Windows computer). I also noticed that the DTR line blips when setting up a port on 2.2.pre1 like it does on 2.1.7r2. This it the same issue that the folks at http://www.codeskin.com/ patched. I see this issue on both Linux and Windows XP. Any help or clues would be greatly appreciated. If I can provide any additional info or do any testing I would be glad to help out to get version 2.2 in top shape for release. BTW I have written a simple dynamic loader to load the RXTX jar and native code that is drive by the os.name and os.arch system properties. I would be more then happy to contribute this to the project if folks though it would be useful. Its more convenient then having to manage copying the files around to various JVM's. TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/eab26bae/attachment-0007.html From josefk_5 at yahoo.com Fri Jan 23 09:44:06 2009 From: josefk_5 at yahoo.com (Josef Kahsay) Date: Fri, 23 Jan 2009 08:44:06 -0800 (PST) Subject: [Rxtx] Help on Accessing RS232 Message-ID: <509617.88308.qm@web38205.mail.mud.yahoo.com> Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS From m.kirkland at comcast.net Sat Jan 24 01:28:52 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Sat, 24 Jan 2009 00:28:52 -0800 Subject: [Rxtx] Help on Accessing RS232 In-Reply-To: <509617.88308.qm@web38205.mail.mud.yahoo.com> References: <509617.88308.qm@web38205.mail.mud.yahoo.com> Message-ID: <665887C02E1446708CE392FE0BD73D79@bengal.net> It seems to me that you are having a classic java classpath issue. Java classpath issues can be annoying to solve sometimes. As some random guesses I would suggest you look at the following. 1 - You might not be running the JVM from the location that you think you are (gets me all the time). I which Windows had a which command. 2 - You don't mention what development environment you are using like Eclipse etc., and if you are trying to run the demo from inside the development environment. If so, do whatever is appropriate for the development environment to control the classpath. In Eclipse this would involve adding a "User Library" to point to the jar and native code. 3 - Once you get the classpath ok, the next thing you might run into is not being able to load the native library. 4 - I have found that on XP I can place the RXTX jar and native library in the same directory as my application's jar file (and a class-path entry in the application's jar file manifest) and it all works. 5 - If you need more control of managing different versions of RXTX for different OS platforms, I have a dynamic RXTX loader I can send you (but I recommend getting the simple case working first). Let me know if this helps. Mike -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Josef Kahsay Sent: Friday, January 23, 2009 8:44 AM To: rxtx at qbang.org Subject: [Rxtx] Help on Accessing RS232 Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jacomoman at hotmail.com Mon Jan 26 12:12:27 2009 From: jacomoman at hotmail.com (Joseph Schmoley) Date: Mon, 26 Jan 2009 11:12:27 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: Message-ID: Hi All, First, let me thank you all for your effort on this excellent project. I've been using the Win32 binaries in the 2.1-7r2 package without any problems on WinXP Pro (32-bit). I then tried the .jnilib of the same version on my Mac OSX 10.5 64-bit darwin and got the familiar UnsatisfiedLinkError problem. I read up on all the mailing list archive messages and found this one (http://mailman.qbang.org/pipermail/rxtx/2008-May/2436699.html) suggesting that perhaps rxtx-devel from CVS would have a fix. So I got latest rxtx-devel + commapi-0-0-1 as suggested by the CVS page at rxtx.org. I even set my CFLAGS and LDFLAGS to include "-arch x86_64 -arch ppc64", but as it turned out, the latest configure script didn't need it. In any case, I configured and built rxtx-devel with no errors (that I could see) and transferred the resulting i386-apple-darwin9.6.0/librxtxSerial.jnilib to where my java.library.path is pointing to and ran my test class. Whereas before I was getting UnsatisfiedLinkError, I now simply get this: Invalid memory access of location 22d927c8 rip=22356420 Invalid memory access of location 22d9292c rip=22357540 [error occurred during error reporting (null), id 0xa] ./run-class.sh: line 10: 15647 Segmentation fault java -Djava.library.path=./lib/native -Dapp.logging.file.path=./log/runtime.log -classpath .:${MYCP} ${CLASSNAME} "${CMD}" run-class.sh is simply a script I've got to run my test class and all that class does is invoke the RXTX API, first one being: CommPortIdentifier.getPortIdentifiers(). Has anyone had any luck with getting latest CVS sources to work on Mac OS X 10.5 64-bit? Any help/pointers would be greatly appreciated. Thank you in advance. -Jac I've attached my configure and make output as txt files. Here's all my build/machine environment info, as per the troubleshooting wiki page: Mac OS X 10.5.6 (9G55) ----------------------------------------------- /usr/bin/java -version java version "1.6.0_07" Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153) Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode) ----------------------------------------------- Darwin my-macbook.local 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 ----------------------------------------------- autoconf (GNU Autoconf) 2.61 Copyright (C) 2006 Free Software Foundation, Inc. This is free software. You may redistribute copies of it under the terms of the GNU General Public License . There is NO WARRANTY, to the extent permitted by law. Written by David J. MacKenzie and Akim Demaille. ----------------------------------------------- automake (GNU automake) 1.10 Written by Tom Tromey and Alexandre Duret-Lutz . Copyright 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ----------------------------------------------- $ libtool -V Apple Computer, Inc. version cctools-698.1 ----------------------------------------------- GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program built for powerpc-apple-darwin9.0 ----------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: my-configure.out.txt Type: application/octet-stream Size: 6934 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090126/89d9c7f6/attachment-0006.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: my-make.out.txt Type: application/octet-stream Size: 7737 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090126/89d9c7f6/attachment-0007.obj From kintel at sim.no Mon Jan 26 16:16:19 2009 From: kintel at sim.no (Marius Kintel) Date: Tue, 27 Jan 2009 00:16:19 +0100 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: Message-ID: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Hi Jac, I've had the same issue, and I suggested a patch to partially fix it a while back: http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html I don't know the status of this in the current incarnation of the rxtx code and I have reverted to Java-1.5 since then.. ~/= Marius -- We are Elektropeople for a better living. From tjarvi at qbang.org Tue Jan 27 08:08:54 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 27 Jan 2009 08:08:54 -0700 (MST) Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: On Tue, 27 Jan 2009, Marius Kintel wrote: > Hi Jac, > > I've had the same issue, and I suggested a patch to partially fix it a > while back: > http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html > > I don't know the status of this in the current incarnation of the rxtx > code and I have reverted to Java-1.5 since then.. > > ~/= Marius > > -- > We are Elektropeople for a better living. > Hmm. That did not get in. I can add it and put a new prerelease out this week. The eis must be a regression. I was sure we fixed that. -- Trent Jarvi tjarvi at qbang.org From jacomoman at hotmail.com Tue Jan 27 08:48:16 2009 From: jacomoman at hotmail.com (Joseph Schmoley) Date: Tue, 27 Jan 2009 07:48:16 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: That would be excellent Trent. I've got a project partially on hold because of this. It runs great on Win32 (XP/Vista), it just has to do the same on Mac 64-bit and Linux 32-bit. I look forward to this pre-release. Again, thanks a bunch to you and all the other code contributors for this excellent project. I wish I could donate something to you guys. I couldn't find a donation link anywhere. RxTx has been a great help with my project. -Jac From: Trent Jarvi Sent: Tuesday, January 27, 2009 7:08 AM To: Marius Kintel Cc: Joseph Schmoley ; rxtx at qbang.org Subject: Re: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit On Tue, 27 Jan 2009, Marius Kintel wrote: > Hi Jac, > > I've had the same issue, and I suggested a patch to partially fix it a > while back: > http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html > > I don't know the status of this in the current incarnation of the rxtx > code and I have reverted to Java-1.5 since then.. > > ~/= Marius > > -- > We are Elektropeople for a better living. > Hmm. That did not get in. I can add it and put a new prerelease out this week. The eis must be a regression. I was sure we fixed that. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090127/bbd287bb/attachment-0001.html From bschlining at gmail.com Tue Jan 27 09:38:26 2009 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 27 Jan 2009 08:38:26 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: > That would be excellent Trent. I've got a project partially on hold > because of this. It runs great on Win32 (XP/Vista), it just has to do the > same on Mac 64-bit and Linux 32-bit. I look forward to this pre-release. > I'm in the same spot too. Looking forward to the pre-release! -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090127/2275013b/attachment-0001.html From andrew.paverd at rorotika.com Wed Jan 28 03:14:58 2009 From: andrew.paverd at rorotika.com (Andrew Paverd) Date: Wed, 28 Jan 2009 12:14:58 +0200 Subject: [Rxtx] RXTX not working on Solaris Message-ID: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Hi all, I am attempting to use RXTX on a Sun SPARC server running Solaris. I have tried the binaries from both the latest release (2.1-7) and the pre-release (2.2pre1). The 2.1-7 driver gives the following error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: fatal: libgcc_s.so.1: open failed: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)" I'm not sure what this "libgcc_s.so.1" file does in terms of RXTX but its absence is preventing the application from running. With the 2.2pre1 binary, the application loads without any issue but does not detect any comm-ports. I know that there are multiple ports available because when using the Sun javax.comm library for Solaris SPARC, the ports are all correctly discovered and the application can read from and write to them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in the 2.2 release. Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if so, how did you do it (which versions did you use etc.)? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090128/a97b220d/attachment-0001.html From tjarvi at qbang.org Wed Jan 28 17:01:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 28 Jan 2009 17:01:50 -0700 (MST) Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: On Wed, 28 Jan 2009, Andrew Paverd wrote: > > Hi all, > > ? > > I am attempting to use RXTX on a Sun SPARC server running Solaris. I have > tried the binaries from both the latest release (2.1-7) and the pre-release > (2.2pre1). > > ? > > The 2.1-7 driver gives the following error: > > ? > > ?Exception in thread "main" java.lang.UnsatisfiedLinkError: > /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: > fatal: libgcc_s.so.1: open failed: No such file or directory > > ??????? at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > ??????? at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) > > ??????? at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) > > ??????? at java.lang.Runtime.loadLibrary0(Runtime.java:823) > > ??????? at java.lang.System.loadLibrary(System.java:1030) > > ??????? at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)? > > ? > > I?m not sure what this ?libgcc_s.so.1? file does in terms of RXTX but its > absence is preventing the application from running. > > ? > > With the 2.2pre1 binary, the application loads without any issue but does > not detect any comm-ports. I know that there are multiple ports available > because when using the Sun javax.comm library for Solaris SPARC, the ports > are all correctly discovered and the application can read from and write to > them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in > the 2.2 release. > > ? > > Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if > so, how did you do it (which versions did you use etc.)? > > ? Hi Andrew ld.so/libgcc_s.so are part of GNU gcc/ld. They are available for solaris. I'm not sure how to link them without requiring them. It is also possible to compile rxtx with Sun's compiler if you have it. Perhaps someone here knows how to get rxtx compiled on Solaris using gcc without requiring those libs by everyone? -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Jan 28 17:39:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 28 Jan 2009 17:39:08 -0700 (MST) Subject: [Rxtx] Problem on 'Trouble Shooting' wiki page. Message-ID: It has been pointed out that the rxtx wiki page says usermod -G may be used to update the group a user is in. http://rxtx.qbang.org/wiki/index.php/Trouble_shooting The corrected text now says to use usermod -aG to add the user to a group in addition to their current group(s). The previous -G version would replace the users current groups with the new group. Replacing group information can cause significant problems for end users. If you have information based upon the wiki, please update your content. Thanks, -- Trent Jarvi tjarvi at qbang.org From andrew.paverd at rorotika.com Thu Jan 29 02:15:35 2009 From: andrew.paverd at rorotika.com (Andrew Paverd) Date: Thu, 29 Jan 2009 11:15:35 +0200 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Thanks for the advice Trent - I was originally using the precompiled librxtxSerial.so. I've subsequently compiled rxtx for Solaris (using gcc) and after copying the libgcc_s.so file to my .../jre/lib/sparc directory, the library loads. However, it does not detect any ports. When I call the getComPortIdentifiers() nothing is returned and I can't connect to any port. Sun's javax.comm package detects and can connect to all the ports. This is the same as when I tried the 2.2pre1 library. Are there any extra steps that must be taken to detect ports on Solaris? (user is member of uucp group) Thanks, Andrew From tristan.dyer at cgi.com Thu Jan 29 05:57:25 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 29 Jan 2009 07:57:25 -0500 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D030BE152@MTL-MSG-02.cgiclients.com> Andrew, I had the same problem, but before I got too far the scope of my project changed, and I don't have to support Solaris anymore.. I was getting a weird error, file does not exist but should, or something like that. The project ended before I figured out why. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Andrew Paverd Sent: January 29, 2009 5:16 AM To: 'Trent Jarvi' Cc: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working on Solaris Thanks for the advice Trent - I was originally using the precompiled librxtxSerial.so. I've subsequently compiled rxtx for Solaris (using gcc) and after copying the libgcc_s.so file to my .../jre/lib/sparc directory, the library loads. However, it does not detect any ports. When I call the getComPortIdentifiers() nothing is returned and I can't connect to any port. Sun's javax.comm package detects and can connect to all the ports. This is the same as when I tried the 2.2pre1 library. Are there any extra steps that must be taken to detect ports on Solaris? (user is member of uucp group) Thanks, Andrew _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Martin.Oberhuber at windriver.com Thu Jan 29 06:15:01 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:15:01 +0100 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2326@ism-mail03.corp.ad.wrs.com> Hi Andrew & Paverd, the trick of compiling with gcc on Solaris such that the libgcc_s.so library is not needed at runtime is that gcc itself must be configured and compiled with special options: cd gcc-src ./configure --disable-shared make Using that specially compiled gcc, you can then build the RXTX library: setenv PATH $HOME/my-gcc/bin:$PATH cd rxtx mkdir build-solaris && cd build-solaris ../configure --disable-lockfiles make For more details, see the original bug and its attachments: http://bugzilla.qbang.org/show_bug.cgi?id=73 An rxtx-2.1-7r2 build for Solaris without libgcc_s dependency is available from the Eclipse packages at http://rxtx.qbang.org/eclipse/downloads/ Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Andrew Paverd Sent: Mittwoch, 28. J?nner 2009 11:15 To: rxtx at qbang.org Subject: [Rxtx] RXTX not working on Solaris Hi all, I am attempting to use RXTX on a Sun SPARC server running Solaris. I have tried the binaries from both the latest release (2.1-7) and the pre-release (2.2pre1). The 2.1-7 driver gives the following error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: fatal: libgcc_s.so.1: open failed: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)" I'm not sure what this "libgcc_s.so.1" file does in terms of RXTX but its absence is preventing the application from running. With the 2.2pre1 binary, the application loads without any issue but does not detect any comm-ports. I know that there are multiple ports available because when using the Sun javax.comm library for Solaris SPARC, the ports are all correctly discovered and the application can read from and write to them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in the 2.2 release. Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if so, how did you do it (which versions did you use etc.)? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090129/d6d73f3e/attachment.html From Martin.Oberhuber at windriver.com Thu Jan 29 06:16:38 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:16:38 +0100 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E232A@ism-mail03.corp.ad.wrs.com> Hi Andrew, one thing I did notice on Solaris was that after closing a port, the Solaris Kernel seems to have some timeout before it can be re-opened. So, when you try it again, make sure that no other application hogs the port or has been hogging it shortly before. It may make sense to try a few times. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Andrew Paverd > Sent: Donnerstag, 29. J?nner 2009 10:16 > To: 'Trent Jarvi' > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX not working on Solaris > > Thanks for the advice Trent - I was originally using the > precompiled librxtxSerial.so. I've subsequently compiled rxtx > for Solaris (using gcc) and after copying the libgcc_s.so > file to my .../jre/lib/sparc directory, the library loads. > > However, it does not detect any ports. When I call the > getComPortIdentifiers() nothing is returned and I can't > connect to any port. Sun's javax.comm package detects and can > connect to all the ports. This is the same as when I tried > the 2.2pre1 library. > > Are there any extra steps that must be taken to detect ports > on Solaris? (user is member of uucp group) > > Thanks, > > > Andrew > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From Martin.Oberhuber at windriver.com Thu Jan 29 06:24:05 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:24:05 +0100 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2335@ism-mail03.corp.ad.wrs.com> Hi Greg, sorry for the late response (just catching up on E-Mails). I do not plan to create any Eclipse bundles before rxtx-2.2 is released. Creating the packages is a bit of an effort, which I'd rather postpone until the release, and then do it only once. In the meantime, if you need it for testing, I think it should be easy to take the existing Eclipse bundles/fragments and simply replace any new DLL's / so's in them, plus use WinZIP to replace the .class files in the Java bundle. For Eclipse, it will still look like rxtx-2.1-7 but in reality it will be your own latest build. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Trent Jarvi > Sent: Sonntag, 04. J?nner 2009 20:42 > To: Greg Johnson > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] [Announce] RXTX 2.2pre1 is available. > > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse > packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be > a popular > spam abuse page. I'll put a license and download link on there. All > other pages are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > > > Hi Trent, > > The download link on rxtx.org > (http://users.frii.com/jarvi/rxtx/) loops back > > to rxtx.org, and the wiki doesn't seem to have a link (top > level at least) to > > download. I think Martin had been generating > (fantastically useful) Eclipse > > bundles, as well - are these available for 2.2pre1 also? > > > > Many thanks to everyone for their work - rxtx is an > essential part of our > > product, and we have been keenly awaiting this release. > > > > Regards, > > greg > > > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > > > >> > >> The binaries, source and pending wiki move are now announced on > >> http://www.rxtx.org. After this has baked, we can put > the web install in. > >> > >> Changes in rxtx 2.2 (If I missed something let me know): > >> ... snip ... > >> > >> -- > >> Trent Jarvi > >> tjarvi at qbang.org_______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > -- > > Greg Johnson, PhD > > Director of Engineering > > http://www.rbr-global.com > > greg.johnson at rbr-global.com > > +1.613.233.1621 (GMT-5) office > > > > > > See us at: Ocean Business 2009, Southampton, England, March > 31 - April 1, > > 2009 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From Martin.Oberhuber at windriver.com Thu Jan 29 06:32:57 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:32:57 +0100 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> Hi Tristan, > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); I think that this code is wrong. User code must not call the RXTXCommDriver constructor, since you cannot initialize it properly. What you can do to announce previously unknown port names is this: System.setProperty("gnu.io.rxtx.SerialPorts","/dev/term/a"); before you first access any RXTX function. For details, see the code in RXTXCommDriver#registerSpecifiedPorts() > What is the output of System.getProperty("os.name") on OpenSolaris? I didn't see any response of yours to this question from Trent. What does OpenSolaris output? Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Trent Jarvi > Sent: Mittwoch, 31. Dezember 2008 20:04 > To: Dyer, Tristan > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX for OpenSolaris 2008.11 > > > > On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > > > > Hi, > > > > I have tried building the rxtx library for OpenSolaris 2008.11. > > > > It seemed to build fine without errors, however code such as > > > > ????? java.util.Enumeration portList > > ???????? = CommPortIdentifier.getPortIdentifiers(); > > ????? boolean found = false; > > ????? while (portList.hasMoreElements()) { > > ???????? portId = (CommPortIdentifier) portList.nextElement(); > > ???????? System.out.println(" " + portId.getName()); > > ???????? if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > > ?????????? ???? ?? System.out.println("found"); > > ?????????????? found = true; > > ?????????????? break; > > ??????????? } > > ???????? } > > ????? } > > Will output nothing. > > > > Or rather it seems as if there are no ports found by RXTX. > This code works > > on Ubuntu8.04 and winXP. > > > > If I Add the port manually and then try and open the port > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > > ????? try{ > > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > > ????? } > > ????? catch(Exception e){ > > ??? ??? ? System.out.println("NoSuchPortException"); > > ??? ??? ? //ignore > > ????? } > > ????? try { > > ??????? ???????? System.out.println("opening port"); > > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > > WAIT_TO_OPEN); > > ??????????? connected = true; > > ??????????? System.out.println("Connected to port " + > portId.getName()); > > ???????? } catch (PortInUseException p) { > > ??????????? if (DEBUG) { > > ?????????????? System.err.println(p); > > ??????????? } > > ??????????? port = null; > > ??????????? portId = null; > > ??????????? System.out.println("PortInUseException"); > > ??????????? p.printStackTrace(); > > ???????? } > > > > I will get the following, but not the NoSuchPortException. > > > > java.lang.reflect.InvocationTargetException > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Caused by: java.lang.NullPointerException > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:296) > > > > ??????? ... 7 more > > > > > > As well as > > > > java.lang.NullPointerException > > ??????? at > gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > > ??????? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > > ??????? at > > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:255) > > > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > > > Did I build it wrong? Or is there a problem with > OpenSolaris that will > > prevent this from working? Or am I missing something > incredibly simple? > > > > As well OpenSolaris is running inside a VM with COM1 mapped to > > COM1(VirtualBox) which I believe maps it to /dev/term/a > > > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > > > > > Hi Tristan? > > What is the output of System.getProperty("os.name") on > OpenSolaris? We > have logic like the following in RXTX to handle platform specific > information: > > if ( osName.equals("Solaris") || osName.equals("SunOS")) > > Which may not be getting hit. The result if you will never > call private > void checkSolaris(String PortName, int PortType). > > It could also result in Solaris specific settings not being > set in the > Makefile. > > > The os.name is displayed when you run the configure script. > > -- > Trent Jarvi > tjarvi at qbang.org > From Martin.Oberhuber at windriver.com Thu Jan 29 06:38:20 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:38:20 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] how do you dynamically reload native libraries? In-Reply-To: References: Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2341@ism-mail03.corp.ad.wrs.com> Hi Douglas, Eclipse / OSGi may be doing what you want. It does say that multiple versions of a lib can co-exist at the same time, when the MANIFEST.MF doesn't specify a lib as a singleton. I'm not sure though if or how that would work with native libs. Eclipse bundles for RXTX-2.1-7r2 are available on http://rxtx.qbang.org/eclipse/downloads/ You could build RXTX-2.2pre and then manually create those Eclipse bundles just by adding the MANIFEST.MF to the JAR with the version number exchanged. Then you should be able to try it out. If you do, let me know how it goes... Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Samstag, 27. Dezember 2008 15:00 > To: rxtx at qbang.org; lyon at docjava.com > Subject: [Suspected Spam][Blocked Sender][Rxtx] how do you > dynamically reload native libraries? > > Hi All, > I am trying to test multiple versions of the RXTX native libraries > in a single JVM. > > Each RXTX library instance can share a single virtual machine, but > must have an isolated context class loader. > A context class loader maps a thread to specific classes and > resources. > When the thread dies, the classes and resources are freed. > > Is there some way to have multiple context class loaders that can > load different native method > library implementations? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0026.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0026.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0024.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0024.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0024.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0024.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0023.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0021.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0021.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0021.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0021.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0021.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0018.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0018.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0018.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment-0017.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0017.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment-0017.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment-0017.html From tjarvi at qbang.org Wed Jan 14 18:56:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 14 Jan 2009 18:56:50 -0700 (MST) Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Message-ID: On Wed, 14 Jan 2009, Jaakko Sipari wrote: > Hi (again)! > > Could someone clarify what these methods actually do and are they even > implemented? Do I get into trouble with buffer values of 0 (if I want to > handle the buffers myself)? > rxtx does not have buffers. It was not clear to me at the time why there would be a buffer when java already provides buffered input and output streams that can sit on top of rxtx. One reason I can see for implementing buffers in rxtx is to get data off the port so select() can block. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Wed Jan 14 23:23:08 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 15 Jan 2009 08:23:08 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> Message-ID: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Here's the same message for the list also. Forgot to do "Reply to all" ---------- Forwarded message ---------- From: Jaakko Sipari Date: Thu, Jan 15, 2009 at 8:22 AM Subject: Re: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize To: Trent Jarvi On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! >> >> Could someone clarify what these methods actually do and are they even >> implemented? Do I get into trouble with buffer values of 0 (if I want to >> handle the buffers myself)? >> >> > rxtx does not have buffers. It was not clear to me at the time why there > would be a buffer when java already provides buffered input and output > streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data off > the port so select() can block. > So basically those methods have currently no effect at all? - Jaakko -- Jaakko Sipari tel. +358451238191 eMail. jaakko.sipari at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090115/8b4c47c0/attachment-0016.html From tjarvi at qbang.org Thu Jan 15 18:37:12 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 15 Jan 2009 18:37:12 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: On Thu, 15 Jan 2009, Jaakko Sipari wrote: > Here's the same message for the list also. Forgot to do "Reply to all" > > ---------- Forwarded message ---------- > From: Jaakko Sipari > Date: Thu, Jan 15, 2009 at 8:22 AM > Subject: Re: [Rxtx] The functionality behind setInputBufferSize & > setOutputBufferSize > To: Trent Jarvi > > > On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! > > Could someone clarify what these methods actually do > and are they even > implemented? Do I get into trouble with buffer > values of 0 (if I want to > handle the buffers myself)? > > > rxtx does not have buffers. ?It was not clear to me at the time why > there would be a buffer when java already provides buffered input and > output streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data > off the port so select() can block. > > > So basically those methods have currently no effect at all? > Correct. You can use BufferedInputStream and BufferedOutputStream from the Java API once you get the Input/OutputStream from rxtx. But changing the input and output buffer size in rxtx is not going to change behavior. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Fri Jan 16 01:22:37 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Fri, 16 Jan 2009 10:22:37 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> > So basically those methods have currently no effect at all? >> >> > Correct. You can use BufferedInputStream and BufferedOutputStream from the > Java API once you get the Input/OutputStream from rxtx. But changing the > input and output buffer size in rxtx is not going to change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > I assume there still is some kind of buffer in rxtx (or the serial port driver) in case of processing delays. I mean, if the serial port gives data faster than can be read from the Java program using rxtx it isn't just thrown away, right? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090116/3bd9a52e/attachment-0015.html From tjarvi at qbang.org Fri Jan 16 05:17:24 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 16 Jan 2009 05:17:24 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> Message-ID: On Fri, 16 Jan 2009, Jaakko Sipari wrote: > > So basically those methods have currently no effect > at all? > > > Correct. ?You can use BufferedInputStream and BufferedOutputStream > from the Java API once you get the Input/OutputStream from rxtx. ?But > changing the input and output buffer size in rxtx is not going to > change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > > > > I assume there still is some kind of buffer in rxtx (or the serial port > driver) in case of processing delays. I mean, if the serial port gives data > faster than can be read from the Java program using rxtx it isn't just > thrown away, right? > The UART can usually hold a few bytes. The kernel driver can buffer the input. In practice, it works. With Sun commapi, the typical application has 4 buffers between the user and the incomming data. With rxtx, it is 3. BufferedInputStream -> commapi/rxtx -> kernel driver -> UART If you really do run into overflows on the UART, then hardware flow control is what you should be using and tinkering with rxtx to avoid it is not a very sound approach. -- Trent Jarvi tjarvi at qbang.org From llowrey at nuclearwinter.com Sun Jan 18 12:49:39 2009 From: llowrey at nuclearwinter.com (Larkin Lowrey) Date: Sun, 18 Jan 2009 13:49:39 -0600 Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain Message-ID: <497387D3.9040201@nuclearwinter.com> After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when running code that uses RXTXComm. The crashes only occur when using 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. As far as I can tell, the crash happens immediately on start. I can't see any evidence of much, if anything, happening before the crash. The code used to work and only stopped working after the "upgrade" to FC10. I have tried RXTX v2.1 and 2.2pre1. Any ideas? Here's the error: # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode linux-amd64) # Problematic frame: # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 --Larkin From tjarvi at qbang.org Mon Jan 19 17:48:34 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 19 Jan 2009 17:48:34 -0700 (MST) Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain In-Reply-To: <497387D3.9040201@nuclearwinter.com> References: <497387D3.9040201@nuclearwinter.com> Message-ID: On Sun, 18 Jan 2009, Larkin Lowrey wrote: > After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when > running code that uses RXTXComm. The crashes only occur when using > 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. > > As far as I can tell, the crash happens immediately on start. I can't > see any evidence of much, if anything, happening before the crash. > > The code used to work and only stopped working after the "upgrade" to > FC10. I have tried RXTX v2.1 and 2.2pre1. > > Any ideas? > > Here's the error: > > # > # An unexpected error has been detected by Java Runtime Environment: > # > # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 > # > # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode > linux-amd64) > # Problematic frame: > # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 > > > --Larkin Hi Larkin, I can think of 2 segv's in rxtx that may apply. Both are fixed in rxtx 2.2pre.. The first was that pointers required by nativeDrain needed to be stored in something larger than a 32 bit integer in java. This resulted in a crash like you see the first time the 'nativedrain' thread tried to use the pointer. The second was a concurrency issue George resolved with synchronization. The crash was usually during close but happened in the 'nativedrain' thread. (eventLoop) As mentioned, these are both fixed in the prerelease. There is a class provided in recent versions of RXTX that allow you confirm the version being used: gnu.io.RXTXVersion with member methods getVersion() and nativeGetVersion(). This allows you to confirm that you are indeed using the version you think you are. -- Trent Jarvi tjarvi at qbang.org From alexandrepoletto at gmail.com Wed Jan 21 11:48:07 2009 From: alexandrepoletto at gmail.com (Alexandre Poletto) Date: Wed, 21 Jan 2009 16:48:07 -0200 Subject: [Rxtx] work in windows but dont work in linux Message-ID: hi folks, I have an application to communicate with the serial port using rxtx, in the windows os my application works well, but when i try to run in the linux os i open the port (in windows "COM1", in Linux "/dev/ttyS0") send my commandes but i never receive any answer. I'm using ubuntu 8.10 and java 1.5, there is any configuration in that i'm missing? Thanks for the help! ps: Sorry form my bad english :( -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/70baea51/attachment-0009.html From jmudd at dtiweb.net Wed Jan 21 14:08:04 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Wed, 21 Jan 2009 16:08:04 -0500 Subject: [Rxtx] Hot unplugging of a USB device Message-ID: Looking to see if the issues surrounding an uplugging of a USB device have been resolved. I see from the mail list archives and bug reports that others have noted this issue. I have a USB GPS Receiver that is plugged into a Windows (XP) system and am using Netbeans 6.5 and Java jdk 1.6 and RXTX 2.1.7 and 2.2pre1. In the thread that is reading data via listening for a SerialEvent I can capture a Java IOException: No error in readArray. The application is essentially hung at this point. Only a termination of the application will clear it up and not leave the port hung. I had read in the archives that this is because the event loop in the native code portion is continually putting out the exceptions. I had also seen that this might be addressed in future releases. Any help is appreciated. Thanks, Jerry ________________________________ Jerry Mudd Senior Programmer 21795 Shangri-La Drive, Ste C Lexington Park, MD 20653 (301) 737-8893 (301) 737-8897 Fax jmudd at dtiweb.net www.dtiweb.net This message may contain sensitive, proprietary and/or privileged information. Disclosure is not authorized unless provided in writing by Defense Technologies, Inc. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0009.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 6296 bytes Desc: image001.gif Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0009.gif From netbeans at gatworks.com Wed Jan 21 17:33:46 2009 From: netbeans at gatworks.com (U. George) Date: Wed, 21 Jan 2009 19:33:46 -0500 Subject: [Rxtx] Hot unplugging of a USB device In-Reply-To: References: Message-ID: <4977BEEA.4020708@gatworks.com> > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:34 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:34 +1100 Subject: [Rxtx] Part 1 of 2 parts re rxtx 2.2 pre.. and OSX Message-ID: Hi, I have tried out the latest version of rxtx on a mac and can report that running with ImageJ (32 bit ) all seems to be fine. However when I attempt to use it with ImageJ64, I get a crash whenever the serial port is used. The details follow. What I did. Ran our plug-in in ImageJ 64 bit (1.42g) for Measuring, which is using the latest rxtx (the beta 2.2 compiled on 30 December 2008) for MacOSX 10.5.x) I installed this by putting the two files in the directory ~ LIBRARY/JAVA/EXTENSIONS. The Plug-in uses the serial port. The window we put up to show the numbers from the stage appeared, but only with the default "0" (zero) in each row, which is what we put there until we get data back from the port and the device attached. Then it crashed. I should point out that this all works fine using ImageJ (32 bit) 1.42g, on the same platform. So the only difference is the use of ImageJ 64 bit, and I guess the version of rxtx for 64 bit. I hope that cleverer people than me can throw some light onto this little problem. ImageJ64 seems to work ok until rxtx is called, although I haven't tried much so far, just some 3D rendering with 1 Gb of image data, which all went well, apart from the fact that the data was marginal. I am now showing the data supplied by the report to Apple window. This has three tabs, one to write your information in, one called Problem Details, and the third called SYSTEM CONFIG. These are pasted in below. Best wishes Noel Problem Details Process: JavaApplicationStub [463] Path: /Applications/ImageJ/ImageJ64.app/Contents/MacOS/JavaApplicationStub Identifier: gov.nih.info.rsb.ImageJ Version: ??? (10.2) Code Type: X86-64 (Native) Parent Process: launchd [398] Date/Time: 2009-01-19 10:48:09.342 +1100 OS Version: Mac OS X 10.5.6 (9G55) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000000029507c8 Crashed Thread: 16 Application Specific Information: Java information: Exception type: Bus Error (0xa) at pc=0x00000006ff70f418 Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0_07-b06-57 mixed mode macosx-amd64) Current thread (0x00000001020de800): JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] Stack: [0x0000000702851000,0x0000000702951000] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j gnu.io.RXTXPort.readByte()I+0 j gnu.io.RXTXPort$SerialInputStream.read()I+81 j SerialConnection.serialEvent(Lgnu/io/SerialPortEvent;)V+41 j gnu.io.RXTXPort.sendEvent(IZ)Z+382 v ~BufferBlob::StubRoutines (1) j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~BufferBlob::StubRoutines (1) Java Threads: ( => current thread ) =>0x00000001020de800 JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] 0x00000001020e8800 JavaThread "Measure XYZ" [_thread_blocked, id=44384256, stack(0x0000000702954000,0x0000000702a54000)] 0x0000000102001000 JavaThread "DestroyJavaVM" [_thread_blocked, id=25169920, stack(0x0000000101001000,0x0000000101801000)] 0x00000001020da800 JavaThread "SocketListener" [_thread_in_native, id=29671424, stack(0x0000000701b4c000,0x0000000701c4c000)] 0x00000001020b4800 JavaThread "AWT-EventQueue-0" [_thread_in_Java, id=-27992064, stack(0x00000006fe44e000,0x00000006fe54e000)] 0x0000000102096000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=-34344960, stack(0x00000006fde3f000,0x00000006fdf3f000)] 0x0000000102078000 JavaThread "AWT-Shutdown" [_thread_blocked, id=-58392576, stack(0x00000006fc750000,0x00000006fc850000)] 0x0000000102077800 JavaThread "AWT-AppKit" daemon [_thread_in_native, id=1886770976, stack(0x00007fff5f400000,0x00007fff5fc00000)] 0x0000000102044800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=-333877248, stack(0x00000006ec097000,0x00000006ec197000)] 0x0000000102043000 JavaThread "CompilerThread1" daemon [_thread_blocked, id=-334938112, stack(0x00000006ebf94000,0x00000006ec094000)] 0x0000000102041800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=-335998976, stack(0x00000006ebe91000,0x00000006ebf91000)] 0x0000000102041000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=-337059840, stack(0x00000006ebd8e000,0x00000006ebe8e000)] 0x0000000102029800 JavaThread "Finalizer" daemon [_thread_blocked, id=-338214912, stack(0x00000006ebc74000,0x00000006ebd74000)] 0x0000000102028800 JavaThread "Reference Handler" daemon [_thread_blocked, id=-339333120, stack(0x00000006ebb63000,0x00000006ebc63000)] Other Threads: 0x0000000102020800 VMThread [stack: 0x00000006eba60000,0x00000006ebb60000] [id=-340393984] 0x0000000102046000 WatcherThread [stack: 0x00000006ec19a000,0x00000006ec29a000] [id=-332816384] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 76480K, used 14448K [0x0000000105800000, 0x000000010ad50000, 0x00000002f9800000) eden space 65600K, 22% used [0x0000000105800000, 0x000000010661c398, 0x0000000109810000) from space 10880K, 0% used [0x0000000109810000, 0x0000000109810000, 0x000000010a2b0000) to space 10880K, 0% used [0x000000010a2b0000, 0x000000010a2b0000, 0x000000010ad50000) tenured generation total 174784K, used 0K [0x00000002f9800000, 0x00000003042b0000, 0x00000006e1800000) the space 174784K, 0% used [0x00000002f9800000, 0x00000002f9800000, 0x00000002f9800200, 0x00000003042b0000) compacting perm gen total 21248K, used 10319K [0x00000006e1800000, 0x00000006e2cc0000, 0x00000006e6c00000) the space 21248K, 48% used [0x00000006e1800000, 0x00000006e2213d28, 0x00000006e2213e00, 0x00000006e2cc0000) No shared spaces configured. Virtual Machine Arguments: JVM Args: -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher. framework/Resources/LauncherSupport.jar -Xms256m -Xmx24000m -Dcom.apple.macos.useScreenMenuBar=false -Dcom.apple.mrj.application.growbox.intrudes=false -Dcom.apple.mrj.application.live-resize=true -Dcom.apple.hwaccel=false -Dapple.awt.Antialiasing=false -Dcom.apple.smallTabs=true -Dapple.awt.brushMetalLook=false Java Command: Launcher Type: generic Physical Memory: Page Size = 4k, Total = 2048M, Free = 30996M Thread 0: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 com.apple.CoreFoundation 0x00007fff8204dc4f CFRunLoopRunSpecific + 1631 3 com.apple.HIToolbox 0x00007fff839fdda2 RunCurrentEventLoopInMode + 278 4 com.apple.HIToolbox 0x00007fff839fdbd8 ReceiveNextEventCommon + 322 5 com.apple.HIToolbox 0x00007fff839fda83 BlockUntilNextEventMatchingListInMode + 79 6 com.apple.AppKit 0x00007fff8299d3b0 _DPSNextEvent + 603 7 com.apple.AppKit 0x00007fff8299ccf1 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 136 8 com.apple.AppKit 0x00007fff82996a84 -[NSApplication run] + 455 9 libawt.jnilib 0x00000006ec433257 +[AWTStarter startAWT:] + 1343 10 libawt.jnilib 0x00000006ec432c46 -[CPerformer perform] + 112 11 com.apple.Foundation 0x00007fff8153f2b4 __NSThreadPerformPerform + 148 12 com.apple.CoreFoundation 0x00007fff8204e0e8 CFRunLoopRunSpecific + 2808 13 ...ple.JavaApplicationLauncher 0x0000000100005165 startupJava(LauncherArgsStruct*) + 235 14 ...ple.JavaApplicationLauncher 0x000000010000579c launchJavaApplication + 1224 15 JavaApplicationStub 0x0000000100000b9c 0x100000000 + 2972 Thread 1: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x0000000101a93b61 JVM_GetCPFieldModifiers + 128961 5 libjvm.dylib 0x0000000101a93a36 JVM_GetCPFieldModifiers + 128662 6 ...ple.JavaApplicationLauncher 0x000000010000c0ce startJavaApplication + 2886 7 ...ple.JavaApplicationLauncher 0x000000010000506d java_main_stub(void*) + 9 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 2: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libSystem.B.dylib 0x00007fff840db0b0 mach_msg_server + 436 3 libjvm.dylib 0x000000010181176d JNI_CreateJavaVM_Impl + 53277 4 libjvm.dylib 0x0000000101811375 JNI_CreateJavaVM_Impl + 52261 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 3: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x00000001018e452f JVM_Lseek + 235727 5 libjvm.dylib 0x00000001018e42df JVM_Lseek + 235135 6 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 7 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 8 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 4: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x00000001028003ea 0 + 4336911338 11 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 12 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 13 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 14 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 15 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 16 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 17 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 18 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 19 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 20 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 5: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 6: 0 libSystem.B.dylib 0x00007fff8406dd72 semaphore_wait_trap + 10 1 libjvm.dylib 0x0000000101915bdb JVM_IsPrimitiveClass + 12139 2 libjvm.dylib 0x00000001019155b5 JVM_IsPrimitiveClass + 10565 3 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 4 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 7: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 8: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 9: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x0000000101918ec8 JVM_IsPrimitiveClass + 25176 5 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 6 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 7 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 10: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x000000010191abb5 JVM_IsPrimitiveClass + 32581 4 libjvm.dylib 0x000000010191a70a JVM_IsPrimitiveClass + 31386 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 11: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 12: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x0000000102803414 0 + 4336923668 12 ??? 0x00000001028003ea 0 + 4336911338 13 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 14 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 15 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 16 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 17 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 18 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 19 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 20 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 21 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 22 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 13: 0 ??? 0x0000000102817034 0 + 4337004596 1 ??? 0x000000010280304e 0 + 4336922702 2 ??? 0x0000000102803093 0 + 4336922771 3 ??? 0x000000010280356d 0 + 4336924013 4 ??? 0x0000000102803093 0 + 4336922771 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x000000010280356d 0 + 4336924013 8 ??? 0x0000000102803093 0 + 4336922771 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x0000000102802f3a 0 + 4336922426 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102802f3a 0 + 4336922426 14 ??? 0x0000000102802f3a 0 + 4336922426 15 ??? 0x0000000102803162 0 + 4336922978 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102802f3a 0 + 4336922426 19 ??? 0x0000000102802f3a 0 + 4336922426 20 ??? 0x00000001028003ea 0 + 4336911338 21 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 22 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 23 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 24 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 25 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 26 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 27 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 28 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 29 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 30 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 14: 0 libSystem.B.dylib 0x00007fff840f210e accept + 10 1 libnet.jnilib 0x00000006ff6b6b11 Java_java_net_PlainSocketImpl_socketAccept + 277 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x0000000102802f3a 0 + 4336922426 4 ??? 0x0000000102802f3a 0 + 4336922426 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x0000000102803414 0 + 4336923668 8 ??? 0x00000001028003ea 0 + 4336911338 9 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 10 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 11 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 12 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 13 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 14 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 15 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 16 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 17 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 18 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 15: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x000000010280304e 0 + 4336922702 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102803414 0 + 4336923668 14 ??? 0x0000000102803093 0 + 4336922771 15 ??? 0x0000000102803093 0 + 4336922771 16 ??? 0x0000000102803093 0 + 4336922771 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102803414 0 + 4336923668 19 ??? 0x00000001028003ea 0 + 4336911338 20 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 21 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 22 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 23 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 24 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 25 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 26 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 27 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 28 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 29 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 Crashed: 0 librxtxSerial.jnilib 0x00000006ff70f418 read_byte_array + 68 1 librxtxSerial.jnilib 0x00000006ff70f9b3 Java_gnu_io_RXTXPort_readByte + 93 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x000000010280304e 0 + 4336922702 4 ??? 0x000000010280304e 0 + 4336922702 5 ??? 0x0000000102803414 0 + 4336923668 6 ??? 0x00000001028003ea 0 + 4336911338 7 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 8 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 9 libjvm.dylib 0x00000001018e5be8 JVM_Lseek + 241544 10 libjvm.dylib 0x0000000101900b11 JVM_MonitorWait + 17249 11 libjvm.dylib 0x0000000101a1e59e JVM_DisableCompiler + 1166 12 librxtxSerial.jnilib 0x00000006ff70d91e send_event + 132 13 librxtxSerial.jnilib 0x00000006ff70e82b report_serial_events + 92 14 librxtxSerial.jnilib 0x00000006ff7108c9 Java_gnu_io_RXTXPort_eventLoop + 237 15 ??? 0x000000010280e878 0 + 4336969848 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x00000001028003ea 0 + 4336911338 18 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 19 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 20 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 21 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 22 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 23 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 24 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 25 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 26 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 27 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 17: 0 libSystem.B.dylib 0x00007fff84074d02 __semwait_signal + 10 1 libSystem.B.dylib 0x00007fff840dce91 usleep + 57 2 librxtxSerial.jnilib 0x00000006ff70d729 drain_loop + 45 3 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 4 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 crashed with X86 Thread State (64-bit): rax: 0x00000000029507c0 rbx: 0x0000000000000041 rcx: 0x0000000000000065 rdx: 0x0000000000000002 rdi: 0x00000006ff71205e rsi: 0x00000006ff711c67 rbp: 0x0000000702950000 rsp: 0x000000070294fef0 r8: 0x000000000000004d r9: 0x00000006e21d64c0 r10: 0x00000006e21d38e8 r11: 0x00000000000000d2 r12: 0x00000001020de998 r13: 0x00000006e21d93b0 r14: 0x0000000000000032 r15: 0x00000000029507c0 rip: 0x00000006ff70f418 rfl: 0x0000000000010202 cr2: 0x00000000029507c8 Continued in the message part 2 -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:41 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:41 +1100 Subject: [Rxtx] Part 2 re rxtx 2.2 pre... and MacOSX Message-ID: Continued from Part 1. Binary Images: 0x100000000 - 0x100000fff JavaApplicationStub ??? (???) /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationS tub 0x100004000 - 0x100011fff com.apple.JavaApplicationLauncher 12.2.0 (12.2.0) /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/JavaApplicationLauncher 0x10001a000 - 0x100022ffd com.apple.JavaVM 12.2.0 (12.2.0) <2b178e8d4bbcc0aa427c2f3f71bb2fcb> /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM 0x100055000 - 0x10005dff0 libverify.dylib ??? (???) <56eac95084cb86cd1339a721b1353182> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libveri fy.dylib 0x100063000 - 0x10006cffb JavaNativeFoundation ??? (???) <68ca6409dc49542301edda1e0744ac69> /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNative Foundation.framework/Versions/A/JavaNativeFoundation 0x1000a8000 - 0x1000c7fef libjava.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjava .jnilib 0x1000d8000 - 0x1000e5ffb libzip.jnilib ??? (???) <5b6dce7c9a1f25aa5dff1a633c9dc342> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libzip. jnilib 0x101803000 - 0x101eafff3 libjvm.dylib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bundle/Libra ries/libjvm.dylib 0x6ec2c5000 - 0x6ec2c6fff liblauncher.jnilib ??? (???) <567fa54a222b965b2c4aefea21d9800a> /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/Resources/liblauncher.jnilib 0x6ec431000 - 0x6ec5e4fff libawt.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libawt. jnilib 0x6fdc3b000 - 0x6fdc3cfff ATSHI.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/Resources/ATSHI.dylib 0x6fdd6e000 - 0x6fdd6efff libcmm.jnilib ??? (???) <114e1a620a6920d77bf09bd57a7f7d52> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libcmm. jnilib 0x6fdd9e000 - 0x6fde1fff7 libfontmanager.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libfont manager.jnilib 0x6fdf41000 - 0x6fdf8ffff libsuncmm.jnilib ??? (???) <47330f1f17822de3a5cf921e07615cf7> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libsunc mm.jnilib 0x6fdf95000 - 0x6fdfc4ff7 libjpeg.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjpeg .jnilib 0x6ff6ae000 - 0x6ff6baffb libnet.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnet. jnilib 0x6ff6c0000 - 0x6ff6c4fff libnio.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnio. jnilib 0x6ff6d4000 - 0x6ff6e8ff7 libdcpr.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libdcpr .jnilib 0x6ff70c000 - 0x6ff713fff +librxtxSerial.jnilib ??? (???) <5133deacebd01ceab7d528c541241956> /Library/Java/Extensions/librxtxSerial.jnilib 0x6ff734000 - 0x6ff74bfef libJapaneseConverter.dylib ??? (???) <64cca6bb4650a269f49a8427507e4963> /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib 0x70204f000 - 0x702218fef com.apple.RawCamera.bundle 2.0.10 (2.0.10) /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera 0x7fff5fc00000 - 0x7fff5fc2e643 dyld 97.1 (???) /usr/lib/dyld 0x7fff80003000 - 0x7fff80146ffb com.apple.audio.toolbox.AudioToolbox 1.5.2 (1.5.2) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x7fff801d2000 - 0x7fff801d5ffb com.apple.help 1.1 (36) <9000c05ccad96fdcc25bc35264abf587> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.frame work/Versions/A/Help 0x7fff801d6000 - 0x7fff80211fff com.apple.AE 402.2 (402.2) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.f ramework/Versions/A/AE 0x7fff80212000 - 0x7fff80257fef libRIP.A.dylib ??? (???) <8c818d7fd3dc57839ac48caf107ff4c0> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x7fff80258000 - 0x7fff8029bfef com.apple.QD 3.11.54 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/QD.framework/Versions/A/QD 0x7fff8029c000 - 0x7fff802dffef libTIFF.dylib ??? (???) <86be7909f46cc044a887cbb60ab7826d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x7fff802e0000 - 0x7fff803d4fff libobjc.A.dylib ??? (???) <118dc1ae05e685ad64290352fc94f1f0> /usr/lib/libobjc.A.dylib 0x7fff803d5000 - 0x7fff8045dfe7 libsqlite3.0.dylib ??? (???) <3c7ab3523b816dbd3e039ee7e6e2c580> /usr/lib/libsqlite3.0.dylib 0x7fff8045e000 - 0x7fff80466ffa libbsm.dylib ??? (???) <4d838c0d8a74fe61c781a53a8723303d> /usr/lib/libbsm.dylib 0x7fff80467000 - 0x7fff80497fff com.apple.shortcut 1 (1.0) <9822328df9321a661af3afcc841e8f80> /System/Library/PrivateFrameworks/Shortcut.framework/Versions/A/Shortcut 0x7fff80498000 - 0x7fff8049bfff com.apple.securityhi 3.0 (30817) <00ddd6e60692b62b7649573eab8aef5a> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI .framework/Versions/A/SecurityHI 0x7fff8049c000 - 0x7fff8049efff com.apple.print.framework.Print 218.0.2 (220.1) <2b847a0a1cd885f596a4d10409d50ba3> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.fram ework/Versions/A/Print 0x7fff8049f000 - 0x7fff805dbfe9 com.apple.ImageIO.framework 2.0.4 (2.0.4) <47dcdc0b5986b2c157e0b6dae48ce464> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/ImageIO 0x7fff805dc000 - 0x7fff805f9fef com.apple.CoreVideo 1.5.1 (1.5.1) <78253b3fe8d3dcc90f159d7ed866c295> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x7fff805fa000 - 0x7fff8068bfff com.apple.SearchKit 1.2.1 (1.2.1) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Sear chKit.framework/Versions/A/SearchKit 0x7fff8068c000 - 0x7fff80e49fef libBLAS.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libBLAS.dylib 0x7fff80e4a000 - 0x7fff81416fff com.apple.CoreGraphics 1.407.2 (???) <436dbc70f8c9b29b3beb1d2de220acf2> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/CoreGraphics 0x7fff81417000 - 0x7fff8141dfff com.apple.DiskArbitration 2.2.1 (2.2.1) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitrat ion 0x7fff8141e000 - 0x7fff8145bff7 com.apple.SystemConfiguration 1.9.2 (1.9.2) <150119d0cecb0c80f6736b9881c2411e> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemCo nfiguration 0x7fff8145c000 - 0x7fff81523fec com.apple.CFNetwork 422.11 (422.11) <570ca46de3b907cb1c8e33fc62f562b4> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNe twork.framework/Versions/A/CFNetwork 0x7fff81524000 - 0x7fff8152dfff libCGATS.A.dylib ??? (???) <722a0bbd58740d46739008e881010631> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib 0x7fff8152e000 - 0x7fff81533fff com.apple.CommonPanels 1.2.4 (85) <2cec1ecc95cf1ecea8bea030975a46b8> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPane ls.framework/Versions/A/CommonPanels 0x7fff81534000 - 0x7fff817cffe3 com.apple.Foundation 6.5.7 (677.22) <8134977fcc57198a53dc494b60592980> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x7fff817d0000 - 0x7fff817d0ffd com.apple.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x7fff817d1000 - 0x7fff81cf1fc6 libGLProgrammability.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgra mmability.dylib 0x7fff81cf2000 - 0x7fff81cf4fff com.apple.NavigationServices 3.5.2 (163) <7cb7f3fe7f9d56ec89ef28a6d3a1da7d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Navigation Services.framework/Versions/A/NavigationServices 0x7fff81cf5000 - 0x7fff81d32fe7 com.apple.coreui 1.2 (62) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x7fff81d33000 - 0x7fff81d33fff com.apple.Carbon 136 (136) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x7fff81d34000 - 0x7fff81d42fff libCSync.A.dylib ??? (???) <61f6cc104b3e9b77cd583635a3a9a5cf> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x7fff81d43000 - 0x7fff81d45ff9 libRadiance.dylib ??? (???) <6d9f2235e8f70a7aedfc59383a7548d8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x7fff81d46000 - 0x7fff81db5ff9 com.apple.print.framework.PrintCore 5.5.3 (245.3) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/PrintCore.framework/Versions/A/PrintCore 0x7fff81db6000 - 0x7fff81db6ff8 com.apple.ApplicationServices 34 (34) <81cd02cc2ccf4e47e51d03db860da556> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Applicat ionServices 0x7fff81db7000 - 0x7fff81dd8fff libresolv.9.dylib ??? (???) <38318f9fbcfbdb384e0f9b08cc0e757a> /usr/lib/libresolv.9.dylib 0x7fff81dd9000 - 0x7fff81e4ffef libvMisc.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvMisc.dylib 0x7fff81e50000 - 0x7fff81e52ff7 libffi.dylib ??? (???) <920bb19728451f35703bb95dc908c7ca> /usr/lib/libffi.dylib 0x7fff81e53000 - 0x7fff81eeefe7 com.apple.ink.framework 101.3 (86) <60c6579faf114ea9677fd9ae25389ed2> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framew ork/Versions/A/Ink 0x7fff81eef000 - 0x7fff81f0dfff libPng.dylib ??? (???) <4017eab74319a648dfd73b7d503e557d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x7fff81f0e000 - 0x7fff81f24ff9 com.apple.ImageCapture 5.0.1 (5.0.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCaptu re.framework/Versions/A/ImageCapture 0x7fff81f25000 - 0x7fff81f3dfff com.apple.DictionaryServices 1.0.0 (1.0.0) <78ea11e9a92120f76d69efa24b8d1f95> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Dict ionaryServices.framework/Versions/A/DictionaryServices 0x7fff81f3e000 - 0x7fff81f42fff libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib 0x7fff81f43000 - 0x7fff81fe3fe3 com.apple.ApplicationServices.ATS 3.4 (???) <47cf09bf78935889f17f1b6b09badf0d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/ATS 0x7fff81fe4000 - 0x7fff8211bfff com.apple.CoreFoundation 6.5.5 (476.17) <51930d43c7c2d8fb24148cbfc05bba0f> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundatio n 0x7fff8211c000 - 0x7fff82126fff com.apple.speech.recognition.framework 3.7.24 (3.7.24) <2399374b096b284345daba82e2cb833d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechReco gnition.framework/Versions/A/SpeechRecognition 0x7fff82127000 - 0x7fff82159ff7 libauto.dylib ??? (???) /usr/lib/libauto.dylib 0x7fff8215a000 - 0x7fff821cefe7 libstdc++.6.dylib ??? (???) <565ee6f798f7fef6f804c60682787280> /usr/lib/libstdc++.6.dylib 0x7fff821cf000 - 0x7fff8228dfff edu.mit.Kerberos 6.0.12 (6.0.12) /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x7fff8228e000 - 0x7fff8228effb com.apple.installserver.framework 1.0 (8) /System/Library/PrivateFrameworks/InstallServer.framework/Versions/A/Install Server 0x7fff8228f000 - 0x7fff82293fff libGIF.dylib ??? (???) <66436b84211fe0e723051eab15af0aca> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x7fff82294000 - 0x7fff8258ffe3 com.apple.CoreServices.CarbonCore 786.10 (786.10) <2ac701edf3ca98a86ae9d5f733200b40> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Carb onCore.framework/Versions/A/CarbonCore 0x7fff82590000 - 0x7fff825aafff libvDSP.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvDSP.dylib 0x7fff825ab000 - 0x7fff827b1ff3 com.apple.security 5.0.4 (34102) <47c559b17c1f51998e7a981d0fbec4c8> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x7fff827b2000 - 0x7fff827d9fff libxslt.1.dylib ??? (???) /usr/lib/libxslt.1.dylib 0x7fff827da000 - 0x7fff82948fff libicucore.A.dylib ??? (???) <374ddaf141bf88dba00ab9058f2dbad6> /usr/lib/libicucore.A.dylib 0x7fff82949000 - 0x7fff8295dff7 libGL.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x7fff8295e000 - 0x7fff83286fff com.apple.AppKit 6.5.6 (949.43) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x7fff83287000 - 0x7fff83667fef com.apple.QuartzCore 1.5.7 (1.5.7) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x7fff83668000 - 0x7fff836b8fe7 com.apple.Metadata 10.5.2 (398.25) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Meta data.framework/Versions/A/Metadata 0x7fff836b9000 - 0x7fff836baff3 com.apple.audio.units.AudioUnit 1.5 (1.5) /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x7fff836bb000 - 0x7fff83710fe3 com.apple.HIServices 1.7.0 (???) <6bef766448d67adb91901b432629ea0f> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/HIServices.framework/Versions/A/HIServices 0x7fff83711000 - 0x7fff83711ffd com.apple.Accelerate.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/vecLib 0x7fff83712000 - 0x7fff837a7ffb com.apple.LaunchServices 290.3 (290.3) <56544e16c5192d2ce72df772901fcaef> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Laun chServices.framework/Versions/A/LaunchServices 0x7fff837a8000 - 0x7fff8382ffef com.apple.audio.CoreAudio 3.1.1 (3.1.1) <9c1714647fd7515c900362ad2ac76874> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x7fff83830000 - 0x7fff83893fef libGLU.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dyli b 0x7fff83894000 - 0x7fff838a2ff9 com.apple.helpdata 1.0.1 (14.2) /System/Library/PrivateFrameworks/HelpData.framework/Versions/A/HelpData 0x7fff838a3000 - 0x7fff838afff1 libgcc_s.1.dylib ??? (???) <23fa31a628c1ea8a62ac529fa333b6e1> /usr/lib/libgcc_s.1.dylib 0x7fff838b0000 - 0x7fff838d2fff libJPEG.dylib ??? (???) <4257ab268996bbeb93b47946df181cdc> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x7fff838d3000 - 0x7fff838d3ffd com.apple.Accelerate 1.4.2 (Accelerate 1.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x7fff838d4000 - 0x7fff838d4ff8 com.apple.Cocoa 6.5 (???) <8c59f679ffbd9178134df1d83dedde28> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa 0x7fff838d5000 - 0x7fff839cafff libxml2.2.dylib ??? (???) <8226d1180354f493954c5fa1fc0e1154> /usr/lib/libxml2.2.dylib 0x7fff839cb000 - 0x7fff839dafe7 com.apple.opengl 1.5.9 (1.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x7fff839db000 - 0x7fff83cc2feb com.apple.HIToolbox 1.5.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. framework/Versions/A/HIToolbox 0x7fff83cc3000 - 0x7fff83d03fef com.apple.framework.IOKit 1.5.1 (???) <17e6707127a60c5e2d7a9bd2b7bf2db0> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x7fff83d04000 - 0x7fff83dc8fe2 com.apple.vImage 3.0 (3.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage .framework/Versions/A/vImage 0x7fff83dc9000 - 0x7fff83df3fff libcups.2.dylib ??? (???) /usr/lib/libcups.2.dylib 0x7fff83df4000 - 0x7fff83df4ffa com.apple.CoreServices 32 (32) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x7fff83df5000 - 0x7fff83ed6fff libcrypto.0.9.7.dylib ??? (???) <66f1f8773bd9fdfdcfd09e2b4b010636> /usr/lib/libcrypto.0.9.7.dylib 0x7fff83ed7000 - 0x7fff83f87fef com.apple.CoreServices.OSServices 226.5 (226.5) <1c38f727b3ad3293272db7323b37c735> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSSe rvices.framework/Versions/A/OSServices 0x7fff83f88000 - 0x7fff83fa2fff com.apple.openscripting 1.2.8 (???) <0674c4e3353c677c9f58df3297ae559b> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScript ing.framework/Versions/A/OpenScripting 0x7fff83fa3000 - 0x7fff83fdfff7 libGLImage.dylib ??? (???) <02258bcdbe8defdb254acc077a81dd9b> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage. dylib 0x7fff83fe0000 - 0x7fff83ff1fff com.apple.speech.synthesis.framework 3.7.1 (3.7.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x7fff83ff2000 - 0x7fff8406cff3 com.apple.CoreText 2.0.3 (???) <827bbfef670df72316719c25bfb39915> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreText.framework/Versions/A/CoreText 0x7fff8406d000 - 0x7fff841f8ffb libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0x7fff841f9000 - 0x7fff8420affd libz.1.dylib ??? (???) /usr/lib/libz.1.dylib 0x7fff8420b000 - 0x7fff842befef com.apple.DesktopServices 1.4.7 (1.4.7) /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/D esktopServicesPriv 0x7fff842bf000 - 0x7fff84677fff libLAPACK.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libLAPACK.dylib 0x7fff84678000 - 0x7fff84743fef com.apple.ColorSync 4.5.1 (4.5.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ColorSync.framework/Versions/A/ColorSync 0x7fff84744000 - 0x7fff84847feb com.apple.CoreData 100.1 (186) <074abc7f43f81f7885e4d0674a8be4bc> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x7fffffe00000 - 0x7fffffe01780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0xfffffffffffec000 - 0xfffffffffffeffff libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib SYSTEM CONFIG Model: MacPro3,1, BootROM MP31.006C.B05, 8 processors, Quad-Core Intel Xeon, 2.8 GHz, 32 GB Graphics: kHW_ATIrv630Item, ATI Radeon HD 2600, spdisplays_pcie_device, 256 MB Memory Module: DIMM Riser B/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Bluetooth: Version 2.1.3f8, 2 service, 1 devices, 1 incoming serial ports Network Service: Ethernet 2, Ethernet, en1 PCI Card: ATI Radeon HD 2600, display, Slot-1 Serial ATA Device: WDC WD3200AAJS-41VWA0, 298.09 GB Parallel ATA Device: PIONEER DVD-RW DVR-112D USB Device: Keyboard Hub, (null) mA USB Device: Apple Optical USB Mouse, (null) mA USB Device: Apple Keyboard, (null) mA USB Device: hub_device, (null) mA USB Device: Apple Cinema HD Display, (null) mA USB Device: Keyspan USA-28Xb, (null) mA USB Device: Bluetooth USB Host Controller, (null) mA FireWire Device: built-in_hub, unknown_value, unknown_speed FireWire Device: My Book, WD, 800mbit_speed FireWire Device: unknown_device, unknown_value, unknown_speed -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From jaakko.sipari at gmail.com Thu Jan 22 03:00:03 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 22 Jan 2009 12:00:03 +0200 Subject: [Rxtx] RXTX compilation with GCJ possible? Message-ID: <901f25b80901220200s53792317o374b80cbb6066a52@mail.gmail.com> Hi! Does anyone have experience on using RXTX in a GCJ compiled Java application? I'm interested whether this is possible in Windows and/or in Linux platforms. And of course what does it take to get it work, or does it just work out of the box. Ultimately my aim here would be to move to a more time deterministic system by utilizing GCJ, jRate & Javolution and possibly run the RXTX (and other important) threads at a priority higher than the garbage collector. This of course would require some modification for the RXTX threads to run in a Javolution pool context or non allocating real time contexts so they wouldn't produce any garbage, but that's something to hack on later. For now I'd just like to know if there are any obstacles on the road to compiling & running RXTX with GCJ. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/5592681a/attachment-0009.html From jmudd at dtiweb.net Thu Jan 22 06:21:03 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Thu, 22 Jan 2009 08:21:03 -0500 Subject: [Rxtx] Hot unplugging of a USB device References: <4977BEEA.4020708@gatworks.com> Message-ID: U. George, Thanks for the information. How did you resolve your USB/GPS device on Linux? My application has to run on both Linux and Windows eventually. Thanks, Jerry -----Original Message----- From: U. George [mailto:netbeans at gatworks.com] Sent: Wednesday, January 21, 2009 7:34 PM To: Jerry Mudd Cc: rxtx at qbang.org Subject: Re: [Rxtx] Hot unplugging of a USB device > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From m.kirkland at comcast.net Thu Jan 22 09:21:01 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Thu, 22 Jan 2009 08:21:01 -0800 Subject: [Rxtx] Serial port control lines change with call to getPortIdentifiers() on Linux Message-ID: <94443DEFFD574B6CA8DDB2B201D9E007@bengal.net> Hi All ! I have noticed an issue with RXTX on Ubuntu Linux 8.10 that has prevented me from being able to use RXTX on Linux. I have noticed this issue on both the rxtx 2.1.7 and the new rxtx2.2pre1. When I execute the following line to get the ports on a system - java.util.Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); Both DTR and RTS become active on ttyS0 and only ttyS0, not ttyS1 (I only have 2 ports). I see this prior to opening any ports or making any other calls to RXTX. I have stepped it though with the debugger and I am sure this is the trigger. My application uses these control lines to perform functions other then the standard flow control so it is critical that I be able to control them exactly. I would also think that folks using RXTX for more standard serial IO would also have issues with devices starting to talk before a listener was ready. I checked Windows XP and I do not see this issue (but I only have a com1 on the Windows computer). I also noticed that the DTR line blips when setting up a port on 2.2.pre1 like it does on 2.1.7r2. This it the same issue that the folks at http://www.codeskin.com/ patched. I see this issue on both Linux and Windows XP. Any help or clues would be greatly appreciated. If I can provide any additional info or do any testing I would be glad to help out to get version 2.2 in top shape for release. BTW I have written a simple dynamic loader to load the RXTX jar and native code that is drive by the os.name and os.arch system properties. I would be more then happy to contribute this to the project if folks though it would be useful. Its more convenient then having to manage copying the files around to various JVM's. TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/eab26bae/attachment-0008.html From josefk_5 at yahoo.com Fri Jan 23 09:44:06 2009 From: josefk_5 at yahoo.com (Josef Kahsay) Date: Fri, 23 Jan 2009 08:44:06 -0800 (PST) Subject: [Rxtx] Help on Accessing RS232 Message-ID: <509617.88308.qm@web38205.mail.mud.yahoo.com> Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS From m.kirkland at comcast.net Sat Jan 24 01:28:52 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Sat, 24 Jan 2009 00:28:52 -0800 Subject: [Rxtx] Help on Accessing RS232 In-Reply-To: <509617.88308.qm@web38205.mail.mud.yahoo.com> References: <509617.88308.qm@web38205.mail.mud.yahoo.com> Message-ID: <665887C02E1446708CE392FE0BD73D79@bengal.net> It seems to me that you are having a classic java classpath issue. Java classpath issues can be annoying to solve sometimes. As some random guesses I would suggest you look at the following. 1 - You might not be running the JVM from the location that you think you are (gets me all the time). I which Windows had a which command. 2 - You don't mention what development environment you are using like Eclipse etc., and if you are trying to run the demo from inside the development environment. If so, do whatever is appropriate for the development environment to control the classpath. In Eclipse this would involve adding a "User Library" to point to the jar and native code. 3 - Once you get the classpath ok, the next thing you might run into is not being able to load the native library. 4 - I have found that on XP I can place the RXTX jar and native library in the same directory as my application's jar file (and a class-path entry in the application's jar file manifest) and it all works. 5 - If you need more control of managing different versions of RXTX for different OS platforms, I have a dynamic RXTX loader I can send you (but I recommend getting the simple case working first). Let me know if this helps. Mike -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Josef Kahsay Sent: Friday, January 23, 2009 8:44 AM To: rxtx at qbang.org Subject: [Rxtx] Help on Accessing RS232 Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jacomoman at hotmail.com Mon Jan 26 12:12:27 2009 From: jacomoman at hotmail.com (Joseph Schmoley) Date: Mon, 26 Jan 2009 11:12:27 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: Message-ID: Hi All, First, let me thank you all for your effort on this excellent project. I've been using the Win32 binaries in the 2.1-7r2 package without any problems on WinXP Pro (32-bit). I then tried the .jnilib of the same version on my Mac OSX 10.5 64-bit darwin and got the familiar UnsatisfiedLinkError problem. I read up on all the mailing list archive messages and found this one (http://mailman.qbang.org/pipermail/rxtx/2008-May/2436699.html) suggesting that perhaps rxtx-devel from CVS would have a fix. So I got latest rxtx-devel + commapi-0-0-1 as suggested by the CVS page at rxtx.org. I even set my CFLAGS and LDFLAGS to include "-arch x86_64 -arch ppc64", but as it turned out, the latest configure script didn't need it. In any case, I configured and built rxtx-devel with no errors (that I could see) and transferred the resulting i386-apple-darwin9.6.0/librxtxSerial.jnilib to where my java.library.path is pointing to and ran my test class. Whereas before I was getting UnsatisfiedLinkError, I now simply get this: Invalid memory access of location 22d927c8 rip=22356420 Invalid memory access of location 22d9292c rip=22357540 [error occurred during error reporting (null), id 0xa] ./run-class.sh: line 10: 15647 Segmentation fault java -Djava.library.path=./lib/native -Dapp.logging.file.path=./log/runtime.log -classpath .:${MYCP} ${CLASSNAME} "${CMD}" run-class.sh is simply a script I've got to run my test class and all that class does is invoke the RXTX API, first one being: CommPortIdentifier.getPortIdentifiers(). Has anyone had any luck with getting latest CVS sources to work on Mac OS X 10.5 64-bit? Any help/pointers would be greatly appreciated. Thank you in advance. -Jac I've attached my configure and make output as txt files. Here's all my build/machine environment info, as per the troubleshooting wiki page: Mac OS X 10.5.6 (9G55) ----------------------------------------------- /usr/bin/java -version java version "1.6.0_07" Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153) Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode) ----------------------------------------------- Darwin my-macbook.local 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 ----------------------------------------------- autoconf (GNU Autoconf) 2.61 Copyright (C) 2006 Free Software Foundation, Inc. This is free software. You may redistribute copies of it under the terms of the GNU General Public License . There is NO WARRANTY, to the extent permitted by law. Written by David J. MacKenzie and Akim Demaille. ----------------------------------------------- automake (GNU automake) 1.10 Written by Tom Tromey and Alexandre Duret-Lutz . Copyright 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ----------------------------------------------- $ libtool -V Apple Computer, Inc. version cctools-698.1 ----------------------------------------------- GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program built for powerpc-apple-darwin9.0 ----------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: my-configure.out.txt Type: application/octet-stream Size: 6934 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090126/89d9c7f6/attachment-0008.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: my-make.out.txt Type: application/octet-stream Size: 7737 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090126/89d9c7f6/attachment-0009.obj From kintel at sim.no Mon Jan 26 16:16:19 2009 From: kintel at sim.no (Marius Kintel) Date: Tue, 27 Jan 2009 00:16:19 +0100 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: Message-ID: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Hi Jac, I've had the same issue, and I suggested a patch to partially fix it a while back: http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html I don't know the status of this in the current incarnation of the rxtx code and I have reverted to Java-1.5 since then.. ~/= Marius -- We are Elektropeople for a better living. From tjarvi at qbang.org Tue Jan 27 08:08:54 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 27 Jan 2009 08:08:54 -0700 (MST) Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: On Tue, 27 Jan 2009, Marius Kintel wrote: > Hi Jac, > > I've had the same issue, and I suggested a patch to partially fix it a > while back: > http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html > > I don't know the status of this in the current incarnation of the rxtx > code and I have reverted to Java-1.5 since then.. > > ~/= Marius > > -- > We are Elektropeople for a better living. > Hmm. That did not get in. I can add it and put a new prerelease out this week. The eis must be a regression. I was sure we fixed that. -- Trent Jarvi tjarvi at qbang.org From jacomoman at hotmail.com Tue Jan 27 08:48:16 2009 From: jacomoman at hotmail.com (Joseph Schmoley) Date: Tue, 27 Jan 2009 07:48:16 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: That would be excellent Trent. I've got a project partially on hold because of this. It runs great on Win32 (XP/Vista), it just has to do the same on Mac 64-bit and Linux 32-bit. I look forward to this pre-release. Again, thanks a bunch to you and all the other code contributors for this excellent project. I wish I could donate something to you guys. I couldn't find a donation link anywhere. RxTx has been a great help with my project. -Jac From: Trent Jarvi Sent: Tuesday, January 27, 2009 7:08 AM To: Marius Kintel Cc: Joseph Schmoley ; rxtx at qbang.org Subject: Re: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit On Tue, 27 Jan 2009, Marius Kintel wrote: > Hi Jac, > > I've had the same issue, and I suggested a patch to partially fix it a > while back: > http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html > > I don't know the status of this in the current incarnation of the rxtx > code and I have reverted to Java-1.5 since then.. > > ~/= Marius > > -- > We are Elektropeople for a better living. > Hmm. That did not get in. I can add it and put a new prerelease out this week. The eis must be a regression. I was sure we fixed that. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090127/bbd287bb/attachment-0003.html From bschlining at gmail.com Tue Jan 27 09:38:26 2009 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 27 Jan 2009 08:38:26 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: > That would be excellent Trent. I've got a project partially on hold > because of this. It runs great on Win32 (XP/Vista), it just has to do the > same on Mac 64-bit and Linux 32-bit. I look forward to this pre-release. > I'm in the same spot too. Looking forward to the pre-release! -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090127/2275013b/attachment-0003.html From andrew.paverd at rorotika.com Wed Jan 28 03:14:58 2009 From: andrew.paverd at rorotika.com (Andrew Paverd) Date: Wed, 28 Jan 2009 12:14:58 +0200 Subject: [Rxtx] RXTX not working on Solaris Message-ID: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Hi all, I am attempting to use RXTX on a Sun SPARC server running Solaris. I have tried the binaries from both the latest release (2.1-7) and the pre-release (2.2pre1). The 2.1-7 driver gives the following error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: fatal: libgcc_s.so.1: open failed: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)" I'm not sure what this "libgcc_s.so.1" file does in terms of RXTX but its absence is preventing the application from running. With the 2.2pre1 binary, the application loads without any issue but does not detect any comm-ports. I know that there are multiple ports available because when using the Sun javax.comm library for Solaris SPARC, the ports are all correctly discovered and the application can read from and write to them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in the 2.2 release. Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if so, how did you do it (which versions did you use etc.)? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090128/a97b220d/attachment-0003.html From tjarvi at qbang.org Wed Jan 28 17:01:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 28 Jan 2009 17:01:50 -0700 (MST) Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: On Wed, 28 Jan 2009, Andrew Paverd wrote: > > Hi all, > > ? > > I am attempting to use RXTX on a Sun SPARC server running Solaris. I have > tried the binaries from both the latest release (2.1-7) and the pre-release > (2.2pre1). > > ? > > The 2.1-7 driver gives the following error: > > ? > > ?Exception in thread "main" java.lang.UnsatisfiedLinkError: > /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: > fatal: libgcc_s.so.1: open failed: No such file or directory > > ??????? at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > ??????? at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) > > ??????? at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) > > ??????? at java.lang.Runtime.loadLibrary0(Runtime.java:823) > > ??????? at java.lang.System.loadLibrary(System.java:1030) > > ??????? at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)? > > ? > > I?m not sure what this ?libgcc_s.so.1? file does in terms of RXTX but its > absence is preventing the application from running. > > ? > > With the 2.2pre1 binary, the application loads without any issue but does > not detect any comm-ports. I know that there are multiple ports available > because when using the Sun javax.comm library for Solaris SPARC, the ports > are all correctly discovered and the application can read from and write to > them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in > the 2.2 release. > > ? > > Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if > so, how did you do it (which versions did you use etc.)? > > ? Hi Andrew ld.so/libgcc_s.so are part of GNU gcc/ld. They are available for solaris. I'm not sure how to link them without requiring them. It is also possible to compile rxtx with Sun's compiler if you have it. Perhaps someone here knows how to get rxtx compiled on Solaris using gcc without requiring those libs by everyone? -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Jan 28 17:39:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 28 Jan 2009 17:39:08 -0700 (MST) Subject: [Rxtx] Problem on 'Trouble Shooting' wiki page. Message-ID: It has been pointed out that the rxtx wiki page says usermod -G may be used to update the group a user is in. http://rxtx.qbang.org/wiki/index.php/Trouble_shooting The corrected text now says to use usermod -aG to add the user to a group in addition to their current group(s). The previous -G version would replace the users current groups with the new group. Replacing group information can cause significant problems for end users. If you have information based upon the wiki, please update your content. Thanks, -- Trent Jarvi tjarvi at qbang.org From andrew.paverd at rorotika.com Thu Jan 29 02:15:35 2009 From: andrew.paverd at rorotika.com (Andrew Paverd) Date: Thu, 29 Jan 2009 11:15:35 +0200 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Thanks for the advice Trent - I was originally using the precompiled librxtxSerial.so. I've subsequently compiled rxtx for Solaris (using gcc) and after copying the libgcc_s.so file to my .../jre/lib/sparc directory, the library loads. However, it does not detect any ports. When I call the getComPortIdentifiers() nothing is returned and I can't connect to any port. Sun's javax.comm package detects and can connect to all the ports. This is the same as when I tried the 2.2pre1 library. Are there any extra steps that must be taken to detect ports on Solaris? (user is member of uucp group) Thanks, Andrew From tristan.dyer at cgi.com Thu Jan 29 05:57:25 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 29 Jan 2009 07:57:25 -0500 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D030BE152@MTL-MSG-02.cgiclients.com> Andrew, I had the same problem, but before I got too far the scope of my project changed, and I don't have to support Solaris anymore.. I was getting a weird error, file does not exist but should, or something like that. The project ended before I figured out why. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Andrew Paverd Sent: January 29, 2009 5:16 AM To: 'Trent Jarvi' Cc: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working on Solaris Thanks for the advice Trent - I was originally using the precompiled librxtxSerial.so. I've subsequently compiled rxtx for Solaris (using gcc) and after copying the libgcc_s.so file to my .../jre/lib/sparc directory, the library loads. However, it does not detect any ports. When I call the getComPortIdentifiers() nothing is returned and I can't connect to any port. Sun's javax.comm package detects and can connect to all the ports. This is the same as when I tried the 2.2pre1 library. Are there any extra steps that must be taken to detect ports on Solaris? (user is member of uucp group) Thanks, Andrew _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Martin.Oberhuber at windriver.com Thu Jan 29 06:15:01 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:15:01 +0100 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2326@ism-mail03.corp.ad.wrs.com> Hi Andrew & Paverd, the trick of compiling with gcc on Solaris such that the libgcc_s.so library is not needed at runtime is that gcc itself must be configured and compiled with special options: cd gcc-src ./configure --disable-shared make Using that specially compiled gcc, you can then build the RXTX library: setenv PATH $HOME/my-gcc/bin:$PATH cd rxtx mkdir build-solaris && cd build-solaris ../configure --disable-lockfiles make For more details, see the original bug and its attachments: http://bugzilla.qbang.org/show_bug.cgi?id=73 An rxtx-2.1-7r2 build for Solaris without libgcc_s dependency is available from the Eclipse packages at http://rxtx.qbang.org/eclipse/downloads/ Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Andrew Paverd Sent: Mittwoch, 28. J?nner 2009 11:15 To: rxtx at qbang.org Subject: [Rxtx] RXTX not working on Solaris Hi all, I am attempting to use RXTX on a Sun SPARC server running Solaris. I have tried the binaries from both the latest release (2.1-7) and the pre-release (2.2pre1). The 2.1-7 driver gives the following error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: fatal: libgcc_s.so.1: open failed: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)" I'm not sure what this "libgcc_s.so.1" file does in terms of RXTX but its absence is preventing the application from running. With the 2.2pre1 binary, the application loads without any issue but does not detect any comm-ports. I know that there are multiple ports available because when using the Sun javax.comm library for Solaris SPARC, the ports are all correctly discovered and the application can read from and write to them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in the 2.2 release. Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if so, how did you do it (which versions did you use etc.)? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090129/d6d73f3e/attachment-0002.html From Martin.Oberhuber at windriver.com Thu Jan 29 06:16:38 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:16:38 +0100 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E232A@ism-mail03.corp.ad.wrs.com> Hi Andrew, one thing I did notice on Solaris was that after closing a port, the Solaris Kernel seems to have some timeout before it can be re-opened. So, when you try it again, make sure that no other application hogs the port or has been hogging it shortly before. It may make sense to try a few times. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Andrew Paverd > Sent: Donnerstag, 29. J?nner 2009 10:16 > To: 'Trent Jarvi' > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX not working on Solaris > > Thanks for the advice Trent - I was originally using the > precompiled librxtxSerial.so. I've subsequently compiled rxtx > for Solaris (using gcc) and after copying the libgcc_s.so > file to my .../jre/lib/sparc directory, the library loads. > > However, it does not detect any ports. When I call the > getComPortIdentifiers() nothing is returned and I can't > connect to any port. Sun's javax.comm package detects and can > connect to all the ports. This is the same as when I tried > the 2.2pre1 library. > > Are there any extra steps that must be taken to detect ports > on Solaris? (user is member of uucp group) > > Thanks, > > > Andrew > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From Martin.Oberhuber at windriver.com Thu Jan 29 06:24:05 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:24:05 +0100 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2335@ism-mail03.corp.ad.wrs.com> Hi Greg, sorry for the late response (just catching up on E-Mails). I do not plan to create any Eclipse bundles before rxtx-2.2 is released. Creating the packages is a bit of an effort, which I'd rather postpone until the release, and then do it only once. In the meantime, if you need it for testing, I think it should be easy to take the existing Eclipse bundles/fragments and simply replace any new DLL's / so's in them, plus use WinZIP to replace the .class files in the Java bundle. For Eclipse, it will still look like rxtx-2.1-7 but in reality it will be your own latest build. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Trent Jarvi > Sent: Sonntag, 04. J?nner 2009 20:42 > To: Greg Johnson > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] [Announce] RXTX 2.2pre1 is available. > > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse > packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be > a popular > spam abuse page. I'll put a license and download link on there. All > other pages are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > > > Hi Trent, > > The download link on rxtx.org > (http://users.frii.com/jarvi/rxtx/) loops back > > to rxtx.org, and the wiki doesn't seem to have a link (top > level at least) to > > download. I think Martin had been generating > (fantastically useful) Eclipse > > bundles, as well - are these available for 2.2pre1 also? > > > > Many thanks to everyone for their work - rxtx is an > essential part of our > > product, and we have been keenly awaiting this release. > > > > Regards, > > greg > > > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > > > >> > >> The binaries, source and pending wiki move are now announced on > >> http://www.rxtx.org. After this has baked, we can put > the web install in. > >> > >> Changes in rxtx 2.2 (If I missed something let me know): > >> ... snip ... > >> > >> -- > >> Trent Jarvi > >> tjarvi at qbang.org_______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > -- > > Greg Johnson, PhD > > Director of Engineering > > http://www.rbr-global.com > > greg.johnson at rbr-global.com > > +1.613.233.1621 (GMT-5) office > > > > > > See us at: Ocean Business 2009, Southampton, England, March > 31 - April 1, > > 2009 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From Martin.Oberhuber at windriver.com Thu Jan 29 06:32:57 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:32:57 +0100 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> Hi Tristan, > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); I think that this code is wrong. User code must not call the RXTXCommDriver constructor, since you cannot initialize it properly. What you can do to announce previously unknown port names is this: System.setProperty("gnu.io.rxtx.SerialPorts","/dev/term/a"); before you first access any RXTX function. For details, see the code in RXTXCommDriver#registerSpecifiedPorts() > What is the output of System.getProperty("os.name") on OpenSolaris? I didn't see any response of yours to this question from Trent. What does OpenSolaris output? Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Trent Jarvi > Sent: Mittwoch, 31. Dezember 2008 20:04 > To: Dyer, Tristan > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX for OpenSolaris 2008.11 > > > > On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > > > > Hi, > > > > I have tried building the rxtx library for OpenSolaris 2008.11. > > > > It seemed to build fine without errors, however code such as > > > > ????? java.util.Enumeration portList > > ???????? = CommPortIdentifier.getPortIdentifiers(); > > ????? boolean found = false; > > ????? while (portList.hasMoreElements()) { > > ???????? portId = (CommPortIdentifier) portList.nextElement(); > > ???????? System.out.println(" " + portId.getName()); > > ???????? if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > > ?????????? ???? ?? System.out.println("found"); > > ?????????????? found = true; > > ?????????????? break; > > ??????????? } > > ???????? } > > ????? } > > Will output nothing. > > > > Or rather it seems as if there are no ports found by RXTX. > This code works > > on Ubuntu8.04 and winXP. > > > > If I Add the port manually and then try and open the port > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > > ????? try{ > > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > > ????? } > > ????? catch(Exception e){ > > ??? ??? ? System.out.println("NoSuchPortException"); > > ??? ??? ? //ignore > > ????? } > > ????? try { > > ??????? ???????? System.out.println("opening port"); > > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > > WAIT_TO_OPEN); > > ??????????? connected = true; > > ??????????? System.out.println("Connected to port " + > portId.getName()); > > ???????? } catch (PortInUseException p) { > > ??????????? if (DEBUG) { > > ?????????????? System.err.println(p); > > ??????????? } > > ??????????? port = null; > > ??????????? portId = null; > > ??????????? System.out.println("PortInUseException"); > > ??????????? p.printStackTrace(); > > ???????? } > > > > I will get the following, but not the NoSuchPortException. > > > > java.lang.reflect.InvocationTargetException > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Caused by: java.lang.NullPointerException > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:296) > > > > ??????? ... 7 more > > > > > > As well as > > > > java.lang.NullPointerException > > ??????? at > gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > > ??????? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > > ??????? at > > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:255) > > > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > > > Did I build it wrong? Or is there a problem with > OpenSolaris that will > > prevent this from working? Or am I missing something > incredibly simple? > > > > As well OpenSolaris is running inside a VM with COM1 mapped to > > COM1(VirtualBox) which I believe maps it to /dev/term/a > > > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > > > > > Hi Tristan? > > What is the output of System.getProperty("os.name") on > OpenSolaris? We > have logic like the following in RXTX to handle platform specific > information: > > if ( osName.equals("Solaris") || osName.equals("SunOS")) > > Which may not be getting hit. The result if you will never > call private > void checkSolaris(String PortName, int PortType). > > It could also result in Solaris specific settings not being > set in the > Makefile. > > > The os.name is displayed when you run the configure script. > > -- > Trent Jarvi > tjarvi at qbang.org > From Martin.Oberhuber at windriver.com Thu Jan 29 06:38:20 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:38:20 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] how do you dynamically reload native libraries? In-Reply-To: References: Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2341@ism-mail03.corp.ad.wrs.com> Hi Douglas, Eclipse / OSGi may be doing what you want. It does say that multiple versions of a lib can co-exist at the same time, when the MANIFEST.MF doesn't specify a lib as a singleton. I'm not sure though if or how that would work with native libs. Eclipse bundles for RXTX-2.1-7r2 are available on http://rxtx.qbang.org/eclipse/downloads/ You could build RXTX-2.2pre and then manually create those Eclipse bundles just by adding the MANIFEST.MF to the JAR with the version number exchanged. Then you should be able to try it out. If you do, let me know how it goes... Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Samstag, 27. Dezember 2008 15:00 > To: rxtx at qbang.org; lyon at docjava.com > Subject: [Suspected Spam][Blocked Sender][Rxtx] how do you > dynamically reload native libraries? > > Hi All, > I am trying to test multiple versions of the RXTX native libraries > in a single JVM. > > Each RXTX library instance can share a single virtual machine, but > must have an isolated context class loader. > A context class loader maps a thread to specific classes and > resources. > When the thread dies, the classes and resources are freed. > > Is there some way to have multiple context class loaders that can > load different native method > library implementations? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Thu Jan 29 07:50:05 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 29 Jan 2009 09:50:05 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D030BE22B@MTL-MSG-02.cgiclients.com> Sorry, I had sent it to Trent alone. It outputs "SunOS" Also I had only added that line as a test to see if explicitly adding the port would make a difference, it didn't. My project scope has been reduced so I don't need to support solaris anymore, but I will return to the problem when things slow down. I do remember that the error that was being reported by the native code was "2" which I believe maps to "ENOENT No such file or directory A file name is specified and the file should exist but doesn't, or one of the directories in a path name does not exist." I didn't get much farther. Thanks, -- Tristan Dyer -----Original Message----- From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] Sent: January 29, 2009 9:33 AM To: Trent Jarvi; Dyer, Tristan Cc: rxtx at qbang.org Subject: RE: [Rxtx] RXTX for OpenSolaris 2008.11 Hi Tristan, > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); I think that this code is wrong. User code must not call the RXTXCommDriver constructor, since you cannot initialize it properly. What you can do to announce previously unknown port names is this: System.setProperty("gnu.io.rxtx.SerialPorts","/dev/term/a"); before you first access any RXTX function. For details, see the code in RXTXCommDriver#registerSpecifiedPorts() > What is the output of System.getProperty("os.name") on OpenSolaris? I didn't see any response of yours to this question from Trent. What does OpenSolaris output? Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Mittwoch, 31. Dezember 2008 20:04 > To: Dyer, Tristan > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX for OpenSolaris 2008.11 > > > > On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > > > > Hi, > > > > I have tried building the rxtx library for OpenSolaris 2008.11. > > > > It seemed to build fine without errors, however code such as > > > > ????? java.util.Enumeration portList > > ???????? = CommPortIdentifier.getPortIdentifiers(); > > ????? boolean found = false; > > ????? while (portList.hasMoreElements()) { > > ???????? portId = (CommPortIdentifier) portList.nextElement(); > > ???????? System.out.println(" " + portId.getName()); > > ???????? if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > > ?????????? ???? ?? System.out.println("found"); > > ?????????????? found = true; > > ?????????????? break; > > ??????????? } > > ???????? } > > ????? } > > Will output nothing. > > > > Or rather it seems as if there are no ports found by RXTX. > This code works > > on Ubuntu8.04 and winXP. > > > > If I Add the port manually and then try and open the port > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > > ????? try{ > > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > > ????? } > > ????? catch(Exception e){ > > ??? ??? ? System.out.println("NoSuchPortException"); > > ??? ??? ? //ignore > > ????? } > > ????? try { > > ??????? ???????? System.out.println("opening port"); > > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > > WAIT_TO_OPEN); > > ??????????? connected = true; > > ??????????? System.out.println("Connected to port " + > portId.getName()); > > ???????? } catch (PortInUseException p) { > > ??????????? if (DEBUG) { > > ?????????????? System.err.println(p); > > ??????????? } > > ??????????? port = null; > > ??????????? portId = null; > > ??????????? System.out.println("PortInUseException"); > > ??????????? p.printStackTrace(); > > ???????? } > > > > I will get the following, but not the NoSuchPortException. > > > > java.lang.reflect.InvocationTargetException > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Caused by: java.lang.NullPointerException > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:296) > > > > ??????? ... 7 more > > > > > > As well as > > > > java.lang.NullPointerException > > ??????? at > gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > > ??????? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > > ??????? at > > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:255) > > > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > > > Did I build it wrong? Or is there a problem with > OpenSolaris that will > > prevent this from working? Or am I missing something > incredibly simple? > > > > As well OpenSolaris is running inside a VM with COM1 mapped to > > COM1(VirtualBox) which I believe maps it to /dev/term/a > > > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > > > > > Hi Tristan > > What is the output of System.getProperty("os.name") on OpenSolaris? > We have logic like the following in RXTX to handle platform specific > information: > > if ( osName.equals("Solaris") || osName.equals("SunOS")) > > Which may not be getting hit. The result if you will never call > private void checkSolaris(String PortName, int PortType). > > It could also result in Solaris specific settings not being set in the > Makefile. > > > The os.name is displayed when you run the configure script. > > -- > Trent Jarvi > tjarvi at qbang.org > From hho at bibliotheca.dk Thu Jan 29 08:00:49 2009 From: hho at bibliotheca.dk (Hans Hvelplund Odborg) Date: Thu, 29 Jan 2009 16:00:49 +0100 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: I know that there arent any guarantees, but could someone involved with the development of RxTx please guesstimate when 2.2 final will be released? I'm not familiar with the pre-release history of 2.1-7 but I read that there was 20 pre-relases of 2.1-7 so I guess (based on current pre-release rate) that 2.2 may easily be more than 6 months away? Thanks Med venlig hilsen / Best regards / Med v?nliga h?lsningar Hans Hvelplund Odborg BIBLIOTHECA A/S Vallensb?kvej 22A, 2. TH ? 2605 Br?ndby ? Denmark Mob.: +45 30235940 Tel.: +45 70271008 Fax: +45 70271009 hho at bibliotheca.dk www.bibliotheca.dk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: 4. januar 2009 20:15 To: rxtx at qbang.org Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Jan 29 08:33:33 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 29 Jan 2009 08:33:33 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: Projects tend to evolve from an adhoc release process to predictable releases when enough projects demand it (and help make it happen). "Its ready when Its ready" is a typical answer prior to the above. I lik$ to say "The beatings will continue until moral improves." I expect moral to improve in the next six months at most. This release i$ resolving 3 larger issues. 1) syncing of some large efforts to the same source code. 2) incorperating all community patches 3) building the binaries correctly. This does not include fixing everyones bugs. But it does include making sure the fixes get in if they are provided. Given the above, I don't expect this to be as drawn out as 2.1-7pre*. We may have several stable releases during the same period. On Thu, 29 Jan 2009, Hans Hvelplund Odborg wrote: > I know that there arent any guarantees, but could someone involved with the > development of RxTx please guesstimate when 2.2 final will be released? > > I'm not familiar with the pre-release history of 2.1-7 but I read that there > was 20 pre-relases of 2.1-7 so I guess (based on current pre-release rate) > that 2.2 may easily be more than 6 months away? > > Thanks > > Med venlig hilsen / Best regards / Med v?nliga h?lsningar > Hans Hvelplund Odborg > > BIBLIOTHECA A/S > Vallensb?kvej 22A, 2. TH ? 2605 Br?ndby ? Denmark > Mob.: +45 30235940 > Tel.: +45 70271008 > Fax: +45 70271009 > hho at bibliotheca.dk > www.bibliotheca.dk > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: 4. januar 2009 20:15 > To: rxtx at qbang.org > Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. > > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org. After this has baked, we can put the web install > in. > > Changes in rxtx 2.2 (If I missed something let me know): > > threshold fix > Alexandre Rusev > http://bugzilla.qbang.org/show_bug.cgi?id=85 > > RXTX close deadlocks in REXTXPort.finalize > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=53 > > Add ACM serial devices to all known ports. > Duncan Pierce > http://bugzilla.qbang.org/show_bug.cgi?id=51 > > Concurrency fixes for SMP/multicore systems > U. George > http://bugzilla.qbang.org/show_bug.cgi?id=100 > > Fixes for MAC systems with no drivers installed. > 1.5 stop bit fix > > Enable universal library builds for Mac OS X > Andre-John Mas ajmas at sympatico.ca > > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > Do not remove and ignore interrupts. > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=45 > > find ports which were added after program startup on Mac > OS X. > Martin Oberhuber > http://bugzilla.qbang.org/show_bug.cgi?id=48 > > Clean up CommPort Ownership code, avoid possible deadlocks, > fix lost commport ownership events. > Martin Oberhuber > http://bugzilla.qbang.org/show_bug.cgi?id=83 > > rxtx does not compile against JDK-1.6 > Neboj?a > http://bugzilla.qbang.org/show_bug.cgi?id=84 > > configure script failed at line UTS_RELEASE > megov > http://bugzilla.qbang.org/show_bug.cgi?id=80 > > code cleanup patch (extra ';' creates bug for if statements > + new String() calls removed) > Xavier Le Vourch > http://bugzilla.qbang.org/show_bug.cgi?id=77 > > Wont compile on linux ppc with glibc 2.5 - no sys/io.h > Brian Johnson > http://bugzilla.qbang.org/show_bug.cgi?id=72 > > rxtx overwrites System properties > Andrew Gillett > Nektarios K. Papadopoulos > Neboj?a > http://bugzilla.qbang.org/show_bug.cgi?id=64 > > Solaris ACM port support > Dave Cleal > http://bugzilla.qbang.org/show_bug.cgi?id=59 > > Setting of non-standard baud rate fails. > Andrew Prunicki > http://bugzilla.qbang.org/show_bug.cgi?id=58 > > RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=50 > > JavaDoc fixes > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > From mmornati at byte-code.com Fri Jan 30 02:32:44 2009 From: mmornati at byte-code.com (Marco Mornati) Date: Fri, 30 Jan 2009 10:32:44 +0100 Subject: [Rxtx] Linux Library Message-ID: <1233307964.4046.19.camel@localhost.localdomain> Hello, I made a little Applet added to my web application to support BarCode printer (on serial port). All is autoconfigured during applet init: dll/so are copied on /tmp folder on local computer and with System.load(/tmp/library.so/dll) I'm adding the library to classpath. On windows all works correctly and I'm able to print (jar is signed... without signing it there's no way to communicate with serial port). I've just a little problem on linux. It seams that library is not added to classpath, because when I try to connect with com port, applet says that is impossible to find .so. Any idea on what could be the problem? Just for information I post here my code: Container content = getContentPane(); content.setBackground(Color.white); content.setLayout(new FlowLayout()); String libraryFile = ""; String libraryName = ""; if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")) { libraryName = DLL_SERIAL_NAME; libraryFile = System.getProperty("java.io.tmpdir") + DLL_SERIAL_NAME; } else if (System.getProperty("os.name").toUpperCase().contains("LINUX")) { if (System.getProperty("os.arch").contains("i386")) { libraryName = SO_SERIAL_NAME_32; } else { libraryName = SO_SERIAL_NAME_64; } char fileSeparator = System.getProperty("file.separator").charAt(0); libraryFile = System.getProperty("java.io.tmpdir") + fileSeparator + SO_SERIAL_NAME; } System.out.println("Library File: " + libraryFile); /** * Copying DLL to java bin dir (if it's not already present) */ if (!verifyLibraryExistence(libraryFile)) { System.out.println("Library file does not exist"); copyResourceFromJar(libraryFile, libraryName); } try { System.load(libraryFile); } catch (Exception e) { System.out.println("Cannot load " + libraryFile + " you have to install it manually!!"); } try { content.add(new JLabel("Initializing Applet!")); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); content.add(new JLabel("List Porte: " + portList)); if (portList == null) { content.add(new JLabel("No Serial Port Found!!")); } while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL)) { System.out.println("Porta Trovata: " + portId.getName()); content.add(new JLabel("Porta Trovata: " + portId.getName())); } break; } } catch (Exception e) { content.add(new JLabel("Exception: " + e)); e.printStackTrace(); } Thanks a lot Bye Marco -- Dott. Ing. Mornati Marco Byte-Code s.r.l via Antonio Cechov, 1 San Giuliano Milanese (MI) E-Mail: mmornati at byte-code.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090130/c176573f/attachment-0001.bin From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0027.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0027.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0025.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0025.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0025.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0025.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0024.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0022.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0022.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0022.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0022.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0022.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0019.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0019.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0019.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment-0018.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0018.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment-0018.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment-0018.html From tjarvi at qbang.org Wed Jan 14 18:56:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 14 Jan 2009 18:56:50 -0700 (MST) Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Message-ID: On Wed, 14 Jan 2009, Jaakko Sipari wrote: > Hi (again)! > > Could someone clarify what these methods actually do and are they even > implemented? Do I get into trouble with buffer values of 0 (if I want to > handle the buffers myself)? > rxtx does not have buffers. It was not clear to me at the time why there would be a buffer when java already provides buffered input and output streams that can sit on top of rxtx. One reason I can see for implementing buffers in rxtx is to get data off the port so select() can block. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Wed Jan 14 23:23:08 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 15 Jan 2009 08:23:08 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> Message-ID: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Here's the same message for the list also. Forgot to do "Reply to all" ---------- Forwarded message ---------- From: Jaakko Sipari Date: Thu, Jan 15, 2009 at 8:22 AM Subject: Re: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize To: Trent Jarvi On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! >> >> Could someone clarify what these methods actually do and are they even >> implemented? Do I get into trouble with buffer values of 0 (if I want to >> handle the buffers myself)? >> >> > rxtx does not have buffers. It was not clear to me at the time why there > would be a buffer when java already provides buffered input and output > streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data off > the port so select() can block. > So basically those methods have currently no effect at all? - Jaakko -- Jaakko Sipari tel. +358451238191 eMail. jaakko.sipari at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090115/8b4c47c0/attachment-0017.html From tjarvi at qbang.org Thu Jan 15 18:37:12 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 15 Jan 2009 18:37:12 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: On Thu, 15 Jan 2009, Jaakko Sipari wrote: > Here's the same message for the list also. Forgot to do "Reply to all" > > ---------- Forwarded message ---------- > From: Jaakko Sipari > Date: Thu, Jan 15, 2009 at 8:22 AM > Subject: Re: [Rxtx] The functionality behind setInputBufferSize & > setOutputBufferSize > To: Trent Jarvi > > > On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! > > Could someone clarify what these methods actually do > and are they even > implemented? Do I get into trouble with buffer > values of 0 (if I want to > handle the buffers myself)? > > > rxtx does not have buffers. ?It was not clear to me at the time why > there would be a buffer when java already provides buffered input and > output streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data > off the port so select() can block. > > > So basically those methods have currently no effect at all? > Correct. You can use BufferedInputStream and BufferedOutputStream from the Java API once you get the Input/OutputStream from rxtx. But changing the input and output buffer size in rxtx is not going to change behavior. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Fri Jan 16 01:22:37 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Fri, 16 Jan 2009 10:22:37 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> > So basically those methods have currently no effect at all? >> >> > Correct. You can use BufferedInputStream and BufferedOutputStream from the > Java API once you get the Input/OutputStream from rxtx. But changing the > input and output buffer size in rxtx is not going to change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > I assume there still is some kind of buffer in rxtx (or the serial port driver) in case of processing delays. I mean, if the serial port gives data faster than can be read from the Java program using rxtx it isn't just thrown away, right? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090116/3bd9a52e/attachment-0016.html From tjarvi at qbang.org Fri Jan 16 05:17:24 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 16 Jan 2009 05:17:24 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> Message-ID: On Fri, 16 Jan 2009, Jaakko Sipari wrote: > > So basically those methods have currently no effect > at all? > > > Correct. ?You can use BufferedInputStream and BufferedOutputStream > from the Java API once you get the Input/OutputStream from rxtx. ?But > changing the input and output buffer size in rxtx is not going to > change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > > > > I assume there still is some kind of buffer in rxtx (or the serial port > driver) in case of processing delays. I mean, if the serial port gives data > faster than can be read from the Java program using rxtx it isn't just > thrown away, right? > The UART can usually hold a few bytes. The kernel driver can buffer the input. In practice, it works. With Sun commapi, the typical application has 4 buffers between the user and the incomming data. With rxtx, it is 3. BufferedInputStream -> commapi/rxtx -> kernel driver -> UART If you really do run into overflows on the UART, then hardware flow control is what you should be using and tinkering with rxtx to avoid it is not a very sound approach. -- Trent Jarvi tjarvi at qbang.org From llowrey at nuclearwinter.com Sun Jan 18 12:49:39 2009 From: llowrey at nuclearwinter.com (Larkin Lowrey) Date: Sun, 18 Jan 2009 13:49:39 -0600 Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain Message-ID: <497387D3.9040201@nuclearwinter.com> After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when running code that uses RXTXComm. The crashes only occur when using 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. As far as I can tell, the crash happens immediately on start. I can't see any evidence of much, if anything, happening before the crash. The code used to work and only stopped working after the "upgrade" to FC10. I have tried RXTX v2.1 and 2.2pre1. Any ideas? Here's the error: # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode linux-amd64) # Problematic frame: # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 --Larkin From tjarvi at qbang.org Mon Jan 19 17:48:34 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 19 Jan 2009 17:48:34 -0700 (MST) Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain In-Reply-To: <497387D3.9040201@nuclearwinter.com> References: <497387D3.9040201@nuclearwinter.com> Message-ID: On Sun, 18 Jan 2009, Larkin Lowrey wrote: > After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when > running code that uses RXTXComm. The crashes only occur when using > 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. > > As far as I can tell, the crash happens immediately on start. I can't > see any evidence of much, if anything, happening before the crash. > > The code used to work and only stopped working after the "upgrade" to > FC10. I have tried RXTX v2.1 and 2.2pre1. > > Any ideas? > > Here's the error: > > # > # An unexpected error has been detected by Java Runtime Environment: > # > # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 > # > # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode > linux-amd64) > # Problematic frame: > # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 > > > --Larkin Hi Larkin, I can think of 2 segv's in rxtx that may apply. Both are fixed in rxtx 2.2pre.. The first was that pointers required by nativeDrain needed to be stored in something larger than a 32 bit integer in java. This resulted in a crash like you see the first time the 'nativedrain' thread tried to use the pointer. The second was a concurrency issue George resolved with synchronization. The crash was usually during close but happened in the 'nativedrain' thread. (eventLoop) As mentioned, these are both fixed in the prerelease. There is a class provided in recent versions of RXTX that allow you confirm the version being used: gnu.io.RXTXVersion with member methods getVersion() and nativeGetVersion(). This allows you to confirm that you are indeed using the version you think you are. -- Trent Jarvi tjarvi at qbang.org From alexandrepoletto at gmail.com Wed Jan 21 11:48:07 2009 From: alexandrepoletto at gmail.com (Alexandre Poletto) Date: Wed, 21 Jan 2009 16:48:07 -0200 Subject: [Rxtx] work in windows but dont work in linux Message-ID: hi folks, I have an application to communicate with the serial port using rxtx, in the windows os my application works well, but when i try to run in the linux os i open the port (in windows "COM1", in Linux "/dev/ttyS0") send my commandes but i never receive any answer. I'm using ubuntu 8.10 and java 1.5, there is any configuration in that i'm missing? Thanks for the help! ps: Sorry form my bad english :( -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/70baea51/attachment-0010.html From jmudd at dtiweb.net Wed Jan 21 14:08:04 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Wed, 21 Jan 2009 16:08:04 -0500 Subject: [Rxtx] Hot unplugging of a USB device Message-ID: Looking to see if the issues surrounding an uplugging of a USB device have been resolved. I see from the mail list archives and bug reports that others have noted this issue. I have a USB GPS Receiver that is plugged into a Windows (XP) system and am using Netbeans 6.5 and Java jdk 1.6 and RXTX 2.1.7 and 2.2pre1. In the thread that is reading data via listening for a SerialEvent I can capture a Java IOException: No error in readArray. The application is essentially hung at this point. Only a termination of the application will clear it up and not leave the port hung. I had read in the archives that this is because the event loop in the native code portion is continually putting out the exceptions. I had also seen that this might be addressed in future releases. Any help is appreciated. Thanks, Jerry ________________________________ Jerry Mudd Senior Programmer 21795 Shangri-La Drive, Ste C Lexington Park, MD 20653 (301) 737-8893 (301) 737-8897 Fax jmudd at dtiweb.net www.dtiweb.net This message may contain sensitive, proprietary and/or privileged information. Disclosure is not authorized unless provided in writing by Defense Technologies, Inc. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0010.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 6296 bytes Desc: image001.gif Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0010.gif From netbeans at gatworks.com Wed Jan 21 17:33:46 2009 From: netbeans at gatworks.com (U. George) Date: Wed, 21 Jan 2009 19:33:46 -0500 Subject: [Rxtx] Hot unplugging of a USB device In-Reply-To: References: Message-ID: <4977BEEA.4020708@gatworks.com> > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:34 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:34 +1100 Subject: [Rxtx] Part 1 of 2 parts re rxtx 2.2 pre.. and OSX Message-ID: Hi, I have tried out the latest version of rxtx on a mac and can report that running with ImageJ (32 bit ) all seems to be fine. However when I attempt to use it with ImageJ64, I get a crash whenever the serial port is used. The details follow. What I did. Ran our plug-in in ImageJ 64 bit (1.42g) for Measuring, which is using the latest rxtx (the beta 2.2 compiled on 30 December 2008) for MacOSX 10.5.x) I installed this by putting the two files in the directory ~ LIBRARY/JAVA/EXTENSIONS. The Plug-in uses the serial port. The window we put up to show the numbers from the stage appeared, but only with the default "0" (zero) in each row, which is what we put there until we get data back from the port and the device attached. Then it crashed. I should point out that this all works fine using ImageJ (32 bit) 1.42g, on the same platform. So the only difference is the use of ImageJ 64 bit, and I guess the version of rxtx for 64 bit. I hope that cleverer people than me can throw some light onto this little problem. ImageJ64 seems to work ok until rxtx is called, although I haven't tried much so far, just some 3D rendering with 1 Gb of image data, which all went well, apart from the fact that the data was marginal. I am now showing the data supplied by the report to Apple window. This has three tabs, one to write your information in, one called Problem Details, and the third called SYSTEM CONFIG. These are pasted in below. Best wishes Noel Problem Details Process: JavaApplicationStub [463] Path: /Applications/ImageJ/ImageJ64.app/Contents/MacOS/JavaApplicationStub Identifier: gov.nih.info.rsb.ImageJ Version: ??? (10.2) Code Type: X86-64 (Native) Parent Process: launchd [398] Date/Time: 2009-01-19 10:48:09.342 +1100 OS Version: Mac OS X 10.5.6 (9G55) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000000029507c8 Crashed Thread: 16 Application Specific Information: Java information: Exception type: Bus Error (0xa) at pc=0x00000006ff70f418 Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0_07-b06-57 mixed mode macosx-amd64) Current thread (0x00000001020de800): JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] Stack: [0x0000000702851000,0x0000000702951000] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j gnu.io.RXTXPort.readByte()I+0 j gnu.io.RXTXPort$SerialInputStream.read()I+81 j SerialConnection.serialEvent(Lgnu/io/SerialPortEvent;)V+41 j gnu.io.RXTXPort.sendEvent(IZ)Z+382 v ~BufferBlob::StubRoutines (1) j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~BufferBlob::StubRoutines (1) Java Threads: ( => current thread ) =>0x00000001020de800 JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] 0x00000001020e8800 JavaThread "Measure XYZ" [_thread_blocked, id=44384256, stack(0x0000000702954000,0x0000000702a54000)] 0x0000000102001000 JavaThread "DestroyJavaVM" [_thread_blocked, id=25169920, stack(0x0000000101001000,0x0000000101801000)] 0x00000001020da800 JavaThread "SocketListener" [_thread_in_native, id=29671424, stack(0x0000000701b4c000,0x0000000701c4c000)] 0x00000001020b4800 JavaThread "AWT-EventQueue-0" [_thread_in_Java, id=-27992064, stack(0x00000006fe44e000,0x00000006fe54e000)] 0x0000000102096000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=-34344960, stack(0x00000006fde3f000,0x00000006fdf3f000)] 0x0000000102078000 JavaThread "AWT-Shutdown" [_thread_blocked, id=-58392576, stack(0x00000006fc750000,0x00000006fc850000)] 0x0000000102077800 JavaThread "AWT-AppKit" daemon [_thread_in_native, id=1886770976, stack(0x00007fff5f400000,0x00007fff5fc00000)] 0x0000000102044800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=-333877248, stack(0x00000006ec097000,0x00000006ec197000)] 0x0000000102043000 JavaThread "CompilerThread1" daemon [_thread_blocked, id=-334938112, stack(0x00000006ebf94000,0x00000006ec094000)] 0x0000000102041800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=-335998976, stack(0x00000006ebe91000,0x00000006ebf91000)] 0x0000000102041000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=-337059840, stack(0x00000006ebd8e000,0x00000006ebe8e000)] 0x0000000102029800 JavaThread "Finalizer" daemon [_thread_blocked, id=-338214912, stack(0x00000006ebc74000,0x00000006ebd74000)] 0x0000000102028800 JavaThread "Reference Handler" daemon [_thread_blocked, id=-339333120, stack(0x00000006ebb63000,0x00000006ebc63000)] Other Threads: 0x0000000102020800 VMThread [stack: 0x00000006eba60000,0x00000006ebb60000] [id=-340393984] 0x0000000102046000 WatcherThread [stack: 0x00000006ec19a000,0x00000006ec29a000] [id=-332816384] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 76480K, used 14448K [0x0000000105800000, 0x000000010ad50000, 0x00000002f9800000) eden space 65600K, 22% used [0x0000000105800000, 0x000000010661c398, 0x0000000109810000) from space 10880K, 0% used [0x0000000109810000, 0x0000000109810000, 0x000000010a2b0000) to space 10880K, 0% used [0x000000010a2b0000, 0x000000010a2b0000, 0x000000010ad50000) tenured generation total 174784K, used 0K [0x00000002f9800000, 0x00000003042b0000, 0x00000006e1800000) the space 174784K, 0% used [0x00000002f9800000, 0x00000002f9800000, 0x00000002f9800200, 0x00000003042b0000) compacting perm gen total 21248K, used 10319K [0x00000006e1800000, 0x00000006e2cc0000, 0x00000006e6c00000) the space 21248K, 48% used [0x00000006e1800000, 0x00000006e2213d28, 0x00000006e2213e00, 0x00000006e2cc0000) No shared spaces configured. Virtual Machine Arguments: JVM Args: -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher. framework/Resources/LauncherSupport.jar -Xms256m -Xmx24000m -Dcom.apple.macos.useScreenMenuBar=false -Dcom.apple.mrj.application.growbox.intrudes=false -Dcom.apple.mrj.application.live-resize=true -Dcom.apple.hwaccel=false -Dapple.awt.Antialiasing=false -Dcom.apple.smallTabs=true -Dapple.awt.brushMetalLook=false Java Command: Launcher Type: generic Physical Memory: Page Size = 4k, Total = 2048M, Free = 30996M Thread 0: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 com.apple.CoreFoundation 0x00007fff8204dc4f CFRunLoopRunSpecific + 1631 3 com.apple.HIToolbox 0x00007fff839fdda2 RunCurrentEventLoopInMode + 278 4 com.apple.HIToolbox 0x00007fff839fdbd8 ReceiveNextEventCommon + 322 5 com.apple.HIToolbox 0x00007fff839fda83 BlockUntilNextEventMatchingListInMode + 79 6 com.apple.AppKit 0x00007fff8299d3b0 _DPSNextEvent + 603 7 com.apple.AppKit 0x00007fff8299ccf1 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 136 8 com.apple.AppKit 0x00007fff82996a84 -[NSApplication run] + 455 9 libawt.jnilib 0x00000006ec433257 +[AWTStarter startAWT:] + 1343 10 libawt.jnilib 0x00000006ec432c46 -[CPerformer perform] + 112 11 com.apple.Foundation 0x00007fff8153f2b4 __NSThreadPerformPerform + 148 12 com.apple.CoreFoundation 0x00007fff8204e0e8 CFRunLoopRunSpecific + 2808 13 ...ple.JavaApplicationLauncher 0x0000000100005165 startupJava(LauncherArgsStruct*) + 235 14 ...ple.JavaApplicationLauncher 0x000000010000579c launchJavaApplication + 1224 15 JavaApplicationStub 0x0000000100000b9c 0x100000000 + 2972 Thread 1: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x0000000101a93b61 JVM_GetCPFieldModifiers + 128961 5 libjvm.dylib 0x0000000101a93a36 JVM_GetCPFieldModifiers + 128662 6 ...ple.JavaApplicationLauncher 0x000000010000c0ce startJavaApplication + 2886 7 ...ple.JavaApplicationLauncher 0x000000010000506d java_main_stub(void*) + 9 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 2: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libSystem.B.dylib 0x00007fff840db0b0 mach_msg_server + 436 3 libjvm.dylib 0x000000010181176d JNI_CreateJavaVM_Impl + 53277 4 libjvm.dylib 0x0000000101811375 JNI_CreateJavaVM_Impl + 52261 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 3: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x00000001018e452f JVM_Lseek + 235727 5 libjvm.dylib 0x00000001018e42df JVM_Lseek + 235135 6 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 7 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 8 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 4: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x00000001028003ea 0 + 4336911338 11 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 12 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 13 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 14 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 15 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 16 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 17 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 18 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 19 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 20 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 5: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 6: 0 libSystem.B.dylib 0x00007fff8406dd72 semaphore_wait_trap + 10 1 libjvm.dylib 0x0000000101915bdb JVM_IsPrimitiveClass + 12139 2 libjvm.dylib 0x00000001019155b5 JVM_IsPrimitiveClass + 10565 3 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 4 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 7: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 8: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 9: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x0000000101918ec8 JVM_IsPrimitiveClass + 25176 5 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 6 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 7 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 10: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x000000010191abb5 JVM_IsPrimitiveClass + 32581 4 libjvm.dylib 0x000000010191a70a JVM_IsPrimitiveClass + 31386 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 11: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 12: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x0000000102803414 0 + 4336923668 12 ??? 0x00000001028003ea 0 + 4336911338 13 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 14 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 15 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 16 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 17 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 18 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 19 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 20 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 21 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 22 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 13: 0 ??? 0x0000000102817034 0 + 4337004596 1 ??? 0x000000010280304e 0 + 4336922702 2 ??? 0x0000000102803093 0 + 4336922771 3 ??? 0x000000010280356d 0 + 4336924013 4 ??? 0x0000000102803093 0 + 4336922771 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x000000010280356d 0 + 4336924013 8 ??? 0x0000000102803093 0 + 4336922771 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x0000000102802f3a 0 + 4336922426 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102802f3a 0 + 4336922426 14 ??? 0x0000000102802f3a 0 + 4336922426 15 ??? 0x0000000102803162 0 + 4336922978 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102802f3a 0 + 4336922426 19 ??? 0x0000000102802f3a 0 + 4336922426 20 ??? 0x00000001028003ea 0 + 4336911338 21 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 22 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 23 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 24 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 25 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 26 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 27 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 28 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 29 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 30 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 14: 0 libSystem.B.dylib 0x00007fff840f210e accept + 10 1 libnet.jnilib 0x00000006ff6b6b11 Java_java_net_PlainSocketImpl_socketAccept + 277 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x0000000102802f3a 0 + 4336922426 4 ??? 0x0000000102802f3a 0 + 4336922426 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x0000000102803414 0 + 4336923668 8 ??? 0x00000001028003ea 0 + 4336911338 9 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 10 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 11 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 12 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 13 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 14 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 15 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 16 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 17 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 18 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 15: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x000000010280304e 0 + 4336922702 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102803414 0 + 4336923668 14 ??? 0x0000000102803093 0 + 4336922771 15 ??? 0x0000000102803093 0 + 4336922771 16 ??? 0x0000000102803093 0 + 4336922771 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102803414 0 + 4336923668 19 ??? 0x00000001028003ea 0 + 4336911338 20 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 21 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 22 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 23 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 24 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 25 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 26 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 27 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 28 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 29 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 Crashed: 0 librxtxSerial.jnilib 0x00000006ff70f418 read_byte_array + 68 1 librxtxSerial.jnilib 0x00000006ff70f9b3 Java_gnu_io_RXTXPort_readByte + 93 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x000000010280304e 0 + 4336922702 4 ??? 0x000000010280304e 0 + 4336922702 5 ??? 0x0000000102803414 0 + 4336923668 6 ??? 0x00000001028003ea 0 + 4336911338 7 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 8 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 9 libjvm.dylib 0x00000001018e5be8 JVM_Lseek + 241544 10 libjvm.dylib 0x0000000101900b11 JVM_MonitorWait + 17249 11 libjvm.dylib 0x0000000101a1e59e JVM_DisableCompiler + 1166 12 librxtxSerial.jnilib 0x00000006ff70d91e send_event + 132 13 librxtxSerial.jnilib 0x00000006ff70e82b report_serial_events + 92 14 librxtxSerial.jnilib 0x00000006ff7108c9 Java_gnu_io_RXTXPort_eventLoop + 237 15 ??? 0x000000010280e878 0 + 4336969848 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x00000001028003ea 0 + 4336911338 18 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 19 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 20 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 21 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 22 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 23 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 24 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 25 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 26 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 27 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 17: 0 libSystem.B.dylib 0x00007fff84074d02 __semwait_signal + 10 1 libSystem.B.dylib 0x00007fff840dce91 usleep + 57 2 librxtxSerial.jnilib 0x00000006ff70d729 drain_loop + 45 3 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 4 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 crashed with X86 Thread State (64-bit): rax: 0x00000000029507c0 rbx: 0x0000000000000041 rcx: 0x0000000000000065 rdx: 0x0000000000000002 rdi: 0x00000006ff71205e rsi: 0x00000006ff711c67 rbp: 0x0000000702950000 rsp: 0x000000070294fef0 r8: 0x000000000000004d r9: 0x00000006e21d64c0 r10: 0x00000006e21d38e8 r11: 0x00000000000000d2 r12: 0x00000001020de998 r13: 0x00000006e21d93b0 r14: 0x0000000000000032 r15: 0x00000000029507c0 rip: 0x00000006ff70f418 rfl: 0x0000000000010202 cr2: 0x00000000029507c8 Continued in the message part 2 -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:41 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:41 +1100 Subject: [Rxtx] Part 2 re rxtx 2.2 pre... and MacOSX Message-ID: Continued from Part 1. Binary Images: 0x100000000 - 0x100000fff JavaApplicationStub ??? (???) /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationS tub 0x100004000 - 0x100011fff com.apple.JavaApplicationLauncher 12.2.0 (12.2.0) /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/JavaApplicationLauncher 0x10001a000 - 0x100022ffd com.apple.JavaVM 12.2.0 (12.2.0) <2b178e8d4bbcc0aa427c2f3f71bb2fcb> /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM 0x100055000 - 0x10005dff0 libverify.dylib ??? (???) <56eac95084cb86cd1339a721b1353182> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libveri fy.dylib 0x100063000 - 0x10006cffb JavaNativeFoundation ??? (???) <68ca6409dc49542301edda1e0744ac69> /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNative Foundation.framework/Versions/A/JavaNativeFoundation 0x1000a8000 - 0x1000c7fef libjava.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjava .jnilib 0x1000d8000 - 0x1000e5ffb libzip.jnilib ??? (???) <5b6dce7c9a1f25aa5dff1a633c9dc342> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libzip. jnilib 0x101803000 - 0x101eafff3 libjvm.dylib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bundle/Libra ries/libjvm.dylib 0x6ec2c5000 - 0x6ec2c6fff liblauncher.jnilib ??? (???) <567fa54a222b965b2c4aefea21d9800a> /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/Resources/liblauncher.jnilib 0x6ec431000 - 0x6ec5e4fff libawt.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libawt. jnilib 0x6fdc3b000 - 0x6fdc3cfff ATSHI.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/Resources/ATSHI.dylib 0x6fdd6e000 - 0x6fdd6efff libcmm.jnilib ??? (???) <114e1a620a6920d77bf09bd57a7f7d52> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libcmm. jnilib 0x6fdd9e000 - 0x6fde1fff7 libfontmanager.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libfont manager.jnilib 0x6fdf41000 - 0x6fdf8ffff libsuncmm.jnilib ??? (???) <47330f1f17822de3a5cf921e07615cf7> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libsunc mm.jnilib 0x6fdf95000 - 0x6fdfc4ff7 libjpeg.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjpeg .jnilib 0x6ff6ae000 - 0x6ff6baffb libnet.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnet. jnilib 0x6ff6c0000 - 0x6ff6c4fff libnio.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnio. jnilib 0x6ff6d4000 - 0x6ff6e8ff7 libdcpr.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libdcpr .jnilib 0x6ff70c000 - 0x6ff713fff +librxtxSerial.jnilib ??? (???) <5133deacebd01ceab7d528c541241956> /Library/Java/Extensions/librxtxSerial.jnilib 0x6ff734000 - 0x6ff74bfef libJapaneseConverter.dylib ??? (???) <64cca6bb4650a269f49a8427507e4963> /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib 0x70204f000 - 0x702218fef com.apple.RawCamera.bundle 2.0.10 (2.0.10) /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera 0x7fff5fc00000 - 0x7fff5fc2e643 dyld 97.1 (???) /usr/lib/dyld 0x7fff80003000 - 0x7fff80146ffb com.apple.audio.toolbox.AudioToolbox 1.5.2 (1.5.2) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x7fff801d2000 - 0x7fff801d5ffb com.apple.help 1.1 (36) <9000c05ccad96fdcc25bc35264abf587> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.frame work/Versions/A/Help 0x7fff801d6000 - 0x7fff80211fff com.apple.AE 402.2 (402.2) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.f ramework/Versions/A/AE 0x7fff80212000 - 0x7fff80257fef libRIP.A.dylib ??? (???) <8c818d7fd3dc57839ac48caf107ff4c0> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x7fff80258000 - 0x7fff8029bfef com.apple.QD 3.11.54 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/QD.framework/Versions/A/QD 0x7fff8029c000 - 0x7fff802dffef libTIFF.dylib ??? (???) <86be7909f46cc044a887cbb60ab7826d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x7fff802e0000 - 0x7fff803d4fff libobjc.A.dylib ??? (???) <118dc1ae05e685ad64290352fc94f1f0> /usr/lib/libobjc.A.dylib 0x7fff803d5000 - 0x7fff8045dfe7 libsqlite3.0.dylib ??? (???) <3c7ab3523b816dbd3e039ee7e6e2c580> /usr/lib/libsqlite3.0.dylib 0x7fff8045e000 - 0x7fff80466ffa libbsm.dylib ??? (???) <4d838c0d8a74fe61c781a53a8723303d> /usr/lib/libbsm.dylib 0x7fff80467000 - 0x7fff80497fff com.apple.shortcut 1 (1.0) <9822328df9321a661af3afcc841e8f80> /System/Library/PrivateFrameworks/Shortcut.framework/Versions/A/Shortcut 0x7fff80498000 - 0x7fff8049bfff com.apple.securityhi 3.0 (30817) <00ddd6e60692b62b7649573eab8aef5a> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI .framework/Versions/A/SecurityHI 0x7fff8049c000 - 0x7fff8049efff com.apple.print.framework.Print 218.0.2 (220.1) <2b847a0a1cd885f596a4d10409d50ba3> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.fram ework/Versions/A/Print 0x7fff8049f000 - 0x7fff805dbfe9 com.apple.ImageIO.framework 2.0.4 (2.0.4) <47dcdc0b5986b2c157e0b6dae48ce464> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/ImageIO 0x7fff805dc000 - 0x7fff805f9fef com.apple.CoreVideo 1.5.1 (1.5.1) <78253b3fe8d3dcc90f159d7ed866c295> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x7fff805fa000 - 0x7fff8068bfff com.apple.SearchKit 1.2.1 (1.2.1) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Sear chKit.framework/Versions/A/SearchKit 0x7fff8068c000 - 0x7fff80e49fef libBLAS.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libBLAS.dylib 0x7fff80e4a000 - 0x7fff81416fff com.apple.CoreGraphics 1.407.2 (???) <436dbc70f8c9b29b3beb1d2de220acf2> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/CoreGraphics 0x7fff81417000 - 0x7fff8141dfff com.apple.DiskArbitration 2.2.1 (2.2.1) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitrat ion 0x7fff8141e000 - 0x7fff8145bff7 com.apple.SystemConfiguration 1.9.2 (1.9.2) <150119d0cecb0c80f6736b9881c2411e> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemCo nfiguration 0x7fff8145c000 - 0x7fff81523fec com.apple.CFNetwork 422.11 (422.11) <570ca46de3b907cb1c8e33fc62f562b4> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNe twork.framework/Versions/A/CFNetwork 0x7fff81524000 - 0x7fff8152dfff libCGATS.A.dylib ??? (???) <722a0bbd58740d46739008e881010631> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib 0x7fff8152e000 - 0x7fff81533fff com.apple.CommonPanels 1.2.4 (85) <2cec1ecc95cf1ecea8bea030975a46b8> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPane ls.framework/Versions/A/CommonPanels 0x7fff81534000 - 0x7fff817cffe3 com.apple.Foundation 6.5.7 (677.22) <8134977fcc57198a53dc494b60592980> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x7fff817d0000 - 0x7fff817d0ffd com.apple.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x7fff817d1000 - 0x7fff81cf1fc6 libGLProgrammability.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgra mmability.dylib 0x7fff81cf2000 - 0x7fff81cf4fff com.apple.NavigationServices 3.5.2 (163) <7cb7f3fe7f9d56ec89ef28a6d3a1da7d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Navigation Services.framework/Versions/A/NavigationServices 0x7fff81cf5000 - 0x7fff81d32fe7 com.apple.coreui 1.2 (62) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x7fff81d33000 - 0x7fff81d33fff com.apple.Carbon 136 (136) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x7fff81d34000 - 0x7fff81d42fff libCSync.A.dylib ??? (???) <61f6cc104b3e9b77cd583635a3a9a5cf> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x7fff81d43000 - 0x7fff81d45ff9 libRadiance.dylib ??? (???) <6d9f2235e8f70a7aedfc59383a7548d8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x7fff81d46000 - 0x7fff81db5ff9 com.apple.print.framework.PrintCore 5.5.3 (245.3) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/PrintCore.framework/Versions/A/PrintCore 0x7fff81db6000 - 0x7fff81db6ff8 com.apple.ApplicationServices 34 (34) <81cd02cc2ccf4e47e51d03db860da556> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Applicat ionServices 0x7fff81db7000 - 0x7fff81dd8fff libresolv.9.dylib ??? (???) <38318f9fbcfbdb384e0f9b08cc0e757a> /usr/lib/libresolv.9.dylib 0x7fff81dd9000 - 0x7fff81e4ffef libvMisc.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvMisc.dylib 0x7fff81e50000 - 0x7fff81e52ff7 libffi.dylib ??? (???) <920bb19728451f35703bb95dc908c7ca> /usr/lib/libffi.dylib 0x7fff81e53000 - 0x7fff81eeefe7 com.apple.ink.framework 101.3 (86) <60c6579faf114ea9677fd9ae25389ed2> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framew ork/Versions/A/Ink 0x7fff81eef000 - 0x7fff81f0dfff libPng.dylib ??? (???) <4017eab74319a648dfd73b7d503e557d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x7fff81f0e000 - 0x7fff81f24ff9 com.apple.ImageCapture 5.0.1 (5.0.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCaptu re.framework/Versions/A/ImageCapture 0x7fff81f25000 - 0x7fff81f3dfff com.apple.DictionaryServices 1.0.0 (1.0.0) <78ea11e9a92120f76d69efa24b8d1f95> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Dict ionaryServices.framework/Versions/A/DictionaryServices 0x7fff81f3e000 - 0x7fff81f42fff libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib 0x7fff81f43000 - 0x7fff81fe3fe3 com.apple.ApplicationServices.ATS 3.4 (???) <47cf09bf78935889f17f1b6b09badf0d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/ATS 0x7fff81fe4000 - 0x7fff8211bfff com.apple.CoreFoundation 6.5.5 (476.17) <51930d43c7c2d8fb24148cbfc05bba0f> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundatio n 0x7fff8211c000 - 0x7fff82126fff com.apple.speech.recognition.framework 3.7.24 (3.7.24) <2399374b096b284345daba82e2cb833d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechReco gnition.framework/Versions/A/SpeechRecognition 0x7fff82127000 - 0x7fff82159ff7 libauto.dylib ??? (???) /usr/lib/libauto.dylib 0x7fff8215a000 - 0x7fff821cefe7 libstdc++.6.dylib ??? (???) <565ee6f798f7fef6f804c60682787280> /usr/lib/libstdc++.6.dylib 0x7fff821cf000 - 0x7fff8228dfff edu.mit.Kerberos 6.0.12 (6.0.12) /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x7fff8228e000 - 0x7fff8228effb com.apple.installserver.framework 1.0 (8) /System/Library/PrivateFrameworks/InstallServer.framework/Versions/A/Install Server 0x7fff8228f000 - 0x7fff82293fff libGIF.dylib ??? (???) <66436b84211fe0e723051eab15af0aca> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x7fff82294000 - 0x7fff8258ffe3 com.apple.CoreServices.CarbonCore 786.10 (786.10) <2ac701edf3ca98a86ae9d5f733200b40> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Carb onCore.framework/Versions/A/CarbonCore 0x7fff82590000 - 0x7fff825aafff libvDSP.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvDSP.dylib 0x7fff825ab000 - 0x7fff827b1ff3 com.apple.security 5.0.4 (34102) <47c559b17c1f51998e7a981d0fbec4c8> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x7fff827b2000 - 0x7fff827d9fff libxslt.1.dylib ??? (???) /usr/lib/libxslt.1.dylib 0x7fff827da000 - 0x7fff82948fff libicucore.A.dylib ??? (???) <374ddaf141bf88dba00ab9058f2dbad6> /usr/lib/libicucore.A.dylib 0x7fff82949000 - 0x7fff8295dff7 libGL.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x7fff8295e000 - 0x7fff83286fff com.apple.AppKit 6.5.6 (949.43) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x7fff83287000 - 0x7fff83667fef com.apple.QuartzCore 1.5.7 (1.5.7) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x7fff83668000 - 0x7fff836b8fe7 com.apple.Metadata 10.5.2 (398.25) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Meta data.framework/Versions/A/Metadata 0x7fff836b9000 - 0x7fff836baff3 com.apple.audio.units.AudioUnit 1.5 (1.5) /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x7fff836bb000 - 0x7fff83710fe3 com.apple.HIServices 1.7.0 (???) <6bef766448d67adb91901b432629ea0f> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/HIServices.framework/Versions/A/HIServices 0x7fff83711000 - 0x7fff83711ffd com.apple.Accelerate.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/vecLib 0x7fff83712000 - 0x7fff837a7ffb com.apple.LaunchServices 290.3 (290.3) <56544e16c5192d2ce72df772901fcaef> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Laun chServices.framework/Versions/A/LaunchServices 0x7fff837a8000 - 0x7fff8382ffef com.apple.audio.CoreAudio 3.1.1 (3.1.1) <9c1714647fd7515c900362ad2ac76874> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x7fff83830000 - 0x7fff83893fef libGLU.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dyli b 0x7fff83894000 - 0x7fff838a2ff9 com.apple.helpdata 1.0.1 (14.2) /System/Library/PrivateFrameworks/HelpData.framework/Versions/A/HelpData 0x7fff838a3000 - 0x7fff838afff1 libgcc_s.1.dylib ??? (???) <23fa31a628c1ea8a62ac529fa333b6e1> /usr/lib/libgcc_s.1.dylib 0x7fff838b0000 - 0x7fff838d2fff libJPEG.dylib ??? (???) <4257ab268996bbeb93b47946df181cdc> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x7fff838d3000 - 0x7fff838d3ffd com.apple.Accelerate 1.4.2 (Accelerate 1.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x7fff838d4000 - 0x7fff838d4ff8 com.apple.Cocoa 6.5 (???) <8c59f679ffbd9178134df1d83dedde28> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa 0x7fff838d5000 - 0x7fff839cafff libxml2.2.dylib ??? (???) <8226d1180354f493954c5fa1fc0e1154> /usr/lib/libxml2.2.dylib 0x7fff839cb000 - 0x7fff839dafe7 com.apple.opengl 1.5.9 (1.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x7fff839db000 - 0x7fff83cc2feb com.apple.HIToolbox 1.5.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. framework/Versions/A/HIToolbox 0x7fff83cc3000 - 0x7fff83d03fef com.apple.framework.IOKit 1.5.1 (???) <17e6707127a60c5e2d7a9bd2b7bf2db0> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x7fff83d04000 - 0x7fff83dc8fe2 com.apple.vImage 3.0 (3.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage .framework/Versions/A/vImage 0x7fff83dc9000 - 0x7fff83df3fff libcups.2.dylib ??? (???) /usr/lib/libcups.2.dylib 0x7fff83df4000 - 0x7fff83df4ffa com.apple.CoreServices 32 (32) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x7fff83df5000 - 0x7fff83ed6fff libcrypto.0.9.7.dylib ??? (???) <66f1f8773bd9fdfdcfd09e2b4b010636> /usr/lib/libcrypto.0.9.7.dylib 0x7fff83ed7000 - 0x7fff83f87fef com.apple.CoreServices.OSServices 226.5 (226.5) <1c38f727b3ad3293272db7323b37c735> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSSe rvices.framework/Versions/A/OSServices 0x7fff83f88000 - 0x7fff83fa2fff com.apple.openscripting 1.2.8 (???) <0674c4e3353c677c9f58df3297ae559b> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScript ing.framework/Versions/A/OpenScripting 0x7fff83fa3000 - 0x7fff83fdfff7 libGLImage.dylib ??? (???) <02258bcdbe8defdb254acc077a81dd9b> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage. dylib 0x7fff83fe0000 - 0x7fff83ff1fff com.apple.speech.synthesis.framework 3.7.1 (3.7.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x7fff83ff2000 - 0x7fff8406cff3 com.apple.CoreText 2.0.3 (???) <827bbfef670df72316719c25bfb39915> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreText.framework/Versions/A/CoreText 0x7fff8406d000 - 0x7fff841f8ffb libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0x7fff841f9000 - 0x7fff8420affd libz.1.dylib ??? (???) /usr/lib/libz.1.dylib 0x7fff8420b000 - 0x7fff842befef com.apple.DesktopServices 1.4.7 (1.4.7) /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/D esktopServicesPriv 0x7fff842bf000 - 0x7fff84677fff libLAPACK.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libLAPACK.dylib 0x7fff84678000 - 0x7fff84743fef com.apple.ColorSync 4.5.1 (4.5.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ColorSync.framework/Versions/A/ColorSync 0x7fff84744000 - 0x7fff84847feb com.apple.CoreData 100.1 (186) <074abc7f43f81f7885e4d0674a8be4bc> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x7fffffe00000 - 0x7fffffe01780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0xfffffffffffec000 - 0xfffffffffffeffff libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib SYSTEM CONFIG Model: MacPro3,1, BootROM MP31.006C.B05, 8 processors, Quad-Core Intel Xeon, 2.8 GHz, 32 GB Graphics: kHW_ATIrv630Item, ATI Radeon HD 2600, spdisplays_pcie_device, 256 MB Memory Module: DIMM Riser B/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Bluetooth: Version 2.1.3f8, 2 service, 1 devices, 1 incoming serial ports Network Service: Ethernet 2, Ethernet, en1 PCI Card: ATI Radeon HD 2600, display, Slot-1 Serial ATA Device: WDC WD3200AAJS-41VWA0, 298.09 GB Parallel ATA Device: PIONEER DVD-RW DVR-112D USB Device: Keyboard Hub, (null) mA USB Device: Apple Optical USB Mouse, (null) mA USB Device: Apple Keyboard, (null) mA USB Device: hub_device, (null) mA USB Device: Apple Cinema HD Display, (null) mA USB Device: Keyspan USA-28Xb, (null) mA USB Device: Bluetooth USB Host Controller, (null) mA FireWire Device: built-in_hub, unknown_value, unknown_speed FireWire Device: My Book, WD, 800mbit_speed FireWire Device: unknown_device, unknown_value, unknown_speed -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From jaakko.sipari at gmail.com Thu Jan 22 03:00:03 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 22 Jan 2009 12:00:03 +0200 Subject: [Rxtx] RXTX compilation with GCJ possible? Message-ID: <901f25b80901220200s53792317o374b80cbb6066a52@mail.gmail.com> Hi! Does anyone have experience on using RXTX in a GCJ compiled Java application? I'm interested whether this is possible in Windows and/or in Linux platforms. And of course what does it take to get it work, or does it just work out of the box. Ultimately my aim here would be to move to a more time deterministic system by utilizing GCJ, jRate & Javolution and possibly run the RXTX (and other important) threads at a priority higher than the garbage collector. This of course would require some modification for the RXTX threads to run in a Javolution pool context or non allocating real time contexts so they wouldn't produce any garbage, but that's something to hack on later. For now I'd just like to know if there are any obstacles on the road to compiling & running RXTX with GCJ. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/5592681a/attachment-0010.html From jmudd at dtiweb.net Thu Jan 22 06:21:03 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Thu, 22 Jan 2009 08:21:03 -0500 Subject: [Rxtx] Hot unplugging of a USB device References: <4977BEEA.4020708@gatworks.com> Message-ID: U. George, Thanks for the information. How did you resolve your USB/GPS device on Linux? My application has to run on both Linux and Windows eventually. Thanks, Jerry -----Original Message----- From: U. George [mailto:netbeans at gatworks.com] Sent: Wednesday, January 21, 2009 7:34 PM To: Jerry Mudd Cc: rxtx at qbang.org Subject: Re: [Rxtx] Hot unplugging of a USB device > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From m.kirkland at comcast.net Thu Jan 22 09:21:01 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Thu, 22 Jan 2009 08:21:01 -0800 Subject: [Rxtx] Serial port control lines change with call to getPortIdentifiers() on Linux Message-ID: <94443DEFFD574B6CA8DDB2B201D9E007@bengal.net> Hi All ! I have noticed an issue with RXTX on Ubuntu Linux 8.10 that has prevented me from being able to use RXTX on Linux. I have noticed this issue on both the rxtx 2.1.7 and the new rxtx2.2pre1. When I execute the following line to get the ports on a system - java.util.Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); Both DTR and RTS become active on ttyS0 and only ttyS0, not ttyS1 (I only have 2 ports). I see this prior to opening any ports or making any other calls to RXTX. I have stepped it though with the debugger and I am sure this is the trigger. My application uses these control lines to perform functions other then the standard flow control so it is critical that I be able to control them exactly. I would also think that folks using RXTX for more standard serial IO would also have issues with devices starting to talk before a listener was ready. I checked Windows XP and I do not see this issue (but I only have a com1 on the Windows computer). I also noticed that the DTR line blips when setting up a port on 2.2.pre1 like it does on 2.1.7r2. This it the same issue that the folks at http://www.codeskin.com/ patched. I see this issue on both Linux and Windows XP. Any help or clues would be greatly appreciated. If I can provide any additional info or do any testing I would be glad to help out to get version 2.2 in top shape for release. BTW I have written a simple dynamic loader to load the RXTX jar and native code that is drive by the os.name and os.arch system properties. I would be more then happy to contribute this to the project if folks though it would be useful. Its more convenient then having to manage copying the files around to various JVM's. TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/eab26bae/attachment-0009.html From josefk_5 at yahoo.com Fri Jan 23 09:44:06 2009 From: josefk_5 at yahoo.com (Josef Kahsay) Date: Fri, 23 Jan 2009 08:44:06 -0800 (PST) Subject: [Rxtx] Help on Accessing RS232 Message-ID: <509617.88308.qm@web38205.mail.mud.yahoo.com> Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS From m.kirkland at comcast.net Sat Jan 24 01:28:52 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Sat, 24 Jan 2009 00:28:52 -0800 Subject: [Rxtx] Help on Accessing RS232 In-Reply-To: <509617.88308.qm@web38205.mail.mud.yahoo.com> References: <509617.88308.qm@web38205.mail.mud.yahoo.com> Message-ID: <665887C02E1446708CE392FE0BD73D79@bengal.net> It seems to me that you are having a classic java classpath issue. Java classpath issues can be annoying to solve sometimes. As some random guesses I would suggest you look at the following. 1 - You might not be running the JVM from the location that you think you are (gets me all the time). I which Windows had a which command. 2 - You don't mention what development environment you are using like Eclipse etc., and if you are trying to run the demo from inside the development environment. If so, do whatever is appropriate for the development environment to control the classpath. In Eclipse this would involve adding a "User Library" to point to the jar and native code. 3 - Once you get the classpath ok, the next thing you might run into is not being able to load the native library. 4 - I have found that on XP I can place the RXTX jar and native library in the same directory as my application's jar file (and a class-path entry in the application's jar file manifest) and it all works. 5 - If you need more control of managing different versions of RXTX for different OS platforms, I have a dynamic RXTX loader I can send you (but I recommend getting the simple case working first). Let me know if this helps. Mike -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Josef Kahsay Sent: Friday, January 23, 2009 8:44 AM To: rxtx at qbang.org Subject: [Rxtx] Help on Accessing RS232 Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jacomoman at hotmail.com Mon Jan 26 12:12:27 2009 From: jacomoman at hotmail.com (Joseph Schmoley) Date: Mon, 26 Jan 2009 11:12:27 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: Message-ID: Hi All, First, let me thank you all for your effort on this excellent project. I've been using the Win32 binaries in the 2.1-7r2 package without any problems on WinXP Pro (32-bit). I then tried the .jnilib of the same version on my Mac OSX 10.5 64-bit darwin and got the familiar UnsatisfiedLinkError problem. I read up on all the mailing list archive messages and found this one (http://mailman.qbang.org/pipermail/rxtx/2008-May/2436699.html) suggesting that perhaps rxtx-devel from CVS would have a fix. So I got latest rxtx-devel + commapi-0-0-1 as suggested by the CVS page at rxtx.org. I even set my CFLAGS and LDFLAGS to include "-arch x86_64 -arch ppc64", but as it turned out, the latest configure script didn't need it. In any case, I configured and built rxtx-devel with no errors (that I could see) and transferred the resulting i386-apple-darwin9.6.0/librxtxSerial.jnilib to where my java.library.path is pointing to and ran my test class. Whereas before I was getting UnsatisfiedLinkError, I now simply get this: Invalid memory access of location 22d927c8 rip=22356420 Invalid memory access of location 22d9292c rip=22357540 [error occurred during error reporting (null), id 0xa] ./run-class.sh: line 10: 15647 Segmentation fault java -Djava.library.path=./lib/native -Dapp.logging.file.path=./log/runtime.log -classpath .:${MYCP} ${CLASSNAME} "${CMD}" run-class.sh is simply a script I've got to run my test class and all that class does is invoke the RXTX API, first one being: CommPortIdentifier.getPortIdentifiers(). Has anyone had any luck with getting latest CVS sources to work on Mac OS X 10.5 64-bit? Any help/pointers would be greatly appreciated. Thank you in advance. -Jac I've attached my configure and make output as txt files. Here's all my build/machine environment info, as per the troubleshooting wiki page: Mac OS X 10.5.6 (9G55) ----------------------------------------------- /usr/bin/java -version java version "1.6.0_07" Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153) Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode) ----------------------------------------------- Darwin my-macbook.local 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 ----------------------------------------------- autoconf (GNU Autoconf) 2.61 Copyright (C) 2006 Free Software Foundation, Inc. This is free software. You may redistribute copies of it under the terms of the GNU General Public License . There is NO WARRANTY, to the extent permitted by law. Written by David J. MacKenzie and Akim Demaille. ----------------------------------------------- automake (GNU automake) 1.10 Written by Tom Tromey and Alexandre Duret-Lutz . Copyright 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ----------------------------------------------- $ libtool -V Apple Computer, Inc. version cctools-698.1 ----------------------------------------------- GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program built for powerpc-apple-darwin9.0 ----------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: my-configure.out.txt Type: application/octet-stream Size: 6934 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090126/89d9c7f6/attachment-0010.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: my-make.out.txt Type: application/octet-stream Size: 7737 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090126/89d9c7f6/attachment-0011.obj From kintel at sim.no Mon Jan 26 16:16:19 2009 From: kintel at sim.no (Marius Kintel) Date: Tue, 27 Jan 2009 00:16:19 +0100 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: Message-ID: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Hi Jac, I've had the same issue, and I suggested a patch to partially fix it a while back: http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html I don't know the status of this in the current incarnation of the rxtx code and I have reverted to Java-1.5 since then.. ~/= Marius -- We are Elektropeople for a better living. From tjarvi at qbang.org Tue Jan 27 08:08:54 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 27 Jan 2009 08:08:54 -0700 (MST) Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: On Tue, 27 Jan 2009, Marius Kintel wrote: > Hi Jac, > > I've had the same issue, and I suggested a patch to partially fix it a > while back: > http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html > > I don't know the status of this in the current incarnation of the rxtx > code and I have reverted to Java-1.5 since then.. > > ~/= Marius > > -- > We are Elektropeople for a better living. > Hmm. That did not get in. I can add it and put a new prerelease out this week. The eis must be a regression. I was sure we fixed that. -- Trent Jarvi tjarvi at qbang.org From jacomoman at hotmail.com Tue Jan 27 08:48:16 2009 From: jacomoman at hotmail.com (Joseph Schmoley) Date: Tue, 27 Jan 2009 07:48:16 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: That would be excellent Trent. I've got a project partially on hold because of this. It runs great on Win32 (XP/Vista), it just has to do the same on Mac 64-bit and Linux 32-bit. I look forward to this pre-release. Again, thanks a bunch to you and all the other code contributors for this excellent project. I wish I could donate something to you guys. I couldn't find a donation link anywhere. RxTx has been a great help with my project. -Jac From: Trent Jarvi Sent: Tuesday, January 27, 2009 7:08 AM To: Marius Kintel Cc: Joseph Schmoley ; rxtx at qbang.org Subject: Re: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit On Tue, 27 Jan 2009, Marius Kintel wrote: > Hi Jac, > > I've had the same issue, and I suggested a patch to partially fix it a > while back: > http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html > > I don't know the status of this in the current incarnation of the rxtx > code and I have reverted to Java-1.5 since then.. > > ~/= Marius > > -- > We are Elektropeople for a better living. > Hmm. That did not get in. I can add it and put a new prerelease out this week. The eis must be a regression. I was sure we fixed that. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090127/bbd287bb/attachment-0004.html From bschlining at gmail.com Tue Jan 27 09:38:26 2009 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 27 Jan 2009 08:38:26 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: > That would be excellent Trent. I've got a project partially on hold > because of this. It runs great on Win32 (XP/Vista), it just has to do the > same on Mac 64-bit and Linux 32-bit. I look forward to this pre-release. > I'm in the same spot too. Looking forward to the pre-release! -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090127/2275013b/attachment-0004.html From andrew.paverd at rorotika.com Wed Jan 28 03:14:58 2009 From: andrew.paverd at rorotika.com (Andrew Paverd) Date: Wed, 28 Jan 2009 12:14:58 +0200 Subject: [Rxtx] RXTX not working on Solaris Message-ID: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Hi all, I am attempting to use RXTX on a Sun SPARC server running Solaris. I have tried the binaries from both the latest release (2.1-7) and the pre-release (2.2pre1). The 2.1-7 driver gives the following error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: fatal: libgcc_s.so.1: open failed: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)" I'm not sure what this "libgcc_s.so.1" file does in terms of RXTX but its absence is preventing the application from running. With the 2.2pre1 binary, the application loads without any issue but does not detect any comm-ports. I know that there are multiple ports available because when using the Sun javax.comm library for Solaris SPARC, the ports are all correctly discovered and the application can read from and write to them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in the 2.2 release. Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if so, how did you do it (which versions did you use etc.)? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090128/a97b220d/attachment-0004.html From tjarvi at qbang.org Wed Jan 28 17:01:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 28 Jan 2009 17:01:50 -0700 (MST) Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: On Wed, 28 Jan 2009, Andrew Paverd wrote: > > Hi all, > > ? > > I am attempting to use RXTX on a Sun SPARC server running Solaris. I have > tried the binaries from both the latest release (2.1-7) and the pre-release > (2.2pre1). > > ? > > The 2.1-7 driver gives the following error: > > ? > > ?Exception in thread "main" java.lang.UnsatisfiedLinkError: > /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: > fatal: libgcc_s.so.1: open failed: No such file or directory > > ??????? at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > ??????? at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) > > ??????? at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) > > ??????? at java.lang.Runtime.loadLibrary0(Runtime.java:823) > > ??????? at java.lang.System.loadLibrary(System.java:1030) > > ??????? at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)? > > ? > > I?m not sure what this ?libgcc_s.so.1? file does in terms of RXTX but its > absence is preventing the application from running. > > ? > > With the 2.2pre1 binary, the application loads without any issue but does > not detect any comm-ports. I know that there are multiple ports available > because when using the Sun javax.comm library for Solaris SPARC, the ports > are all correctly discovered and the application can read from and write to > them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in > the 2.2 release. > > ? > > Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if > so, how did you do it (which versions did you use etc.)? > > ? Hi Andrew ld.so/libgcc_s.so are part of GNU gcc/ld. They are available for solaris. I'm not sure how to link them without requiring them. It is also possible to compile rxtx with Sun's compiler if you have it. Perhaps someone here knows how to get rxtx compiled on Solaris using gcc without requiring those libs by everyone? -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Jan 28 17:39:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 28 Jan 2009 17:39:08 -0700 (MST) Subject: [Rxtx] Problem on 'Trouble Shooting' wiki page. Message-ID: It has been pointed out that the rxtx wiki page says usermod -G may be used to update the group a user is in. http://rxtx.qbang.org/wiki/index.php/Trouble_shooting The corrected text now says to use usermod -aG to add the user to a group in addition to their current group(s). The previous -G version would replace the users current groups with the new group. Replacing group information can cause significant problems for end users. If you have information based upon the wiki, please update your content. Thanks, -- Trent Jarvi tjarvi at qbang.org From andrew.paverd at rorotika.com Thu Jan 29 02:15:35 2009 From: andrew.paverd at rorotika.com (Andrew Paverd) Date: Thu, 29 Jan 2009 11:15:35 +0200 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Thanks for the advice Trent - I was originally using the precompiled librxtxSerial.so. I've subsequently compiled rxtx for Solaris (using gcc) and after copying the libgcc_s.so file to my .../jre/lib/sparc directory, the library loads. However, it does not detect any ports. When I call the getComPortIdentifiers() nothing is returned and I can't connect to any port. Sun's javax.comm package detects and can connect to all the ports. This is the same as when I tried the 2.2pre1 library. Are there any extra steps that must be taken to detect ports on Solaris? (user is member of uucp group) Thanks, Andrew From tristan.dyer at cgi.com Thu Jan 29 05:57:25 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 29 Jan 2009 07:57:25 -0500 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D030BE152@MTL-MSG-02.cgiclients.com> Andrew, I had the same problem, but before I got too far the scope of my project changed, and I don't have to support Solaris anymore.. I was getting a weird error, file does not exist but should, or something like that. The project ended before I figured out why. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Andrew Paverd Sent: January 29, 2009 5:16 AM To: 'Trent Jarvi' Cc: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working on Solaris Thanks for the advice Trent - I was originally using the precompiled librxtxSerial.so. I've subsequently compiled rxtx for Solaris (using gcc) and after copying the libgcc_s.so file to my .../jre/lib/sparc directory, the library loads. However, it does not detect any ports. When I call the getComPortIdentifiers() nothing is returned and I can't connect to any port. Sun's javax.comm package detects and can connect to all the ports. This is the same as when I tried the 2.2pre1 library. Are there any extra steps that must be taken to detect ports on Solaris? (user is member of uucp group) Thanks, Andrew _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Martin.Oberhuber at windriver.com Thu Jan 29 06:15:01 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:15:01 +0100 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2326@ism-mail03.corp.ad.wrs.com> Hi Andrew & Paverd, the trick of compiling with gcc on Solaris such that the libgcc_s.so library is not needed at runtime is that gcc itself must be configured and compiled with special options: cd gcc-src ./configure --disable-shared make Using that specially compiled gcc, you can then build the RXTX library: setenv PATH $HOME/my-gcc/bin:$PATH cd rxtx mkdir build-solaris && cd build-solaris ../configure --disable-lockfiles make For more details, see the original bug and its attachments: http://bugzilla.qbang.org/show_bug.cgi?id=73 An rxtx-2.1-7r2 build for Solaris without libgcc_s dependency is available from the Eclipse packages at http://rxtx.qbang.org/eclipse/downloads/ Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Andrew Paverd Sent: Mittwoch, 28. J?nner 2009 11:15 To: rxtx at qbang.org Subject: [Rxtx] RXTX not working on Solaris Hi all, I am attempting to use RXTX on a Sun SPARC server running Solaris. I have tried the binaries from both the latest release (2.1-7) and the pre-release (2.2pre1). The 2.1-7 driver gives the following error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: fatal: libgcc_s.so.1: open failed: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)" I'm not sure what this "libgcc_s.so.1" file does in terms of RXTX but its absence is preventing the application from running. With the 2.2pre1 binary, the application loads without any issue but does not detect any comm-ports. I know that there are multiple ports available because when using the Sun javax.comm library for Solaris SPARC, the ports are all correctly discovered and the application can read from and write to them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in the 2.2 release. Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if so, how did you do it (which versions did you use etc.)? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090129/d6d73f3e/attachment-0003.html From Martin.Oberhuber at windriver.com Thu Jan 29 06:16:38 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:16:38 +0100 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E232A@ism-mail03.corp.ad.wrs.com> Hi Andrew, one thing I did notice on Solaris was that after closing a port, the Solaris Kernel seems to have some timeout before it can be re-opened. So, when you try it again, make sure that no other application hogs the port or has been hogging it shortly before. It may make sense to try a few times. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Andrew Paverd > Sent: Donnerstag, 29. J?nner 2009 10:16 > To: 'Trent Jarvi' > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX not working on Solaris > > Thanks for the advice Trent - I was originally using the > precompiled librxtxSerial.so. I've subsequently compiled rxtx > for Solaris (using gcc) and after copying the libgcc_s.so > file to my .../jre/lib/sparc directory, the library loads. > > However, it does not detect any ports. When I call the > getComPortIdentifiers() nothing is returned and I can't > connect to any port. Sun's javax.comm package detects and can > connect to all the ports. This is the same as when I tried > the 2.2pre1 library. > > Are there any extra steps that must be taken to detect ports > on Solaris? (user is member of uucp group) > > Thanks, > > > Andrew > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From Martin.Oberhuber at windriver.com Thu Jan 29 06:24:05 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:24:05 +0100 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2335@ism-mail03.corp.ad.wrs.com> Hi Greg, sorry for the late response (just catching up on E-Mails). I do not plan to create any Eclipse bundles before rxtx-2.2 is released. Creating the packages is a bit of an effort, which I'd rather postpone until the release, and then do it only once. In the meantime, if you need it for testing, I think it should be easy to take the existing Eclipse bundles/fragments and simply replace any new DLL's / so's in them, plus use WinZIP to replace the .class files in the Java bundle. For Eclipse, it will still look like rxtx-2.1-7 but in reality it will be your own latest build. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Trent Jarvi > Sent: Sonntag, 04. J?nner 2009 20:42 > To: Greg Johnson > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] [Announce] RXTX 2.2pre1 is available. > > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse > packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be > a popular > spam abuse page. I'll put a license and download link on there. All > other pages are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > > > Hi Trent, > > The download link on rxtx.org > (http://users.frii.com/jarvi/rxtx/) loops back > > to rxtx.org, and the wiki doesn't seem to have a link (top > level at least) to > > download. I think Martin had been generating > (fantastically useful) Eclipse > > bundles, as well - are these available for 2.2pre1 also? > > > > Many thanks to everyone for their work - rxtx is an > essential part of our > > product, and we have been keenly awaiting this release. > > > > Regards, > > greg > > > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > > > >> > >> The binaries, source and pending wiki move are now announced on > >> http://www.rxtx.org. After this has baked, we can put > the web install in. > >> > >> Changes in rxtx 2.2 (If I missed something let me know): > >> ... snip ... > >> > >> -- > >> Trent Jarvi > >> tjarvi at qbang.org_______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > -- > > Greg Johnson, PhD > > Director of Engineering > > http://www.rbr-global.com > > greg.johnson at rbr-global.com > > +1.613.233.1621 (GMT-5) office > > > > > > See us at: Ocean Business 2009, Southampton, England, March > 31 - April 1, > > 2009 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From Martin.Oberhuber at windriver.com Thu Jan 29 06:32:57 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:32:57 +0100 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> Hi Tristan, > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); I think that this code is wrong. User code must not call the RXTXCommDriver constructor, since you cannot initialize it properly. What you can do to announce previously unknown port names is this: System.setProperty("gnu.io.rxtx.SerialPorts","/dev/term/a"); before you first access any RXTX function. For details, see the code in RXTXCommDriver#registerSpecifiedPorts() > What is the output of System.getProperty("os.name") on OpenSolaris? I didn't see any response of yours to this question from Trent. What does OpenSolaris output? Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Trent Jarvi > Sent: Mittwoch, 31. Dezember 2008 20:04 > To: Dyer, Tristan > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX for OpenSolaris 2008.11 > > > > On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > > > > Hi, > > > > I have tried building the rxtx library for OpenSolaris 2008.11. > > > > It seemed to build fine without errors, however code such as > > > > ????? java.util.Enumeration portList > > ???????? = CommPortIdentifier.getPortIdentifiers(); > > ????? boolean found = false; > > ????? while (portList.hasMoreElements()) { > > ???????? portId = (CommPortIdentifier) portList.nextElement(); > > ???????? System.out.println(" " + portId.getName()); > > ???????? if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > > ?????????? ???? ?? System.out.println("found"); > > ?????????????? found = true; > > ?????????????? break; > > ??????????? } > > ???????? } > > ????? } > > Will output nothing. > > > > Or rather it seems as if there are no ports found by RXTX. > This code works > > on Ubuntu8.04 and winXP. > > > > If I Add the port manually and then try and open the port > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > > ????? try{ > > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > > ????? } > > ????? catch(Exception e){ > > ??? ??? ? System.out.println("NoSuchPortException"); > > ??? ??? ? //ignore > > ????? } > > ????? try { > > ??????? ???????? System.out.println("opening port"); > > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > > WAIT_TO_OPEN); > > ??????????? connected = true; > > ??????????? System.out.println("Connected to port " + > portId.getName()); > > ???????? } catch (PortInUseException p) { > > ??????????? if (DEBUG) { > > ?????????????? System.err.println(p); > > ??????????? } > > ??????????? port = null; > > ??????????? portId = null; > > ??????????? System.out.println("PortInUseException"); > > ??????????? p.printStackTrace(); > > ???????? } > > > > I will get the following, but not the NoSuchPortException. > > > > java.lang.reflect.InvocationTargetException > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Caused by: java.lang.NullPointerException > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:296) > > > > ??????? ... 7 more > > > > > > As well as > > > > java.lang.NullPointerException > > ??????? at > gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > > ??????? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > > ??????? at > > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:255) > > > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > > > Did I build it wrong? Or is there a problem with > OpenSolaris that will > > prevent this from working? Or am I missing something > incredibly simple? > > > > As well OpenSolaris is running inside a VM with COM1 mapped to > > COM1(VirtualBox) which I believe maps it to /dev/term/a > > > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > > > > > Hi Tristan? > > What is the output of System.getProperty("os.name") on > OpenSolaris? We > have logic like the following in RXTX to handle platform specific > information: > > if ( osName.equals("Solaris") || osName.equals("SunOS")) > > Which may not be getting hit. The result if you will never > call private > void checkSolaris(String PortName, int PortType). > > It could also result in Solaris specific settings not being > set in the > Makefile. > > > The os.name is displayed when you run the configure script. > > -- > Trent Jarvi > tjarvi at qbang.org > From Martin.Oberhuber at windriver.com Thu Jan 29 06:38:20 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:38:20 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] how do you dynamically reload native libraries? In-Reply-To: References: Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2341@ism-mail03.corp.ad.wrs.com> Hi Douglas, Eclipse / OSGi may be doing what you want. It does say that multiple versions of a lib can co-exist at the same time, when the MANIFEST.MF doesn't specify a lib as a singleton. I'm not sure though if or how that would work with native libs. Eclipse bundles for RXTX-2.1-7r2 are available on http://rxtx.qbang.org/eclipse/downloads/ You could build RXTX-2.2pre and then manually create those Eclipse bundles just by adding the MANIFEST.MF to the JAR with the version number exchanged. Then you should be able to try it out. If you do, let me know how it goes... Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Samstag, 27. Dezember 2008 15:00 > To: rxtx at qbang.org; lyon at docjava.com > Subject: [Suspected Spam][Blocked Sender][Rxtx] how do you > dynamically reload native libraries? > > Hi All, > I am trying to test multiple versions of the RXTX native libraries > in a single JVM. > > Each RXTX library instance can share a single virtual machine, but > must have an isolated context class loader. > A context class loader maps a thread to specific classes and > resources. > When the thread dies, the classes and resources are freed. > > Is there some way to have multiple context class loaders that can > load different native method > library implementations? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Thu Jan 29 07:50:05 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 29 Jan 2009 09:50:05 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D030BE22B@MTL-MSG-02.cgiclients.com> Sorry, I had sent it to Trent alone. It outputs "SunOS" Also I had only added that line as a test to see if explicitly adding the port would make a difference, it didn't. My project scope has been reduced so I don't need to support solaris anymore, but I will return to the problem when things slow down. I do remember that the error that was being reported by the native code was "2" which I believe maps to "ENOENT No such file or directory A file name is specified and the file should exist but doesn't, or one of the directories in a path name does not exist." I didn't get much farther. Thanks, -- Tristan Dyer -----Original Message----- From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] Sent: January 29, 2009 9:33 AM To: Trent Jarvi; Dyer, Tristan Cc: rxtx at qbang.org Subject: RE: [Rxtx] RXTX for OpenSolaris 2008.11 Hi Tristan, > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); I think that this code is wrong. User code must not call the RXTXCommDriver constructor, since you cannot initialize it properly. What you can do to announce previously unknown port names is this: System.setProperty("gnu.io.rxtx.SerialPorts","/dev/term/a"); before you first access any RXTX function. For details, see the code in RXTXCommDriver#registerSpecifiedPorts() > What is the output of System.getProperty("os.name") on OpenSolaris? I didn't see any response of yours to this question from Trent. What does OpenSolaris output? Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Mittwoch, 31. Dezember 2008 20:04 > To: Dyer, Tristan > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX for OpenSolaris 2008.11 > > > > On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > > > > Hi, > > > > I have tried building the rxtx library for OpenSolaris 2008.11. > > > > It seemed to build fine without errors, however code such as > > > > ????? java.util.Enumeration portList > > ???????? = CommPortIdentifier.getPortIdentifiers(); > > ????? boolean found = false; > > ????? while (portList.hasMoreElements()) { > > ???????? portId = (CommPortIdentifier) portList.nextElement(); > > ???????? System.out.println(" " + portId.getName()); > > ???????? if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > > ?????????? ???? ?? System.out.println("found"); > > ?????????????? found = true; > > ?????????????? break; > > ??????????? } > > ???????? } > > ????? } > > Will output nothing. > > > > Or rather it seems as if there are no ports found by RXTX. > This code works > > on Ubuntu8.04 and winXP. > > > > If I Add the port manually and then try and open the port > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > > ????? try{ > > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > > ????? } > > ????? catch(Exception e){ > > ??? ??? ? System.out.println("NoSuchPortException"); > > ??? ??? ? //ignore > > ????? } > > ????? try { > > ??????? ???????? System.out.println("opening port"); > > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > > WAIT_TO_OPEN); > > ??????????? connected = true; > > ??????????? System.out.println("Connected to port " + > portId.getName()); > > ???????? } catch (PortInUseException p) { > > ??????????? if (DEBUG) { > > ?????????????? System.err.println(p); > > ??????????? } > > ??????????? port = null; > > ??????????? portId = null; > > ??????????? System.out.println("PortInUseException"); > > ??????????? p.printStackTrace(); > > ???????? } > > > > I will get the following, but not the NoSuchPortException. > > > > java.lang.reflect.InvocationTargetException > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Caused by: java.lang.NullPointerException > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:296) > > > > ??????? ... 7 more > > > > > > As well as > > > > java.lang.NullPointerException > > ??????? at > gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > > ??????? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > > ??????? at > > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:255) > > > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > > > Did I build it wrong? Or is there a problem with > OpenSolaris that will > > prevent this from working? Or am I missing something > incredibly simple? > > > > As well OpenSolaris is running inside a VM with COM1 mapped to > > COM1(VirtualBox) which I believe maps it to /dev/term/a > > > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > > > > > Hi Tristan > > What is the output of System.getProperty("os.name") on OpenSolaris? > We have logic like the following in RXTX to handle platform specific > information: > > if ( osName.equals("Solaris") || osName.equals("SunOS")) > > Which may not be getting hit. The result if you will never call > private void checkSolaris(String PortName, int PortType). > > It could also result in Solaris specific settings not being set in the > Makefile. > > > The os.name is displayed when you run the configure script. > > -- > Trent Jarvi > tjarvi at qbang.org > From hho at bibliotheca.dk Thu Jan 29 08:00:49 2009 From: hho at bibliotheca.dk (Hans Hvelplund Odborg) Date: Thu, 29 Jan 2009 16:00:49 +0100 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: I know that there arent any guarantees, but could someone involved with the development of RxTx please guesstimate when 2.2 final will be released? I'm not familiar with the pre-release history of 2.1-7 but I read that there was 20 pre-relases of 2.1-7 so I guess (based on current pre-release rate) that 2.2 may easily be more than 6 months away? Thanks Med venlig hilsen / Best regards / Med v?nliga h?lsningar Hans Hvelplund Odborg BIBLIOTHECA A/S Vallensb?kvej 22A, 2. TH ? 2605 Br?ndby ? Denmark Mob.: +45 30235940 Tel.: +45 70271008 Fax: +45 70271009 hho at bibliotheca.dk www.bibliotheca.dk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: 4. januar 2009 20:15 To: rxtx at qbang.org Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Jan 29 08:33:33 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 29 Jan 2009 08:33:33 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: Projects tend to evolve from an adhoc release process to predictable releases when enough projects demand it (and help make it happen). "Its ready when Its ready" is a typical answer prior to the above. I lik$ to say "The beatings will continue until moral improves." I expect moral to improve in the next six months at most. This release i$ resolving 3 larger issues. 1) syncing of some large efforts to the same source code. 2) incorperating all community patches 3) building the binaries correctly. This does not include fixing everyones bugs. But it does include making sure the fixes get in if they are provided. Given the above, I don't expect this to be as drawn out as 2.1-7pre*. We may have several stable releases during the same period. On Thu, 29 Jan 2009, Hans Hvelplund Odborg wrote: > I know that there arent any guarantees, but could someone involved with the > development of RxTx please guesstimate when 2.2 final will be released? > > I'm not familiar with the pre-release history of 2.1-7 but I read that there > was 20 pre-relases of 2.1-7 so I guess (based on current pre-release rate) > that 2.2 may easily be more than 6 months away? > > Thanks > > Med venlig hilsen / Best regards / Med v?nliga h?lsningar > Hans Hvelplund Odborg > > BIBLIOTHECA A/S > Vallensb?kvej 22A, 2. TH ? 2605 Br?ndby ? Denmark > Mob.: +45 30235940 > Tel.: +45 70271008 > Fax: +45 70271009 > hho at bibliotheca.dk > www.bibliotheca.dk > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: 4. januar 2009 20:15 > To: rxtx at qbang.org > Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. > > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org. After this has baked, we can put the web install > in. > > Changes in rxtx 2.2 (If I missed something let me know): > > threshold fix > Alexandre Rusev > http://bugzilla.qbang.org/show_bug.cgi?id=85 > > RXTX close deadlocks in REXTXPort.finalize > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=53 > > Add ACM serial devices to all known ports. > Duncan Pierce > http://bugzilla.qbang.org/show_bug.cgi?id=51 > > Concurrency fixes for SMP/multicore systems > U. George > http://bugzilla.qbang.org/show_bug.cgi?id=100 > > Fixes for MAC systems with no drivers installed. > 1.5 stop bit fix > > Enable universal library builds for Mac OS X > Andre-John Mas ajmas at sympatico.ca > > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > Do not remove and ignore interrupts. > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=45 > > find ports which were added after program startup on Mac > OS X. > Martin Oberhuber > http://bugzilla.qbang.org/show_bug.cgi?id=48 > > Clean up CommPort Ownership code, avoid possible deadlocks, > fix lost commport ownership events. > Martin Oberhuber > http://bugzilla.qbang.org/show_bug.cgi?id=83 > > rxtx does not compile against JDK-1.6 > Neboj?a > http://bugzilla.qbang.org/show_bug.cgi?id=84 > > configure script failed at line UTS_RELEASE > megov > http://bugzilla.qbang.org/show_bug.cgi?id=80 > > code cleanup patch (extra ';' creates bug for if statements > + new String() calls removed) > Xavier Le Vourch > http://bugzilla.qbang.org/show_bug.cgi?id=77 > > Wont compile on linux ppc with glibc 2.5 - no sys/io.h > Brian Johnson > http://bugzilla.qbang.org/show_bug.cgi?id=72 > > rxtx overwrites System properties > Andrew Gillett > Nektarios K. Papadopoulos > Neboj?a > http://bugzilla.qbang.org/show_bug.cgi?id=64 > > Solaris ACM port support > Dave Cleal > http://bugzilla.qbang.org/show_bug.cgi?id=59 > > Setting of non-standard baud rate fails. > Andrew Prunicki > http://bugzilla.qbang.org/show_bug.cgi?id=58 > > RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=50 > > JavaDoc fixes > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > From mmornati at byte-code.com Fri Jan 30 02:32:44 2009 From: mmornati at byte-code.com (Marco Mornati) Date: Fri, 30 Jan 2009 10:32:44 +0100 Subject: [Rxtx] Linux Library Message-ID: <1233307964.4046.19.camel@localhost.localdomain> Hello, I made a little Applet added to my web application to support BarCode printer (on serial port). All is autoconfigured during applet init: dll/so are copied on /tmp folder on local computer and with System.load(/tmp/library.so/dll) I'm adding the library to classpath. On windows all works correctly and I'm able to print (jar is signed... without signing it there's no way to communicate with serial port). I've just a little problem on linux. It seams that library is not added to classpath, because when I try to connect with com port, applet says that is impossible to find .so. Any idea on what could be the problem? Just for information I post here my code: Container content = getContentPane(); content.setBackground(Color.white); content.setLayout(new FlowLayout()); String libraryFile = ""; String libraryName = ""; if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")) { libraryName = DLL_SERIAL_NAME; libraryFile = System.getProperty("java.io.tmpdir") + DLL_SERIAL_NAME; } else if (System.getProperty("os.name").toUpperCase().contains("LINUX")) { if (System.getProperty("os.arch").contains("i386")) { libraryName = SO_SERIAL_NAME_32; } else { libraryName = SO_SERIAL_NAME_64; } char fileSeparator = System.getProperty("file.separator").charAt(0); libraryFile = System.getProperty("java.io.tmpdir") + fileSeparator + SO_SERIAL_NAME; } System.out.println("Library File: " + libraryFile); /** * Copying DLL to java bin dir (if it's not already present) */ if (!verifyLibraryExistence(libraryFile)) { System.out.println("Library file does not exist"); copyResourceFromJar(libraryFile, libraryName); } try { System.load(libraryFile); } catch (Exception e) { System.out.println("Cannot load " + libraryFile + " you have to install it manually!!"); } try { content.add(new JLabel("Initializing Applet!")); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); content.add(new JLabel("List Porte: " + portList)); if (portList == null) { content.add(new JLabel("No Serial Port Found!!")); } while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL)) { System.out.println("Porta Trovata: " + portId.getName()); content.add(new JLabel("Porta Trovata: " + portId.getName())); } break; } } catch (Exception e) { content.add(new JLabel("Exception: " + e)); e.printStackTrace(); } Thanks a lot Bye Marco -- Dott. Ing. Mornati Marco Byte-Code s.r.l via Antonio Cechov, 1 San Giuliano Milanese (MI) E-Mail: mmornati at byte-code.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090130/c176573f/attachment-0002.bin From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0028.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0028.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0026.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0026.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0026.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0026.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0025.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0023.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0023.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0023.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0023.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0023.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0020.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0020.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0020.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment-0019.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0019.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment-0019.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment-0019.html From tjarvi at qbang.org Wed Jan 14 18:56:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 14 Jan 2009 18:56:50 -0700 (MST) Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Message-ID: On Wed, 14 Jan 2009, Jaakko Sipari wrote: > Hi (again)! > > Could someone clarify what these methods actually do and are they even > implemented? Do I get into trouble with buffer values of 0 (if I want to > handle the buffers myself)? > rxtx does not have buffers. It was not clear to me at the time why there would be a buffer when java already provides buffered input and output streams that can sit on top of rxtx. One reason I can see for implementing buffers in rxtx is to get data off the port so select() can block. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Wed Jan 14 23:23:08 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 15 Jan 2009 08:23:08 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> Message-ID: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Here's the same message for the list also. Forgot to do "Reply to all" ---------- Forwarded message ---------- From: Jaakko Sipari Date: Thu, Jan 15, 2009 at 8:22 AM Subject: Re: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize To: Trent Jarvi On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! >> >> Could someone clarify what these methods actually do and are they even >> implemented? Do I get into trouble with buffer values of 0 (if I want to >> handle the buffers myself)? >> >> > rxtx does not have buffers. It was not clear to me at the time why there > would be a buffer when java already provides buffered input and output > streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data off > the port so select() can block. > So basically those methods have currently no effect at all? - Jaakko -- Jaakko Sipari tel. +358451238191 eMail. jaakko.sipari at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090115/8b4c47c0/attachment-0018.html From tjarvi at qbang.org Thu Jan 15 18:37:12 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 15 Jan 2009 18:37:12 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: On Thu, 15 Jan 2009, Jaakko Sipari wrote: > Here's the same message for the list also. Forgot to do "Reply to all" > > ---------- Forwarded message ---------- > From: Jaakko Sipari > Date: Thu, Jan 15, 2009 at 8:22 AM > Subject: Re: [Rxtx] The functionality behind setInputBufferSize & > setOutputBufferSize > To: Trent Jarvi > > > On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! > > Could someone clarify what these methods actually do > and are they even > implemented? Do I get into trouble with buffer > values of 0 (if I want to > handle the buffers myself)? > > > rxtx does not have buffers. ?It was not clear to me at the time why > there would be a buffer when java already provides buffered input and > output streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data > off the port so select() can block. > > > So basically those methods have currently no effect at all? > Correct. You can use BufferedInputStream and BufferedOutputStream from the Java API once you get the Input/OutputStream from rxtx. But changing the input and output buffer size in rxtx is not going to change behavior. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Fri Jan 16 01:22:37 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Fri, 16 Jan 2009 10:22:37 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> > So basically those methods have currently no effect at all? >> >> > Correct. You can use BufferedInputStream and BufferedOutputStream from the > Java API once you get the Input/OutputStream from rxtx. But changing the > input and output buffer size in rxtx is not going to change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > I assume there still is some kind of buffer in rxtx (or the serial port driver) in case of processing delays. I mean, if the serial port gives data faster than can be read from the Java program using rxtx it isn't just thrown away, right? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090116/3bd9a52e/attachment-0017.html From tjarvi at qbang.org Fri Jan 16 05:17:24 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 16 Jan 2009 05:17:24 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> Message-ID: On Fri, 16 Jan 2009, Jaakko Sipari wrote: > > So basically those methods have currently no effect > at all? > > > Correct. ?You can use BufferedInputStream and BufferedOutputStream > from the Java API once you get the Input/OutputStream from rxtx. ?But > changing the input and output buffer size in rxtx is not going to > change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > > > > I assume there still is some kind of buffer in rxtx (or the serial port > driver) in case of processing delays. I mean, if the serial port gives data > faster than can be read from the Java program using rxtx it isn't just > thrown away, right? > The UART can usually hold a few bytes. The kernel driver can buffer the input. In practice, it works. With Sun commapi, the typical application has 4 buffers between the user and the incomming data. With rxtx, it is 3. BufferedInputStream -> commapi/rxtx -> kernel driver -> UART If you really do run into overflows on the UART, then hardware flow control is what you should be using and tinkering with rxtx to avoid it is not a very sound approach. -- Trent Jarvi tjarvi at qbang.org From llowrey at nuclearwinter.com Sun Jan 18 12:49:39 2009 From: llowrey at nuclearwinter.com (Larkin Lowrey) Date: Sun, 18 Jan 2009 13:49:39 -0600 Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain Message-ID: <497387D3.9040201@nuclearwinter.com> After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when running code that uses RXTXComm. The crashes only occur when using 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. As far as I can tell, the crash happens immediately on start. I can't see any evidence of much, if anything, happening before the crash. The code used to work and only stopped working after the "upgrade" to FC10. I have tried RXTX v2.1 and 2.2pre1. Any ideas? Here's the error: # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode linux-amd64) # Problematic frame: # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 --Larkin From tjarvi at qbang.org Mon Jan 19 17:48:34 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 19 Jan 2009 17:48:34 -0700 (MST) Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain In-Reply-To: <497387D3.9040201@nuclearwinter.com> References: <497387D3.9040201@nuclearwinter.com> Message-ID: On Sun, 18 Jan 2009, Larkin Lowrey wrote: > After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when > running code that uses RXTXComm. The crashes only occur when using > 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. > > As far as I can tell, the crash happens immediately on start. I can't > see any evidence of much, if anything, happening before the crash. > > The code used to work and only stopped working after the "upgrade" to > FC10. I have tried RXTX v2.1 and 2.2pre1. > > Any ideas? > > Here's the error: > > # > # An unexpected error has been detected by Java Runtime Environment: > # > # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 > # > # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode > linux-amd64) > # Problematic frame: > # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 > > > --Larkin Hi Larkin, I can think of 2 segv's in rxtx that may apply. Both are fixed in rxtx 2.2pre.. The first was that pointers required by nativeDrain needed to be stored in something larger than a 32 bit integer in java. This resulted in a crash like you see the first time the 'nativedrain' thread tried to use the pointer. The second was a concurrency issue George resolved with synchronization. The crash was usually during close but happened in the 'nativedrain' thread. (eventLoop) As mentioned, these are both fixed in the prerelease. There is a class provided in recent versions of RXTX that allow you confirm the version being used: gnu.io.RXTXVersion with member methods getVersion() and nativeGetVersion(). This allows you to confirm that you are indeed using the version you think you are. -- Trent Jarvi tjarvi at qbang.org From alexandrepoletto at gmail.com Wed Jan 21 11:48:07 2009 From: alexandrepoletto at gmail.com (Alexandre Poletto) Date: Wed, 21 Jan 2009 16:48:07 -0200 Subject: [Rxtx] work in windows but dont work in linux Message-ID: hi folks, I have an application to communicate with the serial port using rxtx, in the windows os my application works well, but when i try to run in the linux os i open the port (in windows "COM1", in Linux "/dev/ttyS0") send my commandes but i never receive any answer. I'm using ubuntu 8.10 and java 1.5, there is any configuration in that i'm missing? Thanks for the help! ps: Sorry form my bad english :( -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/70baea51/attachment-0011.html From jmudd at dtiweb.net Wed Jan 21 14:08:04 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Wed, 21 Jan 2009 16:08:04 -0500 Subject: [Rxtx] Hot unplugging of a USB device Message-ID: Looking to see if the issues surrounding an uplugging of a USB device have been resolved. I see from the mail list archives and bug reports that others have noted this issue. I have a USB GPS Receiver that is plugged into a Windows (XP) system and am using Netbeans 6.5 and Java jdk 1.6 and RXTX 2.1.7 and 2.2pre1. In the thread that is reading data via listening for a SerialEvent I can capture a Java IOException: No error in readArray. The application is essentially hung at this point. Only a termination of the application will clear it up and not leave the port hung. I had read in the archives that this is because the event loop in the native code portion is continually putting out the exceptions. I had also seen that this might be addressed in future releases. Any help is appreciated. Thanks, Jerry ________________________________ Jerry Mudd Senior Programmer 21795 Shangri-La Drive, Ste C Lexington Park, MD 20653 (301) 737-8893 (301) 737-8897 Fax jmudd at dtiweb.net www.dtiweb.net This message may contain sensitive, proprietary and/or privileged information. Disclosure is not authorized unless provided in writing by Defense Technologies, Inc. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0011.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 6296 bytes Desc: image001.gif Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0011.gif From netbeans at gatworks.com Wed Jan 21 17:33:46 2009 From: netbeans at gatworks.com (U. George) Date: Wed, 21 Jan 2009 19:33:46 -0500 Subject: [Rxtx] Hot unplugging of a USB device In-Reply-To: References: Message-ID: <4977BEEA.4020708@gatworks.com> > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:34 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:34 +1100 Subject: [Rxtx] Part 1 of 2 parts re rxtx 2.2 pre.. and OSX Message-ID: Hi, I have tried out the latest version of rxtx on a mac and can report that running with ImageJ (32 bit ) all seems to be fine. However when I attempt to use it with ImageJ64, I get a crash whenever the serial port is used. The details follow. What I did. Ran our plug-in in ImageJ 64 bit (1.42g) for Measuring, which is using the latest rxtx (the beta 2.2 compiled on 30 December 2008) for MacOSX 10.5.x) I installed this by putting the two files in the directory ~ LIBRARY/JAVA/EXTENSIONS. The Plug-in uses the serial port. The window we put up to show the numbers from the stage appeared, but only with the default "0" (zero) in each row, which is what we put there until we get data back from the port and the device attached. Then it crashed. I should point out that this all works fine using ImageJ (32 bit) 1.42g, on the same platform. So the only difference is the use of ImageJ 64 bit, and I guess the version of rxtx for 64 bit. I hope that cleverer people than me can throw some light onto this little problem. ImageJ64 seems to work ok until rxtx is called, although I haven't tried much so far, just some 3D rendering with 1 Gb of image data, which all went well, apart from the fact that the data was marginal. I am now showing the data supplied by the report to Apple window. This has three tabs, one to write your information in, one called Problem Details, and the third called SYSTEM CONFIG. These are pasted in below. Best wishes Noel Problem Details Process: JavaApplicationStub [463] Path: /Applications/ImageJ/ImageJ64.app/Contents/MacOS/JavaApplicationStub Identifier: gov.nih.info.rsb.ImageJ Version: ??? (10.2) Code Type: X86-64 (Native) Parent Process: launchd [398] Date/Time: 2009-01-19 10:48:09.342 +1100 OS Version: Mac OS X 10.5.6 (9G55) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000000029507c8 Crashed Thread: 16 Application Specific Information: Java information: Exception type: Bus Error (0xa) at pc=0x00000006ff70f418 Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0_07-b06-57 mixed mode macosx-amd64) Current thread (0x00000001020de800): JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] Stack: [0x0000000702851000,0x0000000702951000] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j gnu.io.RXTXPort.readByte()I+0 j gnu.io.RXTXPort$SerialInputStream.read()I+81 j SerialConnection.serialEvent(Lgnu/io/SerialPortEvent;)V+41 j gnu.io.RXTXPort.sendEvent(IZ)Z+382 v ~BufferBlob::StubRoutines (1) j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~BufferBlob::StubRoutines (1) Java Threads: ( => current thread ) =>0x00000001020de800 JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] 0x00000001020e8800 JavaThread "Measure XYZ" [_thread_blocked, id=44384256, stack(0x0000000702954000,0x0000000702a54000)] 0x0000000102001000 JavaThread "DestroyJavaVM" [_thread_blocked, id=25169920, stack(0x0000000101001000,0x0000000101801000)] 0x00000001020da800 JavaThread "SocketListener" [_thread_in_native, id=29671424, stack(0x0000000701b4c000,0x0000000701c4c000)] 0x00000001020b4800 JavaThread "AWT-EventQueue-0" [_thread_in_Java, id=-27992064, stack(0x00000006fe44e000,0x00000006fe54e000)] 0x0000000102096000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=-34344960, stack(0x00000006fde3f000,0x00000006fdf3f000)] 0x0000000102078000 JavaThread "AWT-Shutdown" [_thread_blocked, id=-58392576, stack(0x00000006fc750000,0x00000006fc850000)] 0x0000000102077800 JavaThread "AWT-AppKit" daemon [_thread_in_native, id=1886770976, stack(0x00007fff5f400000,0x00007fff5fc00000)] 0x0000000102044800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=-333877248, stack(0x00000006ec097000,0x00000006ec197000)] 0x0000000102043000 JavaThread "CompilerThread1" daemon [_thread_blocked, id=-334938112, stack(0x00000006ebf94000,0x00000006ec094000)] 0x0000000102041800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=-335998976, stack(0x00000006ebe91000,0x00000006ebf91000)] 0x0000000102041000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=-337059840, stack(0x00000006ebd8e000,0x00000006ebe8e000)] 0x0000000102029800 JavaThread "Finalizer" daemon [_thread_blocked, id=-338214912, stack(0x00000006ebc74000,0x00000006ebd74000)] 0x0000000102028800 JavaThread "Reference Handler" daemon [_thread_blocked, id=-339333120, stack(0x00000006ebb63000,0x00000006ebc63000)] Other Threads: 0x0000000102020800 VMThread [stack: 0x00000006eba60000,0x00000006ebb60000] [id=-340393984] 0x0000000102046000 WatcherThread [stack: 0x00000006ec19a000,0x00000006ec29a000] [id=-332816384] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 76480K, used 14448K [0x0000000105800000, 0x000000010ad50000, 0x00000002f9800000) eden space 65600K, 22% used [0x0000000105800000, 0x000000010661c398, 0x0000000109810000) from space 10880K, 0% used [0x0000000109810000, 0x0000000109810000, 0x000000010a2b0000) to space 10880K, 0% used [0x000000010a2b0000, 0x000000010a2b0000, 0x000000010ad50000) tenured generation total 174784K, used 0K [0x00000002f9800000, 0x00000003042b0000, 0x00000006e1800000) the space 174784K, 0% used [0x00000002f9800000, 0x00000002f9800000, 0x00000002f9800200, 0x00000003042b0000) compacting perm gen total 21248K, used 10319K [0x00000006e1800000, 0x00000006e2cc0000, 0x00000006e6c00000) the space 21248K, 48% used [0x00000006e1800000, 0x00000006e2213d28, 0x00000006e2213e00, 0x00000006e2cc0000) No shared spaces configured. Virtual Machine Arguments: JVM Args: -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher. framework/Resources/LauncherSupport.jar -Xms256m -Xmx24000m -Dcom.apple.macos.useScreenMenuBar=false -Dcom.apple.mrj.application.growbox.intrudes=false -Dcom.apple.mrj.application.live-resize=true -Dcom.apple.hwaccel=false -Dapple.awt.Antialiasing=false -Dcom.apple.smallTabs=true -Dapple.awt.brushMetalLook=false Java Command: Launcher Type: generic Physical Memory: Page Size = 4k, Total = 2048M, Free = 30996M Thread 0: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 com.apple.CoreFoundation 0x00007fff8204dc4f CFRunLoopRunSpecific + 1631 3 com.apple.HIToolbox 0x00007fff839fdda2 RunCurrentEventLoopInMode + 278 4 com.apple.HIToolbox 0x00007fff839fdbd8 ReceiveNextEventCommon + 322 5 com.apple.HIToolbox 0x00007fff839fda83 BlockUntilNextEventMatchingListInMode + 79 6 com.apple.AppKit 0x00007fff8299d3b0 _DPSNextEvent + 603 7 com.apple.AppKit 0x00007fff8299ccf1 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 136 8 com.apple.AppKit 0x00007fff82996a84 -[NSApplication run] + 455 9 libawt.jnilib 0x00000006ec433257 +[AWTStarter startAWT:] + 1343 10 libawt.jnilib 0x00000006ec432c46 -[CPerformer perform] + 112 11 com.apple.Foundation 0x00007fff8153f2b4 __NSThreadPerformPerform + 148 12 com.apple.CoreFoundation 0x00007fff8204e0e8 CFRunLoopRunSpecific + 2808 13 ...ple.JavaApplicationLauncher 0x0000000100005165 startupJava(LauncherArgsStruct*) + 235 14 ...ple.JavaApplicationLauncher 0x000000010000579c launchJavaApplication + 1224 15 JavaApplicationStub 0x0000000100000b9c 0x100000000 + 2972 Thread 1: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x0000000101a93b61 JVM_GetCPFieldModifiers + 128961 5 libjvm.dylib 0x0000000101a93a36 JVM_GetCPFieldModifiers + 128662 6 ...ple.JavaApplicationLauncher 0x000000010000c0ce startJavaApplication + 2886 7 ...ple.JavaApplicationLauncher 0x000000010000506d java_main_stub(void*) + 9 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 2: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libSystem.B.dylib 0x00007fff840db0b0 mach_msg_server + 436 3 libjvm.dylib 0x000000010181176d JNI_CreateJavaVM_Impl + 53277 4 libjvm.dylib 0x0000000101811375 JNI_CreateJavaVM_Impl + 52261 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 3: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x00000001018e452f JVM_Lseek + 235727 5 libjvm.dylib 0x00000001018e42df JVM_Lseek + 235135 6 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 7 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 8 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 4: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x00000001028003ea 0 + 4336911338 11 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 12 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 13 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 14 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 15 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 16 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 17 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 18 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 19 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 20 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 5: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 6: 0 libSystem.B.dylib 0x00007fff8406dd72 semaphore_wait_trap + 10 1 libjvm.dylib 0x0000000101915bdb JVM_IsPrimitiveClass + 12139 2 libjvm.dylib 0x00000001019155b5 JVM_IsPrimitiveClass + 10565 3 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 4 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 7: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 8: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 9: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x0000000101918ec8 JVM_IsPrimitiveClass + 25176 5 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 6 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 7 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 10: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x000000010191abb5 JVM_IsPrimitiveClass + 32581 4 libjvm.dylib 0x000000010191a70a JVM_IsPrimitiveClass + 31386 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 11: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 12: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x0000000102803414 0 + 4336923668 12 ??? 0x00000001028003ea 0 + 4336911338 13 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 14 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 15 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 16 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 17 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 18 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 19 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 20 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 21 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 22 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 13: 0 ??? 0x0000000102817034 0 + 4337004596 1 ??? 0x000000010280304e 0 + 4336922702 2 ??? 0x0000000102803093 0 + 4336922771 3 ??? 0x000000010280356d 0 + 4336924013 4 ??? 0x0000000102803093 0 + 4336922771 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x000000010280356d 0 + 4336924013 8 ??? 0x0000000102803093 0 + 4336922771 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x0000000102802f3a 0 + 4336922426 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102802f3a 0 + 4336922426 14 ??? 0x0000000102802f3a 0 + 4336922426 15 ??? 0x0000000102803162 0 + 4336922978 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102802f3a 0 + 4336922426 19 ??? 0x0000000102802f3a 0 + 4336922426 20 ??? 0x00000001028003ea 0 + 4336911338 21 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 22 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 23 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 24 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 25 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 26 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 27 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 28 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 29 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 30 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 14: 0 libSystem.B.dylib 0x00007fff840f210e accept + 10 1 libnet.jnilib 0x00000006ff6b6b11 Java_java_net_PlainSocketImpl_socketAccept + 277 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x0000000102802f3a 0 + 4336922426 4 ??? 0x0000000102802f3a 0 + 4336922426 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x0000000102803414 0 + 4336923668 8 ??? 0x00000001028003ea 0 + 4336911338 9 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 10 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 11 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 12 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 13 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 14 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 15 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 16 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 17 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 18 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 15: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x000000010280304e 0 + 4336922702 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102803414 0 + 4336923668 14 ??? 0x0000000102803093 0 + 4336922771 15 ??? 0x0000000102803093 0 + 4336922771 16 ??? 0x0000000102803093 0 + 4336922771 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102803414 0 + 4336923668 19 ??? 0x00000001028003ea 0 + 4336911338 20 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 21 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 22 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 23 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 24 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 25 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 26 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 27 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 28 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 29 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 Crashed: 0 librxtxSerial.jnilib 0x00000006ff70f418 read_byte_array + 68 1 librxtxSerial.jnilib 0x00000006ff70f9b3 Java_gnu_io_RXTXPort_readByte + 93 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x000000010280304e 0 + 4336922702 4 ??? 0x000000010280304e 0 + 4336922702 5 ??? 0x0000000102803414 0 + 4336923668 6 ??? 0x00000001028003ea 0 + 4336911338 7 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 8 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 9 libjvm.dylib 0x00000001018e5be8 JVM_Lseek + 241544 10 libjvm.dylib 0x0000000101900b11 JVM_MonitorWait + 17249 11 libjvm.dylib 0x0000000101a1e59e JVM_DisableCompiler + 1166 12 librxtxSerial.jnilib 0x00000006ff70d91e send_event + 132 13 librxtxSerial.jnilib 0x00000006ff70e82b report_serial_events + 92 14 librxtxSerial.jnilib 0x00000006ff7108c9 Java_gnu_io_RXTXPort_eventLoop + 237 15 ??? 0x000000010280e878 0 + 4336969848 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x00000001028003ea 0 + 4336911338 18 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 19 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 20 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 21 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 22 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 23 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 24 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 25 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 26 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 27 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 17: 0 libSystem.B.dylib 0x00007fff84074d02 __semwait_signal + 10 1 libSystem.B.dylib 0x00007fff840dce91 usleep + 57 2 librxtxSerial.jnilib 0x00000006ff70d729 drain_loop + 45 3 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 4 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 crashed with X86 Thread State (64-bit): rax: 0x00000000029507c0 rbx: 0x0000000000000041 rcx: 0x0000000000000065 rdx: 0x0000000000000002 rdi: 0x00000006ff71205e rsi: 0x00000006ff711c67 rbp: 0x0000000702950000 rsp: 0x000000070294fef0 r8: 0x000000000000004d r9: 0x00000006e21d64c0 r10: 0x00000006e21d38e8 r11: 0x00000000000000d2 r12: 0x00000001020de998 r13: 0x00000006e21d93b0 r14: 0x0000000000000032 r15: 0x00000000029507c0 rip: 0x00000006ff70f418 rfl: 0x0000000000010202 cr2: 0x00000000029507c8 Continued in the message part 2 -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:41 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:41 +1100 Subject: [Rxtx] Part 2 re rxtx 2.2 pre... and MacOSX Message-ID: Continued from Part 1. Binary Images: 0x100000000 - 0x100000fff JavaApplicationStub ??? (???) /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationS tub 0x100004000 - 0x100011fff com.apple.JavaApplicationLauncher 12.2.0 (12.2.0) /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/JavaApplicationLauncher 0x10001a000 - 0x100022ffd com.apple.JavaVM 12.2.0 (12.2.0) <2b178e8d4bbcc0aa427c2f3f71bb2fcb> /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM 0x100055000 - 0x10005dff0 libverify.dylib ??? (???) <56eac95084cb86cd1339a721b1353182> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libveri fy.dylib 0x100063000 - 0x10006cffb JavaNativeFoundation ??? (???) <68ca6409dc49542301edda1e0744ac69> /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNative Foundation.framework/Versions/A/JavaNativeFoundation 0x1000a8000 - 0x1000c7fef libjava.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjava .jnilib 0x1000d8000 - 0x1000e5ffb libzip.jnilib ??? (???) <5b6dce7c9a1f25aa5dff1a633c9dc342> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libzip. jnilib 0x101803000 - 0x101eafff3 libjvm.dylib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bundle/Libra ries/libjvm.dylib 0x6ec2c5000 - 0x6ec2c6fff liblauncher.jnilib ??? (???) <567fa54a222b965b2c4aefea21d9800a> /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/Resources/liblauncher.jnilib 0x6ec431000 - 0x6ec5e4fff libawt.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libawt. jnilib 0x6fdc3b000 - 0x6fdc3cfff ATSHI.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/Resources/ATSHI.dylib 0x6fdd6e000 - 0x6fdd6efff libcmm.jnilib ??? (???) <114e1a620a6920d77bf09bd57a7f7d52> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libcmm. jnilib 0x6fdd9e000 - 0x6fde1fff7 libfontmanager.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libfont manager.jnilib 0x6fdf41000 - 0x6fdf8ffff libsuncmm.jnilib ??? (???) <47330f1f17822de3a5cf921e07615cf7> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libsunc mm.jnilib 0x6fdf95000 - 0x6fdfc4ff7 libjpeg.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjpeg .jnilib 0x6ff6ae000 - 0x6ff6baffb libnet.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnet. jnilib 0x6ff6c0000 - 0x6ff6c4fff libnio.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnio. jnilib 0x6ff6d4000 - 0x6ff6e8ff7 libdcpr.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libdcpr .jnilib 0x6ff70c000 - 0x6ff713fff +librxtxSerial.jnilib ??? (???) <5133deacebd01ceab7d528c541241956> /Library/Java/Extensions/librxtxSerial.jnilib 0x6ff734000 - 0x6ff74bfef libJapaneseConverter.dylib ??? (???) <64cca6bb4650a269f49a8427507e4963> /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib 0x70204f000 - 0x702218fef com.apple.RawCamera.bundle 2.0.10 (2.0.10) /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera 0x7fff5fc00000 - 0x7fff5fc2e643 dyld 97.1 (???) /usr/lib/dyld 0x7fff80003000 - 0x7fff80146ffb com.apple.audio.toolbox.AudioToolbox 1.5.2 (1.5.2) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x7fff801d2000 - 0x7fff801d5ffb com.apple.help 1.1 (36) <9000c05ccad96fdcc25bc35264abf587> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.frame work/Versions/A/Help 0x7fff801d6000 - 0x7fff80211fff com.apple.AE 402.2 (402.2) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.f ramework/Versions/A/AE 0x7fff80212000 - 0x7fff80257fef libRIP.A.dylib ??? (???) <8c818d7fd3dc57839ac48caf107ff4c0> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x7fff80258000 - 0x7fff8029bfef com.apple.QD 3.11.54 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/QD.framework/Versions/A/QD 0x7fff8029c000 - 0x7fff802dffef libTIFF.dylib ??? (???) <86be7909f46cc044a887cbb60ab7826d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x7fff802e0000 - 0x7fff803d4fff libobjc.A.dylib ??? (???) <118dc1ae05e685ad64290352fc94f1f0> /usr/lib/libobjc.A.dylib 0x7fff803d5000 - 0x7fff8045dfe7 libsqlite3.0.dylib ??? (???) <3c7ab3523b816dbd3e039ee7e6e2c580> /usr/lib/libsqlite3.0.dylib 0x7fff8045e000 - 0x7fff80466ffa libbsm.dylib ??? (???) <4d838c0d8a74fe61c781a53a8723303d> /usr/lib/libbsm.dylib 0x7fff80467000 - 0x7fff80497fff com.apple.shortcut 1 (1.0) <9822328df9321a661af3afcc841e8f80> /System/Library/PrivateFrameworks/Shortcut.framework/Versions/A/Shortcut 0x7fff80498000 - 0x7fff8049bfff com.apple.securityhi 3.0 (30817) <00ddd6e60692b62b7649573eab8aef5a> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI .framework/Versions/A/SecurityHI 0x7fff8049c000 - 0x7fff8049efff com.apple.print.framework.Print 218.0.2 (220.1) <2b847a0a1cd885f596a4d10409d50ba3> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.fram ework/Versions/A/Print 0x7fff8049f000 - 0x7fff805dbfe9 com.apple.ImageIO.framework 2.0.4 (2.0.4) <47dcdc0b5986b2c157e0b6dae48ce464> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/ImageIO 0x7fff805dc000 - 0x7fff805f9fef com.apple.CoreVideo 1.5.1 (1.5.1) <78253b3fe8d3dcc90f159d7ed866c295> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x7fff805fa000 - 0x7fff8068bfff com.apple.SearchKit 1.2.1 (1.2.1) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Sear chKit.framework/Versions/A/SearchKit 0x7fff8068c000 - 0x7fff80e49fef libBLAS.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libBLAS.dylib 0x7fff80e4a000 - 0x7fff81416fff com.apple.CoreGraphics 1.407.2 (???) <436dbc70f8c9b29b3beb1d2de220acf2> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/CoreGraphics 0x7fff81417000 - 0x7fff8141dfff com.apple.DiskArbitration 2.2.1 (2.2.1) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitrat ion 0x7fff8141e000 - 0x7fff8145bff7 com.apple.SystemConfiguration 1.9.2 (1.9.2) <150119d0cecb0c80f6736b9881c2411e> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemCo nfiguration 0x7fff8145c000 - 0x7fff81523fec com.apple.CFNetwork 422.11 (422.11) <570ca46de3b907cb1c8e33fc62f562b4> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNe twork.framework/Versions/A/CFNetwork 0x7fff81524000 - 0x7fff8152dfff libCGATS.A.dylib ??? (???) <722a0bbd58740d46739008e881010631> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib 0x7fff8152e000 - 0x7fff81533fff com.apple.CommonPanels 1.2.4 (85) <2cec1ecc95cf1ecea8bea030975a46b8> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPane ls.framework/Versions/A/CommonPanels 0x7fff81534000 - 0x7fff817cffe3 com.apple.Foundation 6.5.7 (677.22) <8134977fcc57198a53dc494b60592980> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x7fff817d0000 - 0x7fff817d0ffd com.apple.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x7fff817d1000 - 0x7fff81cf1fc6 libGLProgrammability.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgra mmability.dylib 0x7fff81cf2000 - 0x7fff81cf4fff com.apple.NavigationServices 3.5.2 (163) <7cb7f3fe7f9d56ec89ef28a6d3a1da7d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Navigation Services.framework/Versions/A/NavigationServices 0x7fff81cf5000 - 0x7fff81d32fe7 com.apple.coreui 1.2 (62) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x7fff81d33000 - 0x7fff81d33fff com.apple.Carbon 136 (136) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x7fff81d34000 - 0x7fff81d42fff libCSync.A.dylib ??? (???) <61f6cc104b3e9b77cd583635a3a9a5cf> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x7fff81d43000 - 0x7fff81d45ff9 libRadiance.dylib ??? (???) <6d9f2235e8f70a7aedfc59383a7548d8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x7fff81d46000 - 0x7fff81db5ff9 com.apple.print.framework.PrintCore 5.5.3 (245.3) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/PrintCore.framework/Versions/A/PrintCore 0x7fff81db6000 - 0x7fff81db6ff8 com.apple.ApplicationServices 34 (34) <81cd02cc2ccf4e47e51d03db860da556> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Applicat ionServices 0x7fff81db7000 - 0x7fff81dd8fff libresolv.9.dylib ??? (???) <38318f9fbcfbdb384e0f9b08cc0e757a> /usr/lib/libresolv.9.dylib 0x7fff81dd9000 - 0x7fff81e4ffef libvMisc.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvMisc.dylib 0x7fff81e50000 - 0x7fff81e52ff7 libffi.dylib ??? (???) <920bb19728451f35703bb95dc908c7ca> /usr/lib/libffi.dylib 0x7fff81e53000 - 0x7fff81eeefe7 com.apple.ink.framework 101.3 (86) <60c6579faf114ea9677fd9ae25389ed2> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framew ork/Versions/A/Ink 0x7fff81eef000 - 0x7fff81f0dfff libPng.dylib ??? (???) <4017eab74319a648dfd73b7d503e557d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x7fff81f0e000 - 0x7fff81f24ff9 com.apple.ImageCapture 5.0.1 (5.0.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCaptu re.framework/Versions/A/ImageCapture 0x7fff81f25000 - 0x7fff81f3dfff com.apple.DictionaryServices 1.0.0 (1.0.0) <78ea11e9a92120f76d69efa24b8d1f95> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Dict ionaryServices.framework/Versions/A/DictionaryServices 0x7fff81f3e000 - 0x7fff81f42fff libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib 0x7fff81f43000 - 0x7fff81fe3fe3 com.apple.ApplicationServices.ATS 3.4 (???) <47cf09bf78935889f17f1b6b09badf0d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/ATS 0x7fff81fe4000 - 0x7fff8211bfff com.apple.CoreFoundation 6.5.5 (476.17) <51930d43c7c2d8fb24148cbfc05bba0f> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundatio n 0x7fff8211c000 - 0x7fff82126fff com.apple.speech.recognition.framework 3.7.24 (3.7.24) <2399374b096b284345daba82e2cb833d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechReco gnition.framework/Versions/A/SpeechRecognition 0x7fff82127000 - 0x7fff82159ff7 libauto.dylib ??? (???) /usr/lib/libauto.dylib 0x7fff8215a000 - 0x7fff821cefe7 libstdc++.6.dylib ??? (???) <565ee6f798f7fef6f804c60682787280> /usr/lib/libstdc++.6.dylib 0x7fff821cf000 - 0x7fff8228dfff edu.mit.Kerberos 6.0.12 (6.0.12) /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x7fff8228e000 - 0x7fff8228effb com.apple.installserver.framework 1.0 (8) /System/Library/PrivateFrameworks/InstallServer.framework/Versions/A/Install Server 0x7fff8228f000 - 0x7fff82293fff libGIF.dylib ??? (???) <66436b84211fe0e723051eab15af0aca> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x7fff82294000 - 0x7fff8258ffe3 com.apple.CoreServices.CarbonCore 786.10 (786.10) <2ac701edf3ca98a86ae9d5f733200b40> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Carb onCore.framework/Versions/A/CarbonCore 0x7fff82590000 - 0x7fff825aafff libvDSP.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvDSP.dylib 0x7fff825ab000 - 0x7fff827b1ff3 com.apple.security 5.0.4 (34102) <47c559b17c1f51998e7a981d0fbec4c8> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x7fff827b2000 - 0x7fff827d9fff libxslt.1.dylib ??? (???) /usr/lib/libxslt.1.dylib 0x7fff827da000 - 0x7fff82948fff libicucore.A.dylib ??? (???) <374ddaf141bf88dba00ab9058f2dbad6> /usr/lib/libicucore.A.dylib 0x7fff82949000 - 0x7fff8295dff7 libGL.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x7fff8295e000 - 0x7fff83286fff com.apple.AppKit 6.5.6 (949.43) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x7fff83287000 - 0x7fff83667fef com.apple.QuartzCore 1.5.7 (1.5.7) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x7fff83668000 - 0x7fff836b8fe7 com.apple.Metadata 10.5.2 (398.25) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Meta data.framework/Versions/A/Metadata 0x7fff836b9000 - 0x7fff836baff3 com.apple.audio.units.AudioUnit 1.5 (1.5) /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x7fff836bb000 - 0x7fff83710fe3 com.apple.HIServices 1.7.0 (???) <6bef766448d67adb91901b432629ea0f> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/HIServices.framework/Versions/A/HIServices 0x7fff83711000 - 0x7fff83711ffd com.apple.Accelerate.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/vecLib 0x7fff83712000 - 0x7fff837a7ffb com.apple.LaunchServices 290.3 (290.3) <56544e16c5192d2ce72df772901fcaef> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Laun chServices.framework/Versions/A/LaunchServices 0x7fff837a8000 - 0x7fff8382ffef com.apple.audio.CoreAudio 3.1.1 (3.1.1) <9c1714647fd7515c900362ad2ac76874> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x7fff83830000 - 0x7fff83893fef libGLU.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dyli b 0x7fff83894000 - 0x7fff838a2ff9 com.apple.helpdata 1.0.1 (14.2) /System/Library/PrivateFrameworks/HelpData.framework/Versions/A/HelpData 0x7fff838a3000 - 0x7fff838afff1 libgcc_s.1.dylib ??? (???) <23fa31a628c1ea8a62ac529fa333b6e1> /usr/lib/libgcc_s.1.dylib 0x7fff838b0000 - 0x7fff838d2fff libJPEG.dylib ??? (???) <4257ab268996bbeb93b47946df181cdc> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x7fff838d3000 - 0x7fff838d3ffd com.apple.Accelerate 1.4.2 (Accelerate 1.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x7fff838d4000 - 0x7fff838d4ff8 com.apple.Cocoa 6.5 (???) <8c59f679ffbd9178134df1d83dedde28> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa 0x7fff838d5000 - 0x7fff839cafff libxml2.2.dylib ??? (???) <8226d1180354f493954c5fa1fc0e1154> /usr/lib/libxml2.2.dylib 0x7fff839cb000 - 0x7fff839dafe7 com.apple.opengl 1.5.9 (1.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x7fff839db000 - 0x7fff83cc2feb com.apple.HIToolbox 1.5.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. framework/Versions/A/HIToolbox 0x7fff83cc3000 - 0x7fff83d03fef com.apple.framework.IOKit 1.5.1 (???) <17e6707127a60c5e2d7a9bd2b7bf2db0> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x7fff83d04000 - 0x7fff83dc8fe2 com.apple.vImage 3.0 (3.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage .framework/Versions/A/vImage 0x7fff83dc9000 - 0x7fff83df3fff libcups.2.dylib ??? (???) /usr/lib/libcups.2.dylib 0x7fff83df4000 - 0x7fff83df4ffa com.apple.CoreServices 32 (32) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x7fff83df5000 - 0x7fff83ed6fff libcrypto.0.9.7.dylib ??? (???) <66f1f8773bd9fdfdcfd09e2b4b010636> /usr/lib/libcrypto.0.9.7.dylib 0x7fff83ed7000 - 0x7fff83f87fef com.apple.CoreServices.OSServices 226.5 (226.5) <1c38f727b3ad3293272db7323b37c735> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSSe rvices.framework/Versions/A/OSServices 0x7fff83f88000 - 0x7fff83fa2fff com.apple.openscripting 1.2.8 (???) <0674c4e3353c677c9f58df3297ae559b> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScript ing.framework/Versions/A/OpenScripting 0x7fff83fa3000 - 0x7fff83fdfff7 libGLImage.dylib ??? (???) <02258bcdbe8defdb254acc077a81dd9b> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage. dylib 0x7fff83fe0000 - 0x7fff83ff1fff com.apple.speech.synthesis.framework 3.7.1 (3.7.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x7fff83ff2000 - 0x7fff8406cff3 com.apple.CoreText 2.0.3 (???) <827bbfef670df72316719c25bfb39915> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreText.framework/Versions/A/CoreText 0x7fff8406d000 - 0x7fff841f8ffb libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0x7fff841f9000 - 0x7fff8420affd libz.1.dylib ??? (???) /usr/lib/libz.1.dylib 0x7fff8420b000 - 0x7fff842befef com.apple.DesktopServices 1.4.7 (1.4.7) /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/D esktopServicesPriv 0x7fff842bf000 - 0x7fff84677fff libLAPACK.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libLAPACK.dylib 0x7fff84678000 - 0x7fff84743fef com.apple.ColorSync 4.5.1 (4.5.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ColorSync.framework/Versions/A/ColorSync 0x7fff84744000 - 0x7fff84847feb com.apple.CoreData 100.1 (186) <074abc7f43f81f7885e4d0674a8be4bc> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x7fffffe00000 - 0x7fffffe01780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0xfffffffffffec000 - 0xfffffffffffeffff libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib SYSTEM CONFIG Model: MacPro3,1, BootROM MP31.006C.B05, 8 processors, Quad-Core Intel Xeon, 2.8 GHz, 32 GB Graphics: kHW_ATIrv630Item, ATI Radeon HD 2600, spdisplays_pcie_device, 256 MB Memory Module: DIMM Riser B/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Bluetooth: Version 2.1.3f8, 2 service, 1 devices, 1 incoming serial ports Network Service: Ethernet 2, Ethernet, en1 PCI Card: ATI Radeon HD 2600, display, Slot-1 Serial ATA Device: WDC WD3200AAJS-41VWA0, 298.09 GB Parallel ATA Device: PIONEER DVD-RW DVR-112D USB Device: Keyboard Hub, (null) mA USB Device: Apple Optical USB Mouse, (null) mA USB Device: Apple Keyboard, (null) mA USB Device: hub_device, (null) mA USB Device: Apple Cinema HD Display, (null) mA USB Device: Keyspan USA-28Xb, (null) mA USB Device: Bluetooth USB Host Controller, (null) mA FireWire Device: built-in_hub, unknown_value, unknown_speed FireWire Device: My Book, WD, 800mbit_speed FireWire Device: unknown_device, unknown_value, unknown_speed -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From jaakko.sipari at gmail.com Thu Jan 22 03:00:03 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 22 Jan 2009 12:00:03 +0200 Subject: [Rxtx] RXTX compilation with GCJ possible? Message-ID: <901f25b80901220200s53792317o374b80cbb6066a52@mail.gmail.com> Hi! Does anyone have experience on using RXTX in a GCJ compiled Java application? I'm interested whether this is possible in Windows and/or in Linux platforms. And of course what does it take to get it work, or does it just work out of the box. Ultimately my aim here would be to move to a more time deterministic system by utilizing GCJ, jRate & Javolution and possibly run the RXTX (and other important) threads at a priority higher than the garbage collector. This of course would require some modification for the RXTX threads to run in a Javolution pool context or non allocating real time contexts so they wouldn't produce any garbage, but that's something to hack on later. For now I'd just like to know if there are any obstacles on the road to compiling & running RXTX with GCJ. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/5592681a/attachment-0011.html From jmudd at dtiweb.net Thu Jan 22 06:21:03 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Thu, 22 Jan 2009 08:21:03 -0500 Subject: [Rxtx] Hot unplugging of a USB device References: <4977BEEA.4020708@gatworks.com> Message-ID: U. George, Thanks for the information. How did you resolve your USB/GPS device on Linux? My application has to run on both Linux and Windows eventually. Thanks, Jerry -----Original Message----- From: U. George [mailto:netbeans at gatworks.com] Sent: Wednesday, January 21, 2009 7:34 PM To: Jerry Mudd Cc: rxtx at qbang.org Subject: Re: [Rxtx] Hot unplugging of a USB device > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From m.kirkland at comcast.net Thu Jan 22 09:21:01 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Thu, 22 Jan 2009 08:21:01 -0800 Subject: [Rxtx] Serial port control lines change with call to getPortIdentifiers() on Linux Message-ID: <94443DEFFD574B6CA8DDB2B201D9E007@bengal.net> Hi All ! I have noticed an issue with RXTX on Ubuntu Linux 8.10 that has prevented me from being able to use RXTX on Linux. I have noticed this issue on both the rxtx 2.1.7 and the new rxtx2.2pre1. When I execute the following line to get the ports on a system - java.util.Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); Both DTR and RTS become active on ttyS0 and only ttyS0, not ttyS1 (I only have 2 ports). I see this prior to opening any ports or making any other calls to RXTX. I have stepped it though with the debugger and I am sure this is the trigger. My application uses these control lines to perform functions other then the standard flow control so it is critical that I be able to control them exactly. I would also think that folks using RXTX for more standard serial IO would also have issues with devices starting to talk before a listener was ready. I checked Windows XP and I do not see this issue (but I only have a com1 on the Windows computer). I also noticed that the DTR line blips when setting up a port on 2.2.pre1 like it does on 2.1.7r2. This it the same issue that the folks at http://www.codeskin.com/ patched. I see this issue on both Linux and Windows XP. Any help or clues would be greatly appreciated. If I can provide any additional info or do any testing I would be glad to help out to get version 2.2 in top shape for release. BTW I have written a simple dynamic loader to load the RXTX jar and native code that is drive by the os.name and os.arch system properties. I would be more then happy to contribute this to the project if folks though it would be useful. Its more convenient then having to manage copying the files around to various JVM's. TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/eab26bae/attachment-0010.html From josefk_5 at yahoo.com Fri Jan 23 09:44:06 2009 From: josefk_5 at yahoo.com (Josef Kahsay) Date: Fri, 23 Jan 2009 08:44:06 -0800 (PST) Subject: [Rxtx] Help on Accessing RS232 Message-ID: <509617.88308.qm@web38205.mail.mud.yahoo.com> Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS From m.kirkland at comcast.net Sat Jan 24 01:28:52 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Sat, 24 Jan 2009 00:28:52 -0800 Subject: [Rxtx] Help on Accessing RS232 In-Reply-To: <509617.88308.qm@web38205.mail.mud.yahoo.com> References: <509617.88308.qm@web38205.mail.mud.yahoo.com> Message-ID: <665887C02E1446708CE392FE0BD73D79@bengal.net> It seems to me that you are having a classic java classpath issue. Java classpath issues can be annoying to solve sometimes. As some random guesses I would suggest you look at the following. 1 - You might not be running the JVM from the location that you think you are (gets me all the time). I which Windows had a which command. 2 - You don't mention what development environment you are using like Eclipse etc., and if you are trying to run the demo from inside the development environment. If so, do whatever is appropriate for the development environment to control the classpath. In Eclipse this would involve adding a "User Library" to point to the jar and native code. 3 - Once you get the classpath ok, the next thing you might run into is not being able to load the native library. 4 - I have found that on XP I can place the RXTX jar and native library in the same directory as my application's jar file (and a class-path entry in the application's jar file manifest) and it all works. 5 - If you need more control of managing different versions of RXTX for different OS platforms, I have a dynamic RXTX loader I can send you (but I recommend getting the simple case working first). Let me know if this helps. Mike -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Josef Kahsay Sent: Friday, January 23, 2009 8:44 AM To: rxtx at qbang.org Subject: [Rxtx] Help on Accessing RS232 Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jacomoman at hotmail.com Mon Jan 26 12:12:27 2009 From: jacomoman at hotmail.com (Joseph Schmoley) Date: Mon, 26 Jan 2009 11:12:27 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: Message-ID: Hi All, First, let me thank you all for your effort on this excellent project. I've been using the Win32 binaries in the 2.1-7r2 package without any problems on WinXP Pro (32-bit). I then tried the .jnilib of the same version on my Mac OSX 10.5 64-bit darwin and got the familiar UnsatisfiedLinkError problem. I read up on all the mailing list archive messages and found this one (http://mailman.qbang.org/pipermail/rxtx/2008-May/2436699.html) suggesting that perhaps rxtx-devel from CVS would have a fix. So I got latest rxtx-devel + commapi-0-0-1 as suggested by the CVS page at rxtx.org. I even set my CFLAGS and LDFLAGS to include "-arch x86_64 -arch ppc64", but as it turned out, the latest configure script didn't need it. In any case, I configured and built rxtx-devel with no errors (that I could see) and transferred the resulting i386-apple-darwin9.6.0/librxtxSerial.jnilib to where my java.library.path is pointing to and ran my test class. Whereas before I was getting UnsatisfiedLinkError, I now simply get this: Invalid memory access of location 22d927c8 rip=22356420 Invalid memory access of location 22d9292c rip=22357540 [error occurred during error reporting (null), id 0xa] ./run-class.sh: line 10: 15647 Segmentation fault java -Djava.library.path=./lib/native -Dapp.logging.file.path=./log/runtime.log -classpath .:${MYCP} ${CLASSNAME} "${CMD}" run-class.sh is simply a script I've got to run my test class and all that class does is invoke the RXTX API, first one being: CommPortIdentifier.getPortIdentifiers(). Has anyone had any luck with getting latest CVS sources to work on Mac OS X 10.5 64-bit? Any help/pointers would be greatly appreciated. Thank you in advance. -Jac I've attached my configure and make output as txt files. Here's all my build/machine environment info, as per the troubleshooting wiki page: Mac OS X 10.5.6 (9G55) ----------------------------------------------- /usr/bin/java -version java version "1.6.0_07" Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153) Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode) ----------------------------------------------- Darwin my-macbook.local 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 ----------------------------------------------- autoconf (GNU Autoconf) 2.61 Copyright (C) 2006 Free Software Foundation, Inc. This is free software. You may redistribute copies of it under the terms of the GNU General Public License . There is NO WARRANTY, to the extent permitted by law. Written by David J. MacKenzie and Akim Demaille. ----------------------------------------------- automake (GNU automake) 1.10 Written by Tom Tromey and Alexandre Duret-Lutz . Copyright 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ----------------------------------------------- $ libtool -V Apple Computer, Inc. version cctools-698.1 ----------------------------------------------- GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program built for powerpc-apple-darwin9.0 ----------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: my-configure.out.txt Type: application/octet-stream Size: 6934 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090126/89d9c7f6/attachment-0012.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: my-make.out.txt Type: application/octet-stream Size: 7737 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090126/89d9c7f6/attachment-0013.obj From kintel at sim.no Mon Jan 26 16:16:19 2009 From: kintel at sim.no (Marius Kintel) Date: Tue, 27 Jan 2009 00:16:19 +0100 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: Message-ID: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Hi Jac, I've had the same issue, and I suggested a patch to partially fix it a while back: http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html I don't know the status of this in the current incarnation of the rxtx code and I have reverted to Java-1.5 since then.. ~/= Marius -- We are Elektropeople for a better living. From tjarvi at qbang.org Tue Jan 27 08:08:54 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 27 Jan 2009 08:08:54 -0700 (MST) Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: On Tue, 27 Jan 2009, Marius Kintel wrote: > Hi Jac, > > I've had the same issue, and I suggested a patch to partially fix it a > while back: > http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html > > I don't know the status of this in the current incarnation of the rxtx > code and I have reverted to Java-1.5 since then.. > > ~/= Marius > > -- > We are Elektropeople for a better living. > Hmm. That did not get in. I can add it and put a new prerelease out this week. The eis must be a regression. I was sure we fixed that. -- Trent Jarvi tjarvi at qbang.org From jacomoman at hotmail.com Tue Jan 27 08:48:16 2009 From: jacomoman at hotmail.com (Joseph Schmoley) Date: Tue, 27 Jan 2009 07:48:16 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: That would be excellent Trent. I've got a project partially on hold because of this. It runs great on Win32 (XP/Vista), it just has to do the same on Mac 64-bit and Linux 32-bit. I look forward to this pre-release. Again, thanks a bunch to you and all the other code contributors for this excellent project. I wish I could donate something to you guys. I couldn't find a donation link anywhere. RxTx has been a great help with my project. -Jac From: Trent Jarvi Sent: Tuesday, January 27, 2009 7:08 AM To: Marius Kintel Cc: Joseph Schmoley ; rxtx at qbang.org Subject: Re: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit On Tue, 27 Jan 2009, Marius Kintel wrote: > Hi Jac, > > I've had the same issue, and I suggested a patch to partially fix it a > while back: > http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html > > I don't know the status of this in the current incarnation of the rxtx > code and I have reverted to Java-1.5 since then.. > > ~/= Marius > > -- > We are Elektropeople for a better living. > Hmm. That did not get in. I can add it and put a new prerelease out this week. The eis must be a regression. I was sure we fixed that. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090127/bbd287bb/attachment-0005.html From bschlining at gmail.com Tue Jan 27 09:38:26 2009 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 27 Jan 2009 08:38:26 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: > That would be excellent Trent. I've got a project partially on hold > because of this. It runs great on Win32 (XP/Vista), it just has to do the > same on Mac 64-bit and Linux 32-bit. I look forward to this pre-release. > I'm in the same spot too. Looking forward to the pre-release! -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090127/2275013b/attachment-0005.html From andrew.paverd at rorotika.com Wed Jan 28 03:14:58 2009 From: andrew.paverd at rorotika.com (Andrew Paverd) Date: Wed, 28 Jan 2009 12:14:58 +0200 Subject: [Rxtx] RXTX not working on Solaris Message-ID: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Hi all, I am attempting to use RXTX on a Sun SPARC server running Solaris. I have tried the binaries from both the latest release (2.1-7) and the pre-release (2.2pre1). The 2.1-7 driver gives the following error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: fatal: libgcc_s.so.1: open failed: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)" I'm not sure what this "libgcc_s.so.1" file does in terms of RXTX but its absence is preventing the application from running. With the 2.2pre1 binary, the application loads without any issue but does not detect any comm-ports. I know that there are multiple ports available because when using the Sun javax.comm library for Solaris SPARC, the ports are all correctly discovered and the application can read from and write to them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in the 2.2 release. Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if so, how did you do it (which versions did you use etc.)? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090128/a97b220d/attachment-0005.html From tjarvi at qbang.org Wed Jan 28 17:01:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 28 Jan 2009 17:01:50 -0700 (MST) Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: On Wed, 28 Jan 2009, Andrew Paverd wrote: > > Hi all, > > ? > > I am attempting to use RXTX on a Sun SPARC server running Solaris. I have > tried the binaries from both the latest release (2.1-7) and the pre-release > (2.2pre1). > > ? > > The 2.1-7 driver gives the following error: > > ? > > ?Exception in thread "main" java.lang.UnsatisfiedLinkError: > /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: > fatal: libgcc_s.so.1: open failed: No such file or directory > > ??????? at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > ??????? at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) > > ??????? at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) > > ??????? at java.lang.Runtime.loadLibrary0(Runtime.java:823) > > ??????? at java.lang.System.loadLibrary(System.java:1030) > > ??????? at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)? > > ? > > I?m not sure what this ?libgcc_s.so.1? file does in terms of RXTX but its > absence is preventing the application from running. > > ? > > With the 2.2pre1 binary, the application loads without any issue but does > not detect any comm-ports. I know that there are multiple ports available > because when using the Sun javax.comm library for Solaris SPARC, the ports > are all correctly discovered and the application can read from and write to > them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in > the 2.2 release. > > ? > > Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if > so, how did you do it (which versions did you use etc.)? > > ? Hi Andrew ld.so/libgcc_s.so are part of GNU gcc/ld. They are available for solaris. I'm not sure how to link them without requiring them. It is also possible to compile rxtx with Sun's compiler if you have it. Perhaps someone here knows how to get rxtx compiled on Solaris using gcc without requiring those libs by everyone? -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Jan 28 17:39:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 28 Jan 2009 17:39:08 -0700 (MST) Subject: [Rxtx] Problem on 'Trouble Shooting' wiki page. Message-ID: It has been pointed out that the rxtx wiki page says usermod -G may be used to update the group a user is in. http://rxtx.qbang.org/wiki/index.php/Trouble_shooting The corrected text now says to use usermod -aG to add the user to a group in addition to their current group(s). The previous -G version would replace the users current groups with the new group. Replacing group information can cause significant problems for end users. If you have information based upon the wiki, please update your content. Thanks, -- Trent Jarvi tjarvi at qbang.org From andrew.paverd at rorotika.com Thu Jan 29 02:15:35 2009 From: andrew.paverd at rorotika.com (Andrew Paverd) Date: Thu, 29 Jan 2009 11:15:35 +0200 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Thanks for the advice Trent - I was originally using the precompiled librxtxSerial.so. I've subsequently compiled rxtx for Solaris (using gcc) and after copying the libgcc_s.so file to my .../jre/lib/sparc directory, the library loads. However, it does not detect any ports. When I call the getComPortIdentifiers() nothing is returned and I can't connect to any port. Sun's javax.comm package detects and can connect to all the ports. This is the same as when I tried the 2.2pre1 library. Are there any extra steps that must be taken to detect ports on Solaris? (user is member of uucp group) Thanks, Andrew From tristan.dyer at cgi.com Thu Jan 29 05:57:25 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 29 Jan 2009 07:57:25 -0500 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D030BE152@MTL-MSG-02.cgiclients.com> Andrew, I had the same problem, but before I got too far the scope of my project changed, and I don't have to support Solaris anymore.. I was getting a weird error, file does not exist but should, or something like that. The project ended before I figured out why. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Andrew Paverd Sent: January 29, 2009 5:16 AM To: 'Trent Jarvi' Cc: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working on Solaris Thanks for the advice Trent - I was originally using the precompiled librxtxSerial.so. I've subsequently compiled rxtx for Solaris (using gcc) and after copying the libgcc_s.so file to my .../jre/lib/sparc directory, the library loads. However, it does not detect any ports. When I call the getComPortIdentifiers() nothing is returned and I can't connect to any port. Sun's javax.comm package detects and can connect to all the ports. This is the same as when I tried the 2.2pre1 library. Are there any extra steps that must be taken to detect ports on Solaris? (user is member of uucp group) Thanks, Andrew _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Martin.Oberhuber at windriver.com Thu Jan 29 06:15:01 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:15:01 +0100 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2326@ism-mail03.corp.ad.wrs.com> Hi Andrew & Paverd, the trick of compiling with gcc on Solaris such that the libgcc_s.so library is not needed at runtime is that gcc itself must be configured and compiled with special options: cd gcc-src ./configure --disable-shared make Using that specially compiled gcc, you can then build the RXTX library: setenv PATH $HOME/my-gcc/bin:$PATH cd rxtx mkdir build-solaris && cd build-solaris ../configure --disable-lockfiles make For more details, see the original bug and its attachments: http://bugzilla.qbang.org/show_bug.cgi?id=73 An rxtx-2.1-7r2 build for Solaris without libgcc_s dependency is available from the Eclipse packages at http://rxtx.qbang.org/eclipse/downloads/ Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Andrew Paverd Sent: Mittwoch, 28. J?nner 2009 11:15 To: rxtx at qbang.org Subject: [Rxtx] RXTX not working on Solaris Hi all, I am attempting to use RXTX on a Sun SPARC server running Solaris. I have tried the binaries from both the latest release (2.1-7) and the pre-release (2.2pre1). The 2.1-7 driver gives the following error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: fatal: libgcc_s.so.1: open failed: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)" I'm not sure what this "libgcc_s.so.1" file does in terms of RXTX but its absence is preventing the application from running. With the 2.2pre1 binary, the application loads without any issue but does not detect any comm-ports. I know that there are multiple ports available because when using the Sun javax.comm library for Solaris SPARC, the ports are all correctly discovered and the application can read from and write to them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in the 2.2 release. Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if so, how did you do it (which versions did you use etc.)? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090129/d6d73f3e/attachment-0004.html From Martin.Oberhuber at windriver.com Thu Jan 29 06:16:38 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:16:38 +0100 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E232A@ism-mail03.corp.ad.wrs.com> Hi Andrew, one thing I did notice on Solaris was that after closing a port, the Solaris Kernel seems to have some timeout before it can be re-opened. So, when you try it again, make sure that no other application hogs the port or has been hogging it shortly before. It may make sense to try a few times. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Andrew Paverd > Sent: Donnerstag, 29. J?nner 2009 10:16 > To: 'Trent Jarvi' > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX not working on Solaris > > Thanks for the advice Trent - I was originally using the > precompiled librxtxSerial.so. I've subsequently compiled rxtx > for Solaris (using gcc) and after copying the libgcc_s.so > file to my .../jre/lib/sparc directory, the library loads. > > However, it does not detect any ports. When I call the > getComPortIdentifiers() nothing is returned and I can't > connect to any port. Sun's javax.comm package detects and can > connect to all the ports. This is the same as when I tried > the 2.2pre1 library. > > Are there any extra steps that must be taken to detect ports > on Solaris? (user is member of uucp group) > > Thanks, > > > Andrew > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From Martin.Oberhuber at windriver.com Thu Jan 29 06:24:05 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:24:05 +0100 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2335@ism-mail03.corp.ad.wrs.com> Hi Greg, sorry for the late response (just catching up on E-Mails). I do not plan to create any Eclipse bundles before rxtx-2.2 is released. Creating the packages is a bit of an effort, which I'd rather postpone until the release, and then do it only once. In the meantime, if you need it for testing, I think it should be easy to take the existing Eclipse bundles/fragments and simply replace any new DLL's / so's in them, plus use WinZIP to replace the .class files in the Java bundle. For Eclipse, it will still look like rxtx-2.1-7 but in reality it will be your own latest build. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Trent Jarvi > Sent: Sonntag, 04. J?nner 2009 20:42 > To: Greg Johnson > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] [Announce] RXTX 2.2pre1 is available. > > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse > packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be > a popular > spam abuse page. I'll put a license and download link on there. All > other pages are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > > > Hi Trent, > > The download link on rxtx.org > (http://users.frii.com/jarvi/rxtx/) loops back > > to rxtx.org, and the wiki doesn't seem to have a link (top > level at least) to > > download. I think Martin had been generating > (fantastically useful) Eclipse > > bundles, as well - are these available for 2.2pre1 also? > > > > Many thanks to everyone for their work - rxtx is an > essential part of our > > product, and we have been keenly awaiting this release. > > > > Regards, > > greg > > > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > > > >> > >> The binaries, source and pending wiki move are now announced on > >> http://www.rxtx.org. After this has baked, we can put > the web install in. > >> > >> Changes in rxtx 2.2 (If I missed something let me know): > >> ... snip ... > >> > >> -- > >> Trent Jarvi > >> tjarvi at qbang.org_______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > -- > > Greg Johnson, PhD > > Director of Engineering > > http://www.rbr-global.com > > greg.johnson at rbr-global.com > > +1.613.233.1621 (GMT-5) office > > > > > > See us at: Ocean Business 2009, Southampton, England, March > 31 - April 1, > > 2009 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From Martin.Oberhuber at windriver.com Thu Jan 29 06:32:57 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:32:57 +0100 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> Hi Tristan, > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); I think that this code is wrong. User code must not call the RXTXCommDriver constructor, since you cannot initialize it properly. What you can do to announce previously unknown port names is this: System.setProperty("gnu.io.rxtx.SerialPorts","/dev/term/a"); before you first access any RXTX function. For details, see the code in RXTXCommDriver#registerSpecifiedPorts() > What is the output of System.getProperty("os.name") on OpenSolaris? I didn't see any response of yours to this question from Trent. What does OpenSolaris output? Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Trent Jarvi > Sent: Mittwoch, 31. Dezember 2008 20:04 > To: Dyer, Tristan > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX for OpenSolaris 2008.11 > > > > On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > > > > Hi, > > > > I have tried building the rxtx library for OpenSolaris 2008.11. > > > > It seemed to build fine without errors, however code such as > > > > ????? java.util.Enumeration portList > > ???????? = CommPortIdentifier.getPortIdentifiers(); > > ????? boolean found = false; > > ????? while (portList.hasMoreElements()) { > > ???????? portId = (CommPortIdentifier) portList.nextElement(); > > ???????? System.out.println(" " + portId.getName()); > > ???????? if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > > ?????????? ???? ?? System.out.println("found"); > > ?????????????? found = true; > > ?????????????? break; > > ??????????? } > > ???????? } > > ????? } > > Will output nothing. > > > > Or rather it seems as if there are no ports found by RXTX. > This code works > > on Ubuntu8.04 and winXP. > > > > If I Add the port manually and then try and open the port > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > > ????? try{ > > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > > ????? } > > ????? catch(Exception e){ > > ??? ??? ? System.out.println("NoSuchPortException"); > > ??? ??? ? //ignore > > ????? } > > ????? try { > > ??????? ???????? System.out.println("opening port"); > > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > > WAIT_TO_OPEN); > > ??????????? connected = true; > > ??????????? System.out.println("Connected to port " + > portId.getName()); > > ???????? } catch (PortInUseException p) { > > ??????????? if (DEBUG) { > > ?????????????? System.err.println(p); > > ??????????? } > > ??????????? port = null; > > ??????????? portId = null; > > ??????????? System.out.println("PortInUseException"); > > ??????????? p.printStackTrace(); > > ???????? } > > > > I will get the following, but not the NoSuchPortException. > > > > java.lang.reflect.InvocationTargetException > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Caused by: java.lang.NullPointerException > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:296) > > > > ??????? ... 7 more > > > > > > As well as > > > > java.lang.NullPointerException > > ??????? at > gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > > ??????? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > > ??????? at > > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:255) > > > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > > > Did I build it wrong? Or is there a problem with > OpenSolaris that will > > prevent this from working? Or am I missing something > incredibly simple? > > > > As well OpenSolaris is running inside a VM with COM1 mapped to > > COM1(VirtualBox) which I believe maps it to /dev/term/a > > > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > > > > > Hi Tristan? > > What is the output of System.getProperty("os.name") on > OpenSolaris? We > have logic like the following in RXTX to handle platform specific > information: > > if ( osName.equals("Solaris") || osName.equals("SunOS")) > > Which may not be getting hit. The result if you will never > call private > void checkSolaris(String PortName, int PortType). > > It could also result in Solaris specific settings not being > set in the > Makefile. > > > The os.name is displayed when you run the configure script. > > -- > Trent Jarvi > tjarvi at qbang.org > From Martin.Oberhuber at windriver.com Thu Jan 29 06:38:20 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:38:20 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] how do you dynamically reload native libraries? In-Reply-To: References: Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2341@ism-mail03.corp.ad.wrs.com> Hi Douglas, Eclipse / OSGi may be doing what you want. It does say that multiple versions of a lib can co-exist at the same time, when the MANIFEST.MF doesn't specify a lib as a singleton. I'm not sure though if or how that would work with native libs. Eclipse bundles for RXTX-2.1-7r2 are available on http://rxtx.qbang.org/eclipse/downloads/ You could build RXTX-2.2pre and then manually create those Eclipse bundles just by adding the MANIFEST.MF to the JAR with the version number exchanged. Then you should be able to try it out. If you do, let me know how it goes... Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Samstag, 27. Dezember 2008 15:00 > To: rxtx at qbang.org; lyon at docjava.com > Subject: [Suspected Spam][Blocked Sender][Rxtx] how do you > dynamically reload native libraries? > > Hi All, > I am trying to test multiple versions of the RXTX native libraries > in a single JVM. > > Each RXTX library instance can share a single virtual machine, but > must have an isolated context class loader. > A context class loader maps a thread to specific classes and > resources. > When the thread dies, the classes and resources are freed. > > Is there some way to have multiple context class loaders that can > load different native method > library implementations? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Thu Jan 29 07:50:05 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 29 Jan 2009 09:50:05 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D030BE22B@MTL-MSG-02.cgiclients.com> Sorry, I had sent it to Trent alone. It outputs "SunOS" Also I had only added that line as a test to see if explicitly adding the port would make a difference, it didn't. My project scope has been reduced so I don't need to support solaris anymore, but I will return to the problem when things slow down. I do remember that the error that was being reported by the native code was "2" which I believe maps to "ENOENT No such file or directory A file name is specified and the file should exist but doesn't, or one of the directories in a path name does not exist." I didn't get much farther. Thanks, -- Tristan Dyer -----Original Message----- From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] Sent: January 29, 2009 9:33 AM To: Trent Jarvi; Dyer, Tristan Cc: rxtx at qbang.org Subject: RE: [Rxtx] RXTX for OpenSolaris 2008.11 Hi Tristan, > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); I think that this code is wrong. User code must not call the RXTXCommDriver constructor, since you cannot initialize it properly. What you can do to announce previously unknown port names is this: System.setProperty("gnu.io.rxtx.SerialPorts","/dev/term/a"); before you first access any RXTX function. For details, see the code in RXTXCommDriver#registerSpecifiedPorts() > What is the output of System.getProperty("os.name") on OpenSolaris? I didn't see any response of yours to this question from Trent. What does OpenSolaris output? Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Mittwoch, 31. Dezember 2008 20:04 > To: Dyer, Tristan > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX for OpenSolaris 2008.11 > > > > On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > > > > Hi, > > > > I have tried building the rxtx library for OpenSolaris 2008.11. > > > > It seemed to build fine without errors, however code such as > > > > ????? java.util.Enumeration portList > > ???????? = CommPortIdentifier.getPortIdentifiers(); > > ????? boolean found = false; > > ????? while (portList.hasMoreElements()) { > > ???????? portId = (CommPortIdentifier) portList.nextElement(); > > ???????? System.out.println(" " + portId.getName()); > > ???????? if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > > ?????????? ???? ?? System.out.println("found"); > > ?????????????? found = true; > > ?????????????? break; > > ??????????? } > > ???????? } > > ????? } > > Will output nothing. > > > > Or rather it seems as if there are no ports found by RXTX. > This code works > > on Ubuntu8.04 and winXP. > > > > If I Add the port manually and then try and open the port > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > > ????? try{ > > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > > ????? } > > ????? catch(Exception e){ > > ??? ??? ? System.out.println("NoSuchPortException"); > > ??? ??? ? //ignore > > ????? } > > ????? try { > > ??????? ???????? System.out.println("opening port"); > > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > > WAIT_TO_OPEN); > > ??????????? connected = true; > > ??????????? System.out.println("Connected to port " + > portId.getName()); > > ???????? } catch (PortInUseException p) { > > ??????????? if (DEBUG) { > > ?????????????? System.err.println(p); > > ??????????? } > > ??????????? port = null; > > ??????????? portId = null; > > ??????????? System.out.println("PortInUseException"); > > ??????????? p.printStackTrace(); > > ???????? } > > > > I will get the following, but not the NoSuchPortException. > > > > java.lang.reflect.InvocationTargetException > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Caused by: java.lang.NullPointerException > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:296) > > > > ??????? ... 7 more > > > > > > As well as > > > > java.lang.NullPointerException > > ??????? at > gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > > ??????? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > > ??????? at > > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:255) > > > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > > > Did I build it wrong? Or is there a problem with > OpenSolaris that will > > prevent this from working? Or am I missing something > incredibly simple? > > > > As well OpenSolaris is running inside a VM with COM1 mapped to > > COM1(VirtualBox) which I believe maps it to /dev/term/a > > > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > > > > > Hi Tristan > > What is the output of System.getProperty("os.name") on OpenSolaris? > We have logic like the following in RXTX to handle platform specific > information: > > if ( osName.equals("Solaris") || osName.equals("SunOS")) > > Which may not be getting hit. The result if you will never call > private void checkSolaris(String PortName, int PortType). > > It could also result in Solaris specific settings not being set in the > Makefile. > > > The os.name is displayed when you run the configure script. > > -- > Trent Jarvi > tjarvi at qbang.org > From hho at bibliotheca.dk Thu Jan 29 08:00:49 2009 From: hho at bibliotheca.dk (Hans Hvelplund Odborg) Date: Thu, 29 Jan 2009 16:00:49 +0100 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: I know that there arent any guarantees, but could someone involved with the development of RxTx please guesstimate when 2.2 final will be released? I'm not familiar with the pre-release history of 2.1-7 but I read that there was 20 pre-relases of 2.1-7 so I guess (based on current pre-release rate) that 2.2 may easily be more than 6 months away? Thanks Med venlig hilsen / Best regards / Med v?nliga h?lsningar Hans Hvelplund Odborg BIBLIOTHECA A/S Vallensb?kvej 22A, 2. TH ? 2605 Br?ndby ? Denmark Mob.: +45 30235940 Tel.: +45 70271008 Fax: +45 70271009 hho at bibliotheca.dk www.bibliotheca.dk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: 4. januar 2009 20:15 To: rxtx at qbang.org Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Jan 29 08:33:33 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 29 Jan 2009 08:33:33 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: Projects tend to evolve from an adhoc release process to predictable releases when enough projects demand it (and help make it happen). "Its ready when Its ready" is a typical answer prior to the above. I lik$ to say "The beatings will continue until moral improves." I expect moral to improve in the next six months at most. This release i$ resolving 3 larger issues. 1) syncing of some large efforts to the same source code. 2) incorperating all community patches 3) building the binaries correctly. This does not include fixing everyones bugs. But it does include making sure the fixes get in if they are provided. Given the above, I don't expect this to be as drawn out as 2.1-7pre*. We may have several stable releases during the same period. On Thu, 29 Jan 2009, Hans Hvelplund Odborg wrote: > I know that there arent any guarantees, but could someone involved with the > development of RxTx please guesstimate when 2.2 final will be released? > > I'm not familiar with the pre-release history of 2.1-7 but I read that there > was 20 pre-relases of 2.1-7 so I guess (based on current pre-release rate) > that 2.2 may easily be more than 6 months away? > > Thanks > > Med venlig hilsen / Best regards / Med v?nliga h?lsningar > Hans Hvelplund Odborg > > BIBLIOTHECA A/S > Vallensb?kvej 22A, 2. TH ? 2605 Br?ndby ? Denmark > Mob.: +45 30235940 > Tel.: +45 70271008 > Fax: +45 70271009 > hho at bibliotheca.dk > www.bibliotheca.dk > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: 4. januar 2009 20:15 > To: rxtx at qbang.org > Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. > > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org. After this has baked, we can put the web install > in. > > Changes in rxtx 2.2 (If I missed something let me know): > > threshold fix > Alexandre Rusev > http://bugzilla.qbang.org/show_bug.cgi?id=85 > > RXTX close deadlocks in REXTXPort.finalize > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=53 > > Add ACM serial devices to all known ports. > Duncan Pierce > http://bugzilla.qbang.org/show_bug.cgi?id=51 > > Concurrency fixes for SMP/multicore systems > U. George > http://bugzilla.qbang.org/show_bug.cgi?id=100 > > Fixes for MAC systems with no drivers installed. > 1.5 stop bit fix > > Enable universal library builds for Mac OS X > Andre-John Mas ajmas at sympatico.ca > > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > Do not remove and ignore interrupts. > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=45 > > find ports which were added after program startup on Mac > OS X. > Martin Oberhuber > http://bugzilla.qbang.org/show_bug.cgi?id=48 > > Clean up CommPort Ownership code, avoid possible deadlocks, > fix lost commport ownership events. > Martin Oberhuber > http://bugzilla.qbang.org/show_bug.cgi?id=83 > > rxtx does not compile against JDK-1.6 > Neboj?a > http://bugzilla.qbang.org/show_bug.cgi?id=84 > > configure script failed at line UTS_RELEASE > megov > http://bugzilla.qbang.org/show_bug.cgi?id=80 > > code cleanup patch (extra ';' creates bug for if statements > + new String() calls removed) > Xavier Le Vourch > http://bugzilla.qbang.org/show_bug.cgi?id=77 > > Wont compile on linux ppc with glibc 2.5 - no sys/io.h > Brian Johnson > http://bugzilla.qbang.org/show_bug.cgi?id=72 > > rxtx overwrites System properties > Andrew Gillett > Nektarios K. Papadopoulos > Neboj?a > http://bugzilla.qbang.org/show_bug.cgi?id=64 > > Solaris ACM port support > Dave Cleal > http://bugzilla.qbang.org/show_bug.cgi?id=59 > > Setting of non-standard baud rate fails. > Andrew Prunicki > http://bugzilla.qbang.org/show_bug.cgi?id=58 > > RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=50 > > JavaDoc fixes > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > From mmornati at byte-code.com Fri Jan 30 02:32:44 2009 From: mmornati at byte-code.com (Marco Mornati) Date: Fri, 30 Jan 2009 10:32:44 +0100 Subject: [Rxtx] Linux Library Message-ID: <1233307964.4046.19.camel@localhost.localdomain> Hello, I made a little Applet added to my web application to support BarCode printer (on serial port). All is autoconfigured during applet init: dll/so are copied on /tmp folder on local computer and with System.load(/tmp/library.so/dll) I'm adding the library to classpath. On windows all works correctly and I'm able to print (jar is signed... without signing it there's no way to communicate with serial port). I've just a little problem on linux. It seams that library is not added to classpath, because when I try to connect with com port, applet says that is impossible to find .so. Any idea on what could be the problem? Just for information I post here my code: Container content = getContentPane(); content.setBackground(Color.white); content.setLayout(new FlowLayout()); String libraryFile = ""; String libraryName = ""; if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")) { libraryName = DLL_SERIAL_NAME; libraryFile = System.getProperty("java.io.tmpdir") + DLL_SERIAL_NAME; } else if (System.getProperty("os.name").toUpperCase().contains("LINUX")) { if (System.getProperty("os.arch").contains("i386")) { libraryName = SO_SERIAL_NAME_32; } else { libraryName = SO_SERIAL_NAME_64; } char fileSeparator = System.getProperty("file.separator").charAt(0); libraryFile = System.getProperty("java.io.tmpdir") + fileSeparator + SO_SERIAL_NAME; } System.out.println("Library File: " + libraryFile); /** * Copying DLL to java bin dir (if it's not already present) */ if (!verifyLibraryExistence(libraryFile)) { System.out.println("Library file does not exist"); copyResourceFromJar(libraryFile, libraryName); } try { System.load(libraryFile); } catch (Exception e) { System.out.println("Cannot load " + libraryFile + " you have to install it manually!!"); } try { content.add(new JLabel("Initializing Applet!")); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); content.add(new JLabel("List Porte: " + portList)); if (portList == null) { content.add(new JLabel("No Serial Port Found!!")); } while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL)) { System.out.println("Porta Trovata: " + portId.getName()); content.add(new JLabel("Porta Trovata: " + portId.getName())); } break; } } catch (Exception e) { content.add(new JLabel("Exception: " + e)); e.printStackTrace(); } Thanks a lot Bye Marco -- Dott. Ing. Mornati Marco Byte-Code s.r.l via Antonio Cechov, 1 San Giuliano Milanese (MI) E-Mail: mmornati at byte-code.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090130/c176573f/attachment-0003.bin From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0029.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0029.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0027.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0027.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0027.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0027.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0026.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0024.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0024.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0024.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0024.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0024.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0021.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0021.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0021.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment-0020.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0020.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment-0020.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment-0020.html From tjarvi at qbang.org Wed Jan 14 18:56:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 14 Jan 2009 18:56:50 -0700 (MST) Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Message-ID: On Wed, 14 Jan 2009, Jaakko Sipari wrote: > Hi (again)! > > Could someone clarify what these methods actually do and are they even > implemented? Do I get into trouble with buffer values of 0 (if I want to > handle the buffers myself)? > rxtx does not have buffers. It was not clear to me at the time why there would be a buffer when java already provides buffered input and output streams that can sit on top of rxtx. One reason I can see for implementing buffers in rxtx is to get data off the port so select() can block. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Wed Jan 14 23:23:08 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 15 Jan 2009 08:23:08 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> Message-ID: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Here's the same message for the list also. Forgot to do "Reply to all" ---------- Forwarded message ---------- From: Jaakko Sipari Date: Thu, Jan 15, 2009 at 8:22 AM Subject: Re: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize To: Trent Jarvi On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! >> >> Could someone clarify what these methods actually do and are they even >> implemented? Do I get into trouble with buffer values of 0 (if I want to >> handle the buffers myself)? >> >> > rxtx does not have buffers. It was not clear to me at the time why there > would be a buffer when java already provides buffered input and output > streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data off > the port so select() can block. > So basically those methods have currently no effect at all? - Jaakko -- Jaakko Sipari tel. +358451238191 eMail. jaakko.sipari at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090115/8b4c47c0/attachment-0019.html From tjarvi at qbang.org Thu Jan 15 18:37:12 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 15 Jan 2009 18:37:12 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: On Thu, 15 Jan 2009, Jaakko Sipari wrote: > Here's the same message for the list also. Forgot to do "Reply to all" > > ---------- Forwarded message ---------- > From: Jaakko Sipari > Date: Thu, Jan 15, 2009 at 8:22 AM > Subject: Re: [Rxtx] The functionality behind setInputBufferSize & > setOutputBufferSize > To: Trent Jarvi > > > On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! > > Could someone clarify what these methods actually do > and are they even > implemented? Do I get into trouble with buffer > values of 0 (if I want to > handle the buffers myself)? > > > rxtx does not have buffers. ?It was not clear to me at the time why > there would be a buffer when java already provides buffered input and > output streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data > off the port so select() can block. > > > So basically those methods have currently no effect at all? > Correct. You can use BufferedInputStream and BufferedOutputStream from the Java API once you get the Input/OutputStream from rxtx. But changing the input and output buffer size in rxtx is not going to change behavior. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Fri Jan 16 01:22:37 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Fri, 16 Jan 2009 10:22:37 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> > So basically those methods have currently no effect at all? >> >> > Correct. You can use BufferedInputStream and BufferedOutputStream from the > Java API once you get the Input/OutputStream from rxtx. But changing the > input and output buffer size in rxtx is not going to change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > I assume there still is some kind of buffer in rxtx (or the serial port driver) in case of processing delays. I mean, if the serial port gives data faster than can be read from the Java program using rxtx it isn't just thrown away, right? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090116/3bd9a52e/attachment-0018.html From tjarvi at qbang.org Fri Jan 16 05:17:24 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 16 Jan 2009 05:17:24 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> Message-ID: On Fri, 16 Jan 2009, Jaakko Sipari wrote: > > So basically those methods have currently no effect > at all? > > > Correct. ?You can use BufferedInputStream and BufferedOutputStream > from the Java API once you get the Input/OutputStream from rxtx. ?But > changing the input and output buffer size in rxtx is not going to > change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > > > > I assume there still is some kind of buffer in rxtx (or the serial port > driver) in case of processing delays. I mean, if the serial port gives data > faster than can be read from the Java program using rxtx it isn't just > thrown away, right? > The UART can usually hold a few bytes. The kernel driver can buffer the input. In practice, it works. With Sun commapi, the typical application has 4 buffers between the user and the incomming data. With rxtx, it is 3. BufferedInputStream -> commapi/rxtx -> kernel driver -> UART If you really do run into overflows on the UART, then hardware flow control is what you should be using and tinkering with rxtx to avoid it is not a very sound approach. -- Trent Jarvi tjarvi at qbang.org From llowrey at nuclearwinter.com Sun Jan 18 12:49:39 2009 From: llowrey at nuclearwinter.com (Larkin Lowrey) Date: Sun, 18 Jan 2009 13:49:39 -0600 Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain Message-ID: <497387D3.9040201@nuclearwinter.com> After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when running code that uses RXTXComm. The crashes only occur when using 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. As far as I can tell, the crash happens immediately on start. I can't see any evidence of much, if anything, happening before the crash. The code used to work and only stopped working after the "upgrade" to FC10. I have tried RXTX v2.1 and 2.2pre1. Any ideas? Here's the error: # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode linux-amd64) # Problematic frame: # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 --Larkin From tjarvi at qbang.org Mon Jan 19 17:48:34 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 19 Jan 2009 17:48:34 -0700 (MST) Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain In-Reply-To: <497387D3.9040201@nuclearwinter.com> References: <497387D3.9040201@nuclearwinter.com> Message-ID: On Sun, 18 Jan 2009, Larkin Lowrey wrote: > After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when > running code that uses RXTXComm. The crashes only occur when using > 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. > > As far as I can tell, the crash happens immediately on start. I can't > see any evidence of much, if anything, happening before the crash. > > The code used to work and only stopped working after the "upgrade" to > FC10. I have tried RXTX v2.1 and 2.2pre1. > > Any ideas? > > Here's the error: > > # > # An unexpected error has been detected by Java Runtime Environment: > # > # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 > # > # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode > linux-amd64) > # Problematic frame: > # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 > > > --Larkin Hi Larkin, I can think of 2 segv's in rxtx that may apply. Both are fixed in rxtx 2.2pre.. The first was that pointers required by nativeDrain needed to be stored in something larger than a 32 bit integer in java. This resulted in a crash like you see the first time the 'nativedrain' thread tried to use the pointer. The second was a concurrency issue George resolved with synchronization. The crash was usually during close but happened in the 'nativedrain' thread. (eventLoop) As mentioned, these are both fixed in the prerelease. There is a class provided in recent versions of RXTX that allow you confirm the version being used: gnu.io.RXTXVersion with member methods getVersion() and nativeGetVersion(). This allows you to confirm that you are indeed using the version you think you are. -- Trent Jarvi tjarvi at qbang.org From alexandrepoletto at gmail.com Wed Jan 21 11:48:07 2009 From: alexandrepoletto at gmail.com (Alexandre Poletto) Date: Wed, 21 Jan 2009 16:48:07 -0200 Subject: [Rxtx] work in windows but dont work in linux Message-ID: hi folks, I have an application to communicate with the serial port using rxtx, in the windows os my application works well, but when i try to run in the linux os i open the port (in windows "COM1", in Linux "/dev/ttyS0") send my commandes but i never receive any answer. I'm using ubuntu 8.10 and java 1.5, there is any configuration in that i'm missing? Thanks for the help! ps: Sorry form my bad english :( -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/70baea51/attachment-0012.html From jmudd at dtiweb.net Wed Jan 21 14:08:04 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Wed, 21 Jan 2009 16:08:04 -0500 Subject: [Rxtx] Hot unplugging of a USB device Message-ID: Looking to see if the issues surrounding an uplugging of a USB device have been resolved. I see from the mail list archives and bug reports that others have noted this issue. I have a USB GPS Receiver that is plugged into a Windows (XP) system and am using Netbeans 6.5 and Java jdk 1.6 and RXTX 2.1.7 and 2.2pre1. In the thread that is reading data via listening for a SerialEvent I can capture a Java IOException: No error in readArray. The application is essentially hung at this point. Only a termination of the application will clear it up and not leave the port hung. I had read in the archives that this is because the event loop in the native code portion is continually putting out the exceptions. I had also seen that this might be addressed in future releases. Any help is appreciated. Thanks, Jerry ________________________________ Jerry Mudd Senior Programmer 21795 Shangri-La Drive, Ste C Lexington Park, MD 20653 (301) 737-8893 (301) 737-8897 Fax jmudd at dtiweb.net www.dtiweb.net This message may contain sensitive, proprietary and/or privileged information. Disclosure is not authorized unless provided in writing by Defense Technologies, Inc. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0012.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 6296 bytes Desc: image001.gif Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0012.gif From netbeans at gatworks.com Wed Jan 21 17:33:46 2009 From: netbeans at gatworks.com (U. George) Date: Wed, 21 Jan 2009 19:33:46 -0500 Subject: [Rxtx] Hot unplugging of a USB device In-Reply-To: References: Message-ID: <4977BEEA.4020708@gatworks.com> > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:34 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:34 +1100 Subject: [Rxtx] Part 1 of 2 parts re rxtx 2.2 pre.. and OSX Message-ID: Hi, I have tried out the latest version of rxtx on a mac and can report that running with ImageJ (32 bit ) all seems to be fine. However when I attempt to use it with ImageJ64, I get a crash whenever the serial port is used. The details follow. What I did. Ran our plug-in in ImageJ 64 bit (1.42g) for Measuring, which is using the latest rxtx (the beta 2.2 compiled on 30 December 2008) for MacOSX 10.5.x) I installed this by putting the two files in the directory ~ LIBRARY/JAVA/EXTENSIONS. The Plug-in uses the serial port. The window we put up to show the numbers from the stage appeared, but only with the default "0" (zero) in each row, which is what we put there until we get data back from the port and the device attached. Then it crashed. I should point out that this all works fine using ImageJ (32 bit) 1.42g, on the same platform. So the only difference is the use of ImageJ 64 bit, and I guess the version of rxtx for 64 bit. I hope that cleverer people than me can throw some light onto this little problem. ImageJ64 seems to work ok until rxtx is called, although I haven't tried much so far, just some 3D rendering with 1 Gb of image data, which all went well, apart from the fact that the data was marginal. I am now showing the data supplied by the report to Apple window. This has three tabs, one to write your information in, one called Problem Details, and the third called SYSTEM CONFIG. These are pasted in below. Best wishes Noel Problem Details Process: JavaApplicationStub [463] Path: /Applications/ImageJ/ImageJ64.app/Contents/MacOS/JavaApplicationStub Identifier: gov.nih.info.rsb.ImageJ Version: ??? (10.2) Code Type: X86-64 (Native) Parent Process: launchd [398] Date/Time: 2009-01-19 10:48:09.342 +1100 OS Version: Mac OS X 10.5.6 (9G55) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000000029507c8 Crashed Thread: 16 Application Specific Information: Java information: Exception type: Bus Error (0xa) at pc=0x00000006ff70f418 Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0_07-b06-57 mixed mode macosx-amd64) Current thread (0x00000001020de800): JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] Stack: [0x0000000702851000,0x0000000702951000] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j gnu.io.RXTXPort.readByte()I+0 j gnu.io.RXTXPort$SerialInputStream.read()I+81 j SerialConnection.serialEvent(Lgnu/io/SerialPortEvent;)V+41 j gnu.io.RXTXPort.sendEvent(IZ)Z+382 v ~BufferBlob::StubRoutines (1) j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~BufferBlob::StubRoutines (1) Java Threads: ( => current thread ) =>0x00000001020de800 JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] 0x00000001020e8800 JavaThread "Measure XYZ" [_thread_blocked, id=44384256, stack(0x0000000702954000,0x0000000702a54000)] 0x0000000102001000 JavaThread "DestroyJavaVM" [_thread_blocked, id=25169920, stack(0x0000000101001000,0x0000000101801000)] 0x00000001020da800 JavaThread "SocketListener" [_thread_in_native, id=29671424, stack(0x0000000701b4c000,0x0000000701c4c000)] 0x00000001020b4800 JavaThread "AWT-EventQueue-0" [_thread_in_Java, id=-27992064, stack(0x00000006fe44e000,0x00000006fe54e000)] 0x0000000102096000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=-34344960, stack(0x00000006fde3f000,0x00000006fdf3f000)] 0x0000000102078000 JavaThread "AWT-Shutdown" [_thread_blocked, id=-58392576, stack(0x00000006fc750000,0x00000006fc850000)] 0x0000000102077800 JavaThread "AWT-AppKit" daemon [_thread_in_native, id=1886770976, stack(0x00007fff5f400000,0x00007fff5fc00000)] 0x0000000102044800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=-333877248, stack(0x00000006ec097000,0x00000006ec197000)] 0x0000000102043000 JavaThread "CompilerThread1" daemon [_thread_blocked, id=-334938112, stack(0x00000006ebf94000,0x00000006ec094000)] 0x0000000102041800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=-335998976, stack(0x00000006ebe91000,0x00000006ebf91000)] 0x0000000102041000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=-337059840, stack(0x00000006ebd8e000,0x00000006ebe8e000)] 0x0000000102029800 JavaThread "Finalizer" daemon [_thread_blocked, id=-338214912, stack(0x00000006ebc74000,0x00000006ebd74000)] 0x0000000102028800 JavaThread "Reference Handler" daemon [_thread_blocked, id=-339333120, stack(0x00000006ebb63000,0x00000006ebc63000)] Other Threads: 0x0000000102020800 VMThread [stack: 0x00000006eba60000,0x00000006ebb60000] [id=-340393984] 0x0000000102046000 WatcherThread [stack: 0x00000006ec19a000,0x00000006ec29a000] [id=-332816384] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 76480K, used 14448K [0x0000000105800000, 0x000000010ad50000, 0x00000002f9800000) eden space 65600K, 22% used [0x0000000105800000, 0x000000010661c398, 0x0000000109810000) from space 10880K, 0% used [0x0000000109810000, 0x0000000109810000, 0x000000010a2b0000) to space 10880K, 0% used [0x000000010a2b0000, 0x000000010a2b0000, 0x000000010ad50000) tenured generation total 174784K, used 0K [0x00000002f9800000, 0x00000003042b0000, 0x00000006e1800000) the space 174784K, 0% used [0x00000002f9800000, 0x00000002f9800000, 0x00000002f9800200, 0x00000003042b0000) compacting perm gen total 21248K, used 10319K [0x00000006e1800000, 0x00000006e2cc0000, 0x00000006e6c00000) the space 21248K, 48% used [0x00000006e1800000, 0x00000006e2213d28, 0x00000006e2213e00, 0x00000006e2cc0000) No shared spaces configured. Virtual Machine Arguments: JVM Args: -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher. framework/Resources/LauncherSupport.jar -Xms256m -Xmx24000m -Dcom.apple.macos.useScreenMenuBar=false -Dcom.apple.mrj.application.growbox.intrudes=false -Dcom.apple.mrj.application.live-resize=true -Dcom.apple.hwaccel=false -Dapple.awt.Antialiasing=false -Dcom.apple.smallTabs=true -Dapple.awt.brushMetalLook=false Java Command: Launcher Type: generic Physical Memory: Page Size = 4k, Total = 2048M, Free = 30996M Thread 0: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 com.apple.CoreFoundation 0x00007fff8204dc4f CFRunLoopRunSpecific + 1631 3 com.apple.HIToolbox 0x00007fff839fdda2 RunCurrentEventLoopInMode + 278 4 com.apple.HIToolbox 0x00007fff839fdbd8 ReceiveNextEventCommon + 322 5 com.apple.HIToolbox 0x00007fff839fda83 BlockUntilNextEventMatchingListInMode + 79 6 com.apple.AppKit 0x00007fff8299d3b0 _DPSNextEvent + 603 7 com.apple.AppKit 0x00007fff8299ccf1 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 136 8 com.apple.AppKit 0x00007fff82996a84 -[NSApplication run] + 455 9 libawt.jnilib 0x00000006ec433257 +[AWTStarter startAWT:] + 1343 10 libawt.jnilib 0x00000006ec432c46 -[CPerformer perform] + 112 11 com.apple.Foundation 0x00007fff8153f2b4 __NSThreadPerformPerform + 148 12 com.apple.CoreFoundation 0x00007fff8204e0e8 CFRunLoopRunSpecific + 2808 13 ...ple.JavaApplicationLauncher 0x0000000100005165 startupJava(LauncherArgsStruct*) + 235 14 ...ple.JavaApplicationLauncher 0x000000010000579c launchJavaApplication + 1224 15 JavaApplicationStub 0x0000000100000b9c 0x100000000 + 2972 Thread 1: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x0000000101a93b61 JVM_GetCPFieldModifiers + 128961 5 libjvm.dylib 0x0000000101a93a36 JVM_GetCPFieldModifiers + 128662 6 ...ple.JavaApplicationLauncher 0x000000010000c0ce startJavaApplication + 2886 7 ...ple.JavaApplicationLauncher 0x000000010000506d java_main_stub(void*) + 9 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 2: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libSystem.B.dylib 0x00007fff840db0b0 mach_msg_server + 436 3 libjvm.dylib 0x000000010181176d JNI_CreateJavaVM_Impl + 53277 4 libjvm.dylib 0x0000000101811375 JNI_CreateJavaVM_Impl + 52261 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 3: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x00000001018e452f JVM_Lseek + 235727 5 libjvm.dylib 0x00000001018e42df JVM_Lseek + 235135 6 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 7 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 8 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 4: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x00000001028003ea 0 + 4336911338 11 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 12 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 13 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 14 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 15 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 16 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 17 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 18 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 19 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 20 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 5: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 6: 0 libSystem.B.dylib 0x00007fff8406dd72 semaphore_wait_trap + 10 1 libjvm.dylib 0x0000000101915bdb JVM_IsPrimitiveClass + 12139 2 libjvm.dylib 0x00000001019155b5 JVM_IsPrimitiveClass + 10565 3 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 4 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 7: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 8: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 9: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x0000000101918ec8 JVM_IsPrimitiveClass + 25176 5 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 6 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 7 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 10: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x000000010191abb5 JVM_IsPrimitiveClass + 32581 4 libjvm.dylib 0x000000010191a70a JVM_IsPrimitiveClass + 31386 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 11: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 12: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x0000000102803414 0 + 4336923668 12 ??? 0x00000001028003ea 0 + 4336911338 13 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 14 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 15 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 16 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 17 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 18 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 19 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 20 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 21 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 22 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 13: 0 ??? 0x0000000102817034 0 + 4337004596 1 ??? 0x000000010280304e 0 + 4336922702 2 ??? 0x0000000102803093 0 + 4336922771 3 ??? 0x000000010280356d 0 + 4336924013 4 ??? 0x0000000102803093 0 + 4336922771 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x000000010280356d 0 + 4336924013 8 ??? 0x0000000102803093 0 + 4336922771 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x0000000102802f3a 0 + 4336922426 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102802f3a 0 + 4336922426 14 ??? 0x0000000102802f3a 0 + 4336922426 15 ??? 0x0000000102803162 0 + 4336922978 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102802f3a 0 + 4336922426 19 ??? 0x0000000102802f3a 0 + 4336922426 20 ??? 0x00000001028003ea 0 + 4336911338 21 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 22 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 23 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 24 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 25 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 26 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 27 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 28 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 29 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 30 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 14: 0 libSystem.B.dylib 0x00007fff840f210e accept + 10 1 libnet.jnilib 0x00000006ff6b6b11 Java_java_net_PlainSocketImpl_socketAccept + 277 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x0000000102802f3a 0 + 4336922426 4 ??? 0x0000000102802f3a 0 + 4336922426 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x0000000102803414 0 + 4336923668 8 ??? 0x00000001028003ea 0 + 4336911338 9 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 10 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 11 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 12 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 13 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 14 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 15 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 16 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 17 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 18 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 15: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x000000010280304e 0 + 4336922702 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102803414 0 + 4336923668 14 ??? 0x0000000102803093 0 + 4336922771 15 ??? 0x0000000102803093 0 + 4336922771 16 ??? 0x0000000102803093 0 + 4336922771 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102803414 0 + 4336923668 19 ??? 0x00000001028003ea 0 + 4336911338 20 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 21 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 22 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 23 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 24 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 25 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 26 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 27 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 28 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 29 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 Crashed: 0 librxtxSerial.jnilib 0x00000006ff70f418 read_byte_array + 68 1 librxtxSerial.jnilib 0x00000006ff70f9b3 Java_gnu_io_RXTXPort_readByte + 93 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x000000010280304e 0 + 4336922702 4 ??? 0x000000010280304e 0 + 4336922702 5 ??? 0x0000000102803414 0 + 4336923668 6 ??? 0x00000001028003ea 0 + 4336911338 7 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 8 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 9 libjvm.dylib 0x00000001018e5be8 JVM_Lseek + 241544 10 libjvm.dylib 0x0000000101900b11 JVM_MonitorWait + 17249 11 libjvm.dylib 0x0000000101a1e59e JVM_DisableCompiler + 1166 12 librxtxSerial.jnilib 0x00000006ff70d91e send_event + 132 13 librxtxSerial.jnilib 0x00000006ff70e82b report_serial_events + 92 14 librxtxSerial.jnilib 0x00000006ff7108c9 Java_gnu_io_RXTXPort_eventLoop + 237 15 ??? 0x000000010280e878 0 + 4336969848 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x00000001028003ea 0 + 4336911338 18 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 19 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 20 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 21 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 22 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 23 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 24 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 25 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 26 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 27 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 17: 0 libSystem.B.dylib 0x00007fff84074d02 __semwait_signal + 10 1 libSystem.B.dylib 0x00007fff840dce91 usleep + 57 2 librxtxSerial.jnilib 0x00000006ff70d729 drain_loop + 45 3 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 4 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 crashed with X86 Thread State (64-bit): rax: 0x00000000029507c0 rbx: 0x0000000000000041 rcx: 0x0000000000000065 rdx: 0x0000000000000002 rdi: 0x00000006ff71205e rsi: 0x00000006ff711c67 rbp: 0x0000000702950000 rsp: 0x000000070294fef0 r8: 0x000000000000004d r9: 0x00000006e21d64c0 r10: 0x00000006e21d38e8 r11: 0x00000000000000d2 r12: 0x00000001020de998 r13: 0x00000006e21d93b0 r14: 0x0000000000000032 r15: 0x00000000029507c0 rip: 0x00000006ff70f418 rfl: 0x0000000000010202 cr2: 0x00000000029507c8 Continued in the message part 2 -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:41 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:41 +1100 Subject: [Rxtx] Part 2 re rxtx 2.2 pre... and MacOSX Message-ID: Continued from Part 1. Binary Images: 0x100000000 - 0x100000fff JavaApplicationStub ??? (???) /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationS tub 0x100004000 - 0x100011fff com.apple.JavaApplicationLauncher 12.2.0 (12.2.0) /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/JavaApplicationLauncher 0x10001a000 - 0x100022ffd com.apple.JavaVM 12.2.0 (12.2.0) <2b178e8d4bbcc0aa427c2f3f71bb2fcb> /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM 0x100055000 - 0x10005dff0 libverify.dylib ??? (???) <56eac95084cb86cd1339a721b1353182> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libveri fy.dylib 0x100063000 - 0x10006cffb JavaNativeFoundation ??? (???) <68ca6409dc49542301edda1e0744ac69> /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNative Foundation.framework/Versions/A/JavaNativeFoundation 0x1000a8000 - 0x1000c7fef libjava.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjava .jnilib 0x1000d8000 - 0x1000e5ffb libzip.jnilib ??? (???) <5b6dce7c9a1f25aa5dff1a633c9dc342> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libzip. jnilib 0x101803000 - 0x101eafff3 libjvm.dylib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bundle/Libra ries/libjvm.dylib 0x6ec2c5000 - 0x6ec2c6fff liblauncher.jnilib ??? (???) <567fa54a222b965b2c4aefea21d9800a> /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/Resources/liblauncher.jnilib 0x6ec431000 - 0x6ec5e4fff libawt.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libawt. jnilib 0x6fdc3b000 - 0x6fdc3cfff ATSHI.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/Resources/ATSHI.dylib 0x6fdd6e000 - 0x6fdd6efff libcmm.jnilib ??? (???) <114e1a620a6920d77bf09bd57a7f7d52> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libcmm. jnilib 0x6fdd9e000 - 0x6fde1fff7 libfontmanager.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libfont manager.jnilib 0x6fdf41000 - 0x6fdf8ffff libsuncmm.jnilib ??? (???) <47330f1f17822de3a5cf921e07615cf7> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libsunc mm.jnilib 0x6fdf95000 - 0x6fdfc4ff7 libjpeg.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjpeg .jnilib 0x6ff6ae000 - 0x6ff6baffb libnet.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnet. jnilib 0x6ff6c0000 - 0x6ff6c4fff libnio.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnio. jnilib 0x6ff6d4000 - 0x6ff6e8ff7 libdcpr.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libdcpr .jnilib 0x6ff70c000 - 0x6ff713fff +librxtxSerial.jnilib ??? (???) <5133deacebd01ceab7d528c541241956> /Library/Java/Extensions/librxtxSerial.jnilib 0x6ff734000 - 0x6ff74bfef libJapaneseConverter.dylib ??? (???) <64cca6bb4650a269f49a8427507e4963> /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib 0x70204f000 - 0x702218fef com.apple.RawCamera.bundle 2.0.10 (2.0.10) /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera 0x7fff5fc00000 - 0x7fff5fc2e643 dyld 97.1 (???) /usr/lib/dyld 0x7fff80003000 - 0x7fff80146ffb com.apple.audio.toolbox.AudioToolbox 1.5.2 (1.5.2) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x7fff801d2000 - 0x7fff801d5ffb com.apple.help 1.1 (36) <9000c05ccad96fdcc25bc35264abf587> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.frame work/Versions/A/Help 0x7fff801d6000 - 0x7fff80211fff com.apple.AE 402.2 (402.2) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.f ramework/Versions/A/AE 0x7fff80212000 - 0x7fff80257fef libRIP.A.dylib ??? (???) <8c818d7fd3dc57839ac48caf107ff4c0> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x7fff80258000 - 0x7fff8029bfef com.apple.QD 3.11.54 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/QD.framework/Versions/A/QD 0x7fff8029c000 - 0x7fff802dffef libTIFF.dylib ??? (???) <86be7909f46cc044a887cbb60ab7826d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x7fff802e0000 - 0x7fff803d4fff libobjc.A.dylib ??? (???) <118dc1ae05e685ad64290352fc94f1f0> /usr/lib/libobjc.A.dylib 0x7fff803d5000 - 0x7fff8045dfe7 libsqlite3.0.dylib ??? (???) <3c7ab3523b816dbd3e039ee7e6e2c580> /usr/lib/libsqlite3.0.dylib 0x7fff8045e000 - 0x7fff80466ffa libbsm.dylib ??? (???) <4d838c0d8a74fe61c781a53a8723303d> /usr/lib/libbsm.dylib 0x7fff80467000 - 0x7fff80497fff com.apple.shortcut 1 (1.0) <9822328df9321a661af3afcc841e8f80> /System/Library/PrivateFrameworks/Shortcut.framework/Versions/A/Shortcut 0x7fff80498000 - 0x7fff8049bfff com.apple.securityhi 3.0 (30817) <00ddd6e60692b62b7649573eab8aef5a> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI .framework/Versions/A/SecurityHI 0x7fff8049c000 - 0x7fff8049efff com.apple.print.framework.Print 218.0.2 (220.1) <2b847a0a1cd885f596a4d10409d50ba3> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.fram ework/Versions/A/Print 0x7fff8049f000 - 0x7fff805dbfe9 com.apple.ImageIO.framework 2.0.4 (2.0.4) <47dcdc0b5986b2c157e0b6dae48ce464> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/ImageIO 0x7fff805dc000 - 0x7fff805f9fef com.apple.CoreVideo 1.5.1 (1.5.1) <78253b3fe8d3dcc90f159d7ed866c295> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x7fff805fa000 - 0x7fff8068bfff com.apple.SearchKit 1.2.1 (1.2.1) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Sear chKit.framework/Versions/A/SearchKit 0x7fff8068c000 - 0x7fff80e49fef libBLAS.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libBLAS.dylib 0x7fff80e4a000 - 0x7fff81416fff com.apple.CoreGraphics 1.407.2 (???) <436dbc70f8c9b29b3beb1d2de220acf2> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/CoreGraphics 0x7fff81417000 - 0x7fff8141dfff com.apple.DiskArbitration 2.2.1 (2.2.1) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitrat ion 0x7fff8141e000 - 0x7fff8145bff7 com.apple.SystemConfiguration 1.9.2 (1.9.2) <150119d0cecb0c80f6736b9881c2411e> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemCo nfiguration 0x7fff8145c000 - 0x7fff81523fec com.apple.CFNetwork 422.11 (422.11) <570ca46de3b907cb1c8e33fc62f562b4> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNe twork.framework/Versions/A/CFNetwork 0x7fff81524000 - 0x7fff8152dfff libCGATS.A.dylib ??? (???) <722a0bbd58740d46739008e881010631> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib 0x7fff8152e000 - 0x7fff81533fff com.apple.CommonPanels 1.2.4 (85) <2cec1ecc95cf1ecea8bea030975a46b8> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPane ls.framework/Versions/A/CommonPanels 0x7fff81534000 - 0x7fff817cffe3 com.apple.Foundation 6.5.7 (677.22) <8134977fcc57198a53dc494b60592980> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x7fff817d0000 - 0x7fff817d0ffd com.apple.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x7fff817d1000 - 0x7fff81cf1fc6 libGLProgrammability.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgra mmability.dylib 0x7fff81cf2000 - 0x7fff81cf4fff com.apple.NavigationServices 3.5.2 (163) <7cb7f3fe7f9d56ec89ef28a6d3a1da7d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Navigation Services.framework/Versions/A/NavigationServices 0x7fff81cf5000 - 0x7fff81d32fe7 com.apple.coreui 1.2 (62) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x7fff81d33000 - 0x7fff81d33fff com.apple.Carbon 136 (136) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x7fff81d34000 - 0x7fff81d42fff libCSync.A.dylib ??? (???) <61f6cc104b3e9b77cd583635a3a9a5cf> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x7fff81d43000 - 0x7fff81d45ff9 libRadiance.dylib ??? (???) <6d9f2235e8f70a7aedfc59383a7548d8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x7fff81d46000 - 0x7fff81db5ff9 com.apple.print.framework.PrintCore 5.5.3 (245.3) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/PrintCore.framework/Versions/A/PrintCore 0x7fff81db6000 - 0x7fff81db6ff8 com.apple.ApplicationServices 34 (34) <81cd02cc2ccf4e47e51d03db860da556> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Applicat ionServices 0x7fff81db7000 - 0x7fff81dd8fff libresolv.9.dylib ??? (???) <38318f9fbcfbdb384e0f9b08cc0e757a> /usr/lib/libresolv.9.dylib 0x7fff81dd9000 - 0x7fff81e4ffef libvMisc.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvMisc.dylib 0x7fff81e50000 - 0x7fff81e52ff7 libffi.dylib ??? (???) <920bb19728451f35703bb95dc908c7ca> /usr/lib/libffi.dylib 0x7fff81e53000 - 0x7fff81eeefe7 com.apple.ink.framework 101.3 (86) <60c6579faf114ea9677fd9ae25389ed2> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framew ork/Versions/A/Ink 0x7fff81eef000 - 0x7fff81f0dfff libPng.dylib ??? (???) <4017eab74319a648dfd73b7d503e557d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x7fff81f0e000 - 0x7fff81f24ff9 com.apple.ImageCapture 5.0.1 (5.0.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCaptu re.framework/Versions/A/ImageCapture 0x7fff81f25000 - 0x7fff81f3dfff com.apple.DictionaryServices 1.0.0 (1.0.0) <78ea11e9a92120f76d69efa24b8d1f95> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Dict ionaryServices.framework/Versions/A/DictionaryServices 0x7fff81f3e000 - 0x7fff81f42fff libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib 0x7fff81f43000 - 0x7fff81fe3fe3 com.apple.ApplicationServices.ATS 3.4 (???) <47cf09bf78935889f17f1b6b09badf0d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/ATS 0x7fff81fe4000 - 0x7fff8211bfff com.apple.CoreFoundation 6.5.5 (476.17) <51930d43c7c2d8fb24148cbfc05bba0f> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundatio n 0x7fff8211c000 - 0x7fff82126fff com.apple.speech.recognition.framework 3.7.24 (3.7.24) <2399374b096b284345daba82e2cb833d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechReco gnition.framework/Versions/A/SpeechRecognition 0x7fff82127000 - 0x7fff82159ff7 libauto.dylib ??? (???) /usr/lib/libauto.dylib 0x7fff8215a000 - 0x7fff821cefe7 libstdc++.6.dylib ??? (???) <565ee6f798f7fef6f804c60682787280> /usr/lib/libstdc++.6.dylib 0x7fff821cf000 - 0x7fff8228dfff edu.mit.Kerberos 6.0.12 (6.0.12) /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x7fff8228e000 - 0x7fff8228effb com.apple.installserver.framework 1.0 (8) /System/Library/PrivateFrameworks/InstallServer.framework/Versions/A/Install Server 0x7fff8228f000 - 0x7fff82293fff libGIF.dylib ??? (???) <66436b84211fe0e723051eab15af0aca> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x7fff82294000 - 0x7fff8258ffe3 com.apple.CoreServices.CarbonCore 786.10 (786.10) <2ac701edf3ca98a86ae9d5f733200b40> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Carb onCore.framework/Versions/A/CarbonCore 0x7fff82590000 - 0x7fff825aafff libvDSP.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvDSP.dylib 0x7fff825ab000 - 0x7fff827b1ff3 com.apple.security 5.0.4 (34102) <47c559b17c1f51998e7a981d0fbec4c8> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x7fff827b2000 - 0x7fff827d9fff libxslt.1.dylib ??? (???) /usr/lib/libxslt.1.dylib 0x7fff827da000 - 0x7fff82948fff libicucore.A.dylib ??? (???) <374ddaf141bf88dba00ab9058f2dbad6> /usr/lib/libicucore.A.dylib 0x7fff82949000 - 0x7fff8295dff7 libGL.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x7fff8295e000 - 0x7fff83286fff com.apple.AppKit 6.5.6 (949.43) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x7fff83287000 - 0x7fff83667fef com.apple.QuartzCore 1.5.7 (1.5.7) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x7fff83668000 - 0x7fff836b8fe7 com.apple.Metadata 10.5.2 (398.25) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Meta data.framework/Versions/A/Metadata 0x7fff836b9000 - 0x7fff836baff3 com.apple.audio.units.AudioUnit 1.5 (1.5) /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x7fff836bb000 - 0x7fff83710fe3 com.apple.HIServices 1.7.0 (???) <6bef766448d67adb91901b432629ea0f> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/HIServices.framework/Versions/A/HIServices 0x7fff83711000 - 0x7fff83711ffd com.apple.Accelerate.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/vecLib 0x7fff83712000 - 0x7fff837a7ffb com.apple.LaunchServices 290.3 (290.3) <56544e16c5192d2ce72df772901fcaef> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Laun chServices.framework/Versions/A/LaunchServices 0x7fff837a8000 - 0x7fff8382ffef com.apple.audio.CoreAudio 3.1.1 (3.1.1) <9c1714647fd7515c900362ad2ac76874> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x7fff83830000 - 0x7fff83893fef libGLU.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dyli b 0x7fff83894000 - 0x7fff838a2ff9 com.apple.helpdata 1.0.1 (14.2) /System/Library/PrivateFrameworks/HelpData.framework/Versions/A/HelpData 0x7fff838a3000 - 0x7fff838afff1 libgcc_s.1.dylib ??? (???) <23fa31a628c1ea8a62ac529fa333b6e1> /usr/lib/libgcc_s.1.dylib 0x7fff838b0000 - 0x7fff838d2fff libJPEG.dylib ??? (???) <4257ab268996bbeb93b47946df181cdc> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x7fff838d3000 - 0x7fff838d3ffd com.apple.Accelerate 1.4.2 (Accelerate 1.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x7fff838d4000 - 0x7fff838d4ff8 com.apple.Cocoa 6.5 (???) <8c59f679ffbd9178134df1d83dedde28> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa 0x7fff838d5000 - 0x7fff839cafff libxml2.2.dylib ??? (???) <8226d1180354f493954c5fa1fc0e1154> /usr/lib/libxml2.2.dylib 0x7fff839cb000 - 0x7fff839dafe7 com.apple.opengl 1.5.9 (1.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x7fff839db000 - 0x7fff83cc2feb com.apple.HIToolbox 1.5.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. framework/Versions/A/HIToolbox 0x7fff83cc3000 - 0x7fff83d03fef com.apple.framework.IOKit 1.5.1 (???) <17e6707127a60c5e2d7a9bd2b7bf2db0> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x7fff83d04000 - 0x7fff83dc8fe2 com.apple.vImage 3.0 (3.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage .framework/Versions/A/vImage 0x7fff83dc9000 - 0x7fff83df3fff libcups.2.dylib ??? (???) /usr/lib/libcups.2.dylib 0x7fff83df4000 - 0x7fff83df4ffa com.apple.CoreServices 32 (32) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x7fff83df5000 - 0x7fff83ed6fff libcrypto.0.9.7.dylib ??? (???) <66f1f8773bd9fdfdcfd09e2b4b010636> /usr/lib/libcrypto.0.9.7.dylib 0x7fff83ed7000 - 0x7fff83f87fef com.apple.CoreServices.OSServices 226.5 (226.5) <1c38f727b3ad3293272db7323b37c735> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSSe rvices.framework/Versions/A/OSServices 0x7fff83f88000 - 0x7fff83fa2fff com.apple.openscripting 1.2.8 (???) <0674c4e3353c677c9f58df3297ae559b> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScript ing.framework/Versions/A/OpenScripting 0x7fff83fa3000 - 0x7fff83fdfff7 libGLImage.dylib ??? (???) <02258bcdbe8defdb254acc077a81dd9b> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage. dylib 0x7fff83fe0000 - 0x7fff83ff1fff com.apple.speech.synthesis.framework 3.7.1 (3.7.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x7fff83ff2000 - 0x7fff8406cff3 com.apple.CoreText 2.0.3 (???) <827bbfef670df72316719c25bfb39915> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreText.framework/Versions/A/CoreText 0x7fff8406d000 - 0x7fff841f8ffb libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0x7fff841f9000 - 0x7fff8420affd libz.1.dylib ??? (???) /usr/lib/libz.1.dylib 0x7fff8420b000 - 0x7fff842befef com.apple.DesktopServices 1.4.7 (1.4.7) /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/D esktopServicesPriv 0x7fff842bf000 - 0x7fff84677fff libLAPACK.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libLAPACK.dylib 0x7fff84678000 - 0x7fff84743fef com.apple.ColorSync 4.5.1 (4.5.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ColorSync.framework/Versions/A/ColorSync 0x7fff84744000 - 0x7fff84847feb com.apple.CoreData 100.1 (186) <074abc7f43f81f7885e4d0674a8be4bc> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x7fffffe00000 - 0x7fffffe01780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0xfffffffffffec000 - 0xfffffffffffeffff libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib SYSTEM CONFIG Model: MacPro3,1, BootROM MP31.006C.B05, 8 processors, Quad-Core Intel Xeon, 2.8 GHz, 32 GB Graphics: kHW_ATIrv630Item, ATI Radeon HD 2600, spdisplays_pcie_device, 256 MB Memory Module: DIMM Riser B/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Bluetooth: Version 2.1.3f8, 2 service, 1 devices, 1 incoming serial ports Network Service: Ethernet 2, Ethernet, en1 PCI Card: ATI Radeon HD 2600, display, Slot-1 Serial ATA Device: WDC WD3200AAJS-41VWA0, 298.09 GB Parallel ATA Device: PIONEER DVD-RW DVR-112D USB Device: Keyboard Hub, (null) mA USB Device: Apple Optical USB Mouse, (null) mA USB Device: Apple Keyboard, (null) mA USB Device: hub_device, (null) mA USB Device: Apple Cinema HD Display, (null) mA USB Device: Keyspan USA-28Xb, (null) mA USB Device: Bluetooth USB Host Controller, (null) mA FireWire Device: built-in_hub, unknown_value, unknown_speed FireWire Device: My Book, WD, 800mbit_speed FireWire Device: unknown_device, unknown_value, unknown_speed -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From jaakko.sipari at gmail.com Thu Jan 22 03:00:03 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 22 Jan 2009 12:00:03 +0200 Subject: [Rxtx] RXTX compilation with GCJ possible? Message-ID: <901f25b80901220200s53792317o374b80cbb6066a52@mail.gmail.com> Hi! Does anyone have experience on using RXTX in a GCJ compiled Java application? I'm interested whether this is possible in Windows and/or in Linux platforms. And of course what does it take to get it work, or does it just work out of the box. Ultimately my aim here would be to move to a more time deterministic system by utilizing GCJ, jRate & Javolution and possibly run the RXTX (and other important) threads at a priority higher than the garbage collector. This of course would require some modification for the RXTX threads to run in a Javolution pool context or non allocating real time contexts so they wouldn't produce any garbage, but that's something to hack on later. For now I'd just like to know if there are any obstacles on the road to compiling & running RXTX with GCJ. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/5592681a/attachment-0012.html From jmudd at dtiweb.net Thu Jan 22 06:21:03 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Thu, 22 Jan 2009 08:21:03 -0500 Subject: [Rxtx] Hot unplugging of a USB device References: <4977BEEA.4020708@gatworks.com> Message-ID: U. George, Thanks for the information. How did you resolve your USB/GPS device on Linux? My application has to run on both Linux and Windows eventually. Thanks, Jerry -----Original Message----- From: U. George [mailto:netbeans at gatworks.com] Sent: Wednesday, January 21, 2009 7:34 PM To: Jerry Mudd Cc: rxtx at qbang.org Subject: Re: [Rxtx] Hot unplugging of a USB device > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From m.kirkland at comcast.net Thu Jan 22 09:21:01 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Thu, 22 Jan 2009 08:21:01 -0800 Subject: [Rxtx] Serial port control lines change with call to getPortIdentifiers() on Linux Message-ID: <94443DEFFD574B6CA8DDB2B201D9E007@bengal.net> Hi All ! I have noticed an issue with RXTX on Ubuntu Linux 8.10 that has prevented me from being able to use RXTX on Linux. I have noticed this issue on both the rxtx 2.1.7 and the new rxtx2.2pre1. When I execute the following line to get the ports on a system - java.util.Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); Both DTR and RTS become active on ttyS0 and only ttyS0, not ttyS1 (I only have 2 ports). I see this prior to opening any ports or making any other calls to RXTX. I have stepped it though with the debugger and I am sure this is the trigger. My application uses these control lines to perform functions other then the standard flow control so it is critical that I be able to control them exactly. I would also think that folks using RXTX for more standard serial IO would also have issues with devices starting to talk before a listener was ready. I checked Windows XP and I do not see this issue (but I only have a com1 on the Windows computer). I also noticed that the DTR line blips when setting up a port on 2.2.pre1 like it does on 2.1.7r2. This it the same issue that the folks at http://www.codeskin.com/ patched. I see this issue on both Linux and Windows XP. Any help or clues would be greatly appreciated. If I can provide any additional info or do any testing I would be glad to help out to get version 2.2 in top shape for release. BTW I have written a simple dynamic loader to load the RXTX jar and native code that is drive by the os.name and os.arch system properties. I would be more then happy to contribute this to the project if folks though it would be useful. Its more convenient then having to manage copying the files around to various JVM's. TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/eab26bae/attachment-0011.html From josefk_5 at yahoo.com Fri Jan 23 09:44:06 2009 From: josefk_5 at yahoo.com (Josef Kahsay) Date: Fri, 23 Jan 2009 08:44:06 -0800 (PST) Subject: [Rxtx] Help on Accessing RS232 Message-ID: <509617.88308.qm@web38205.mail.mud.yahoo.com> Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS From m.kirkland at comcast.net Sat Jan 24 01:28:52 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Sat, 24 Jan 2009 00:28:52 -0800 Subject: [Rxtx] Help on Accessing RS232 In-Reply-To: <509617.88308.qm@web38205.mail.mud.yahoo.com> References: <509617.88308.qm@web38205.mail.mud.yahoo.com> Message-ID: <665887C02E1446708CE392FE0BD73D79@bengal.net> It seems to me that you are having a classic java classpath issue. Java classpath issues can be annoying to solve sometimes. As some random guesses I would suggest you look at the following. 1 - You might not be running the JVM from the location that you think you are (gets me all the time). I which Windows had a which command. 2 - You don't mention what development environment you are using like Eclipse etc., and if you are trying to run the demo from inside the development environment. If so, do whatever is appropriate for the development environment to control the classpath. In Eclipse this would involve adding a "User Library" to point to the jar and native code. 3 - Once you get the classpath ok, the next thing you might run into is not being able to load the native library. 4 - I have found that on XP I can place the RXTX jar and native library in the same directory as my application's jar file (and a class-path entry in the application's jar file manifest) and it all works. 5 - If you need more control of managing different versions of RXTX for different OS platforms, I have a dynamic RXTX loader I can send you (but I recommend getting the simple case working first). Let me know if this helps. Mike -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Josef Kahsay Sent: Friday, January 23, 2009 8:44 AM To: rxtx at qbang.org Subject: [Rxtx] Help on Accessing RS232 Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jacomoman at hotmail.com Mon Jan 26 12:12:27 2009 From: jacomoman at hotmail.com (Joseph Schmoley) Date: Mon, 26 Jan 2009 11:12:27 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: Message-ID: Hi All, First, let me thank you all for your effort on this excellent project. I've been using the Win32 binaries in the 2.1-7r2 package without any problems on WinXP Pro (32-bit). I then tried the .jnilib of the same version on my Mac OSX 10.5 64-bit darwin and got the familiar UnsatisfiedLinkError problem. I read up on all the mailing list archive messages and found this one (http://mailman.qbang.org/pipermail/rxtx/2008-May/2436699.html) suggesting that perhaps rxtx-devel from CVS would have a fix. So I got latest rxtx-devel + commapi-0-0-1 as suggested by the CVS page at rxtx.org. I even set my CFLAGS and LDFLAGS to include "-arch x86_64 -arch ppc64", but as it turned out, the latest configure script didn't need it. In any case, I configured and built rxtx-devel with no errors (that I could see) and transferred the resulting i386-apple-darwin9.6.0/librxtxSerial.jnilib to where my java.library.path is pointing to and ran my test class. Whereas before I was getting UnsatisfiedLinkError, I now simply get this: Invalid memory access of location 22d927c8 rip=22356420 Invalid memory access of location 22d9292c rip=22357540 [error occurred during error reporting (null), id 0xa] ./run-class.sh: line 10: 15647 Segmentation fault java -Djava.library.path=./lib/native -Dapp.logging.file.path=./log/runtime.log -classpath .:${MYCP} ${CLASSNAME} "${CMD}" run-class.sh is simply a script I've got to run my test class and all that class does is invoke the RXTX API, first one being: CommPortIdentifier.getPortIdentifiers(). Has anyone had any luck with getting latest CVS sources to work on Mac OS X 10.5 64-bit? Any help/pointers would be greatly appreciated. Thank you in advance. -Jac I've attached my configure and make output as txt files. Here's all my build/machine environment info, as per the troubleshooting wiki page: Mac OS X 10.5.6 (9G55) ----------------------------------------------- /usr/bin/java -version java version "1.6.0_07" Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153) Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode) ----------------------------------------------- Darwin my-macbook.local 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 ----------------------------------------------- autoconf (GNU Autoconf) 2.61 Copyright (C) 2006 Free Software Foundation, Inc. This is free software. You may redistribute copies of it under the terms of the GNU General Public License . There is NO WARRANTY, to the extent permitted by law. Written by David J. MacKenzie and Akim Demaille. ----------------------------------------------- automake (GNU automake) 1.10 Written by Tom Tromey and Alexandre Duret-Lutz . Copyright 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ----------------------------------------------- $ libtool -V Apple Computer, Inc. version cctools-698.1 ----------------------------------------------- GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program built for powerpc-apple-darwin9.0 ----------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: my-configure.out.txt Type: application/octet-stream Size: 6934 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090126/89d9c7f6/attachment-0014.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: my-make.out.txt Type: application/octet-stream Size: 7737 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090126/89d9c7f6/attachment-0015.obj From kintel at sim.no Mon Jan 26 16:16:19 2009 From: kintel at sim.no (Marius Kintel) Date: Tue, 27 Jan 2009 00:16:19 +0100 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: Message-ID: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Hi Jac, I've had the same issue, and I suggested a patch to partially fix it a while back: http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html I don't know the status of this in the current incarnation of the rxtx code and I have reverted to Java-1.5 since then.. ~/= Marius -- We are Elektropeople for a better living. From tjarvi at qbang.org Tue Jan 27 08:08:54 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 27 Jan 2009 08:08:54 -0700 (MST) Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: On Tue, 27 Jan 2009, Marius Kintel wrote: > Hi Jac, > > I've had the same issue, and I suggested a patch to partially fix it a > while back: > http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html > > I don't know the status of this in the current incarnation of the rxtx > code and I have reverted to Java-1.5 since then.. > > ~/= Marius > > -- > We are Elektropeople for a better living. > Hmm. That did not get in. I can add it and put a new prerelease out this week. The eis must be a regression. I was sure we fixed that. -- Trent Jarvi tjarvi at qbang.org From jacomoman at hotmail.com Tue Jan 27 08:48:16 2009 From: jacomoman at hotmail.com (Joseph Schmoley) Date: Tue, 27 Jan 2009 07:48:16 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: That would be excellent Trent. I've got a project partially on hold because of this. It runs great on Win32 (XP/Vista), it just has to do the same on Mac 64-bit and Linux 32-bit. I look forward to this pre-release. Again, thanks a bunch to you and all the other code contributors for this excellent project. I wish I could donate something to you guys. I couldn't find a donation link anywhere. RxTx has been a great help with my project. -Jac From: Trent Jarvi Sent: Tuesday, January 27, 2009 7:08 AM To: Marius Kintel Cc: Joseph Schmoley ; rxtx at qbang.org Subject: Re: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit On Tue, 27 Jan 2009, Marius Kintel wrote: > Hi Jac, > > I've had the same issue, and I suggested a patch to partially fix it a > while back: > http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html > > I don't know the status of this in the current incarnation of the rxtx > code and I have reverted to Java-1.5 since then.. > > ~/= Marius > > -- > We are Elektropeople for a better living. > Hmm. That did not get in. I can add it and put a new prerelease out this week. The eis must be a regression. I was sure we fixed that. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090127/bbd287bb/attachment-0006.html From bschlining at gmail.com Tue Jan 27 09:38:26 2009 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 27 Jan 2009 08:38:26 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: > That would be excellent Trent. I've got a project partially on hold > because of this. It runs great on Win32 (XP/Vista), it just has to do the > same on Mac 64-bit and Linux 32-bit. I look forward to this pre-release. > I'm in the same spot too. Looking forward to the pre-release! -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090127/2275013b/attachment-0006.html From andrew.paverd at rorotika.com Wed Jan 28 03:14:58 2009 From: andrew.paverd at rorotika.com (Andrew Paverd) Date: Wed, 28 Jan 2009 12:14:58 +0200 Subject: [Rxtx] RXTX not working on Solaris Message-ID: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Hi all, I am attempting to use RXTX on a Sun SPARC server running Solaris. I have tried the binaries from both the latest release (2.1-7) and the pre-release (2.2pre1). The 2.1-7 driver gives the following error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: fatal: libgcc_s.so.1: open failed: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)" I'm not sure what this "libgcc_s.so.1" file does in terms of RXTX but its absence is preventing the application from running. With the 2.2pre1 binary, the application loads without any issue but does not detect any comm-ports. I know that there are multiple ports available because when using the Sun javax.comm library for Solaris SPARC, the ports are all correctly discovered and the application can read from and write to them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in the 2.2 release. Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if so, how did you do it (which versions did you use etc.)? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090128/a97b220d/attachment-0006.html From tjarvi at qbang.org Wed Jan 28 17:01:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 28 Jan 2009 17:01:50 -0700 (MST) Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: On Wed, 28 Jan 2009, Andrew Paverd wrote: > > Hi all, > > ? > > I am attempting to use RXTX on a Sun SPARC server running Solaris. I have > tried the binaries from both the latest release (2.1-7) and the pre-release > (2.2pre1). > > ? > > The 2.1-7 driver gives the following error: > > ? > > ?Exception in thread "main" java.lang.UnsatisfiedLinkError: > /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: > fatal: libgcc_s.so.1: open failed: No such file or directory > > ??????? at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > ??????? at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) > > ??????? at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) > > ??????? at java.lang.Runtime.loadLibrary0(Runtime.java:823) > > ??????? at java.lang.System.loadLibrary(System.java:1030) > > ??????? at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)? > > ? > > I?m not sure what this ?libgcc_s.so.1? file does in terms of RXTX but its > absence is preventing the application from running. > > ? > > With the 2.2pre1 binary, the application loads without any issue but does > not detect any comm-ports. I know that there are multiple ports available > because when using the Sun javax.comm library for Solaris SPARC, the ports > are all correctly discovered and the application can read from and write to > them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in > the 2.2 release. > > ? > > Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if > so, how did you do it (which versions did you use etc.)? > > ? Hi Andrew ld.so/libgcc_s.so are part of GNU gcc/ld. They are available for solaris. I'm not sure how to link them without requiring them. It is also possible to compile rxtx with Sun's compiler if you have it. Perhaps someone here knows how to get rxtx compiled on Solaris using gcc without requiring those libs by everyone? -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Jan 28 17:39:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 28 Jan 2009 17:39:08 -0700 (MST) Subject: [Rxtx] Problem on 'Trouble Shooting' wiki page. Message-ID: It has been pointed out that the rxtx wiki page says usermod -G may be used to update the group a user is in. http://rxtx.qbang.org/wiki/index.php/Trouble_shooting The corrected text now says to use usermod -aG to add the user to a group in addition to their current group(s). The previous -G version would replace the users current groups with the new group. Replacing group information can cause significant problems for end users. If you have information based upon the wiki, please update your content. Thanks, -- Trent Jarvi tjarvi at qbang.org From andrew.paverd at rorotika.com Thu Jan 29 02:15:35 2009 From: andrew.paverd at rorotika.com (Andrew Paverd) Date: Thu, 29 Jan 2009 11:15:35 +0200 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Thanks for the advice Trent - I was originally using the precompiled librxtxSerial.so. I've subsequently compiled rxtx for Solaris (using gcc) and after copying the libgcc_s.so file to my .../jre/lib/sparc directory, the library loads. However, it does not detect any ports. When I call the getComPortIdentifiers() nothing is returned and I can't connect to any port. Sun's javax.comm package detects and can connect to all the ports. This is the same as when I tried the 2.2pre1 library. Are there any extra steps that must be taken to detect ports on Solaris? (user is member of uucp group) Thanks, Andrew From tristan.dyer at cgi.com Thu Jan 29 05:57:25 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 29 Jan 2009 07:57:25 -0500 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D030BE152@MTL-MSG-02.cgiclients.com> Andrew, I had the same problem, but before I got too far the scope of my project changed, and I don't have to support Solaris anymore.. I was getting a weird error, file does not exist but should, or something like that. The project ended before I figured out why. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Andrew Paverd Sent: January 29, 2009 5:16 AM To: 'Trent Jarvi' Cc: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working on Solaris Thanks for the advice Trent - I was originally using the precompiled librxtxSerial.so. I've subsequently compiled rxtx for Solaris (using gcc) and after copying the libgcc_s.so file to my .../jre/lib/sparc directory, the library loads. However, it does not detect any ports. When I call the getComPortIdentifiers() nothing is returned and I can't connect to any port. Sun's javax.comm package detects and can connect to all the ports. This is the same as when I tried the 2.2pre1 library. Are there any extra steps that must be taken to detect ports on Solaris? (user is member of uucp group) Thanks, Andrew _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Martin.Oberhuber at windriver.com Thu Jan 29 06:15:01 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:15:01 +0100 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2326@ism-mail03.corp.ad.wrs.com> Hi Andrew & Paverd, the trick of compiling with gcc on Solaris such that the libgcc_s.so library is not needed at runtime is that gcc itself must be configured and compiled with special options: cd gcc-src ./configure --disable-shared make Using that specially compiled gcc, you can then build the RXTX library: setenv PATH $HOME/my-gcc/bin:$PATH cd rxtx mkdir build-solaris && cd build-solaris ../configure --disable-lockfiles make For more details, see the original bug and its attachments: http://bugzilla.qbang.org/show_bug.cgi?id=73 An rxtx-2.1-7r2 build for Solaris without libgcc_s dependency is available from the Eclipse packages at http://rxtx.qbang.org/eclipse/downloads/ Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Andrew Paverd Sent: Mittwoch, 28. J?nner 2009 11:15 To: rxtx at qbang.org Subject: [Rxtx] RXTX not working on Solaris Hi all, I am attempting to use RXTX on a Sun SPARC server running Solaris. I have tried the binaries from both the latest release (2.1-7) and the pre-release (2.2pre1). The 2.1-7 driver gives the following error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: fatal: libgcc_s.so.1: open failed: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)" I'm not sure what this "libgcc_s.so.1" file does in terms of RXTX but its absence is preventing the application from running. With the 2.2pre1 binary, the application loads without any issue but does not detect any comm-ports. I know that there are multiple ports available because when using the Sun javax.comm library for Solaris SPARC, the ports are all correctly discovered and the application can read from and write to them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in the 2.2 release. Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if so, how did you do it (which versions did you use etc.)? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090129/d6d73f3e/attachment-0005.html From Martin.Oberhuber at windriver.com Thu Jan 29 06:16:38 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:16:38 +0100 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E232A@ism-mail03.corp.ad.wrs.com> Hi Andrew, one thing I did notice on Solaris was that after closing a port, the Solaris Kernel seems to have some timeout before it can be re-opened. So, when you try it again, make sure that no other application hogs the port or has been hogging it shortly before. It may make sense to try a few times. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Andrew Paverd > Sent: Donnerstag, 29. J?nner 2009 10:16 > To: 'Trent Jarvi' > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX not working on Solaris > > Thanks for the advice Trent - I was originally using the > precompiled librxtxSerial.so. I've subsequently compiled rxtx > for Solaris (using gcc) and after copying the libgcc_s.so > file to my .../jre/lib/sparc directory, the library loads. > > However, it does not detect any ports. When I call the > getComPortIdentifiers() nothing is returned and I can't > connect to any port. Sun's javax.comm package detects and can > connect to all the ports. This is the same as when I tried > the 2.2pre1 library. > > Are there any extra steps that must be taken to detect ports > on Solaris? (user is member of uucp group) > > Thanks, > > > Andrew > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From Martin.Oberhuber at windriver.com Thu Jan 29 06:24:05 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:24:05 +0100 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2335@ism-mail03.corp.ad.wrs.com> Hi Greg, sorry for the late response (just catching up on E-Mails). I do not plan to create any Eclipse bundles before rxtx-2.2 is released. Creating the packages is a bit of an effort, which I'd rather postpone until the release, and then do it only once. In the meantime, if you need it for testing, I think it should be easy to take the existing Eclipse bundles/fragments and simply replace any new DLL's / so's in them, plus use WinZIP to replace the .class files in the Java bundle. For Eclipse, it will still look like rxtx-2.1-7 but in reality it will be your own latest build. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Trent Jarvi > Sent: Sonntag, 04. J?nner 2009 20:42 > To: Greg Johnson > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] [Announce] RXTX 2.2pre1 is available. > > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse > packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be > a popular > spam abuse page. I'll put a license and download link on there. All > other pages are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > > > Hi Trent, > > The download link on rxtx.org > (http://users.frii.com/jarvi/rxtx/) loops back > > to rxtx.org, and the wiki doesn't seem to have a link (top > level at least) to > > download. I think Martin had been generating > (fantastically useful) Eclipse > > bundles, as well - are these available for 2.2pre1 also? > > > > Many thanks to everyone for their work - rxtx is an > essential part of our > > product, and we have been keenly awaiting this release. > > > > Regards, > > greg > > > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > > > >> > >> The binaries, source and pending wiki move are now announced on > >> http://www.rxtx.org. After this has baked, we can put > the web install in. > >> > >> Changes in rxtx 2.2 (If I missed something let me know): > >> ... snip ... > >> > >> -- > >> Trent Jarvi > >> tjarvi at qbang.org_______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > -- > > Greg Johnson, PhD > > Director of Engineering > > http://www.rbr-global.com > > greg.johnson at rbr-global.com > > +1.613.233.1621 (GMT-5) office > > > > > > See us at: Ocean Business 2009, Southampton, England, March > 31 - April 1, > > 2009 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From Martin.Oberhuber at windriver.com Thu Jan 29 06:32:57 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:32:57 +0100 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> Hi Tristan, > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); I think that this code is wrong. User code must not call the RXTXCommDriver constructor, since you cannot initialize it properly. What you can do to announce previously unknown port names is this: System.setProperty("gnu.io.rxtx.SerialPorts","/dev/term/a"); before you first access any RXTX function. For details, see the code in RXTXCommDriver#registerSpecifiedPorts() > What is the output of System.getProperty("os.name") on OpenSolaris? I didn't see any response of yours to this question from Trent. What does OpenSolaris output? Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Trent Jarvi > Sent: Mittwoch, 31. Dezember 2008 20:04 > To: Dyer, Tristan > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX for OpenSolaris 2008.11 > > > > On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > > > > Hi, > > > > I have tried building the rxtx library for OpenSolaris 2008.11. > > > > It seemed to build fine without errors, however code such as > > > > ????? java.util.Enumeration portList > > ???????? = CommPortIdentifier.getPortIdentifiers(); > > ????? boolean found = false; > > ????? while (portList.hasMoreElements()) { > > ???????? portId = (CommPortIdentifier) portList.nextElement(); > > ???????? System.out.println(" " + portId.getName()); > > ???????? if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > > ?????????? ???? ?? System.out.println("found"); > > ?????????????? found = true; > > ?????????????? break; > > ??????????? } > > ???????? } > > ????? } > > Will output nothing. > > > > Or rather it seems as if there are no ports found by RXTX. > This code works > > on Ubuntu8.04 and winXP. > > > > If I Add the port manually and then try and open the port > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > > ????? try{ > > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > > ????? } > > ????? catch(Exception e){ > > ??? ??? ? System.out.println("NoSuchPortException"); > > ??? ??? ? //ignore > > ????? } > > ????? try { > > ??????? ???????? System.out.println("opening port"); > > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > > WAIT_TO_OPEN); > > ??????????? connected = true; > > ??????????? System.out.println("Connected to port " + > portId.getName()); > > ???????? } catch (PortInUseException p) { > > ??????????? if (DEBUG) { > > ?????????????? System.err.println(p); > > ??????????? } > > ??????????? port = null; > > ??????????? portId = null; > > ??????????? System.out.println("PortInUseException"); > > ??????????? p.printStackTrace(); > > ???????? } > > > > I will get the following, but not the NoSuchPortException. > > > > java.lang.reflect.InvocationTargetException > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Caused by: java.lang.NullPointerException > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:296) > > > > ??????? ... 7 more > > > > > > As well as > > > > java.lang.NullPointerException > > ??????? at > gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > > ??????? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > > ??????? at > > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:255) > > > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > > > Did I build it wrong? Or is there a problem with > OpenSolaris that will > > prevent this from working? Or am I missing something > incredibly simple? > > > > As well OpenSolaris is running inside a VM with COM1 mapped to > > COM1(VirtualBox) which I believe maps it to /dev/term/a > > > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > > > > > Hi Tristan? > > What is the output of System.getProperty("os.name") on > OpenSolaris? We > have logic like the following in RXTX to handle platform specific > information: > > if ( osName.equals("Solaris") || osName.equals("SunOS")) > > Which may not be getting hit. The result if you will never > call private > void checkSolaris(String PortName, int PortType). > > It could also result in Solaris specific settings not being > set in the > Makefile. > > > The os.name is displayed when you run the configure script. > > -- > Trent Jarvi > tjarvi at qbang.org > From Martin.Oberhuber at windriver.com Thu Jan 29 06:38:20 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:38:20 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] how do you dynamically reload native libraries? In-Reply-To: References: Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2341@ism-mail03.corp.ad.wrs.com> Hi Douglas, Eclipse / OSGi may be doing what you want. It does say that multiple versions of a lib can co-exist at the same time, when the MANIFEST.MF doesn't specify a lib as a singleton. I'm not sure though if or how that would work with native libs. Eclipse bundles for RXTX-2.1-7r2 are available on http://rxtx.qbang.org/eclipse/downloads/ You could build RXTX-2.2pre and then manually create those Eclipse bundles just by adding the MANIFEST.MF to the JAR with the version number exchanged. Then you should be able to try it out. If you do, let me know how it goes... Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Samstag, 27. Dezember 2008 15:00 > To: rxtx at qbang.org; lyon at docjava.com > Subject: [Suspected Spam][Blocked Sender][Rxtx] how do you > dynamically reload native libraries? > > Hi All, > I am trying to test multiple versions of the RXTX native libraries > in a single JVM. > > Each RXTX library instance can share a single virtual machine, but > must have an isolated context class loader. > A context class loader maps a thread to specific classes and > resources. > When the thread dies, the classes and resources are freed. > > Is there some way to have multiple context class loaders that can > load different native method > library implementations? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Thu Jan 29 07:50:05 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 29 Jan 2009 09:50:05 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D030BE22B@MTL-MSG-02.cgiclients.com> Sorry, I had sent it to Trent alone. It outputs "SunOS" Also I had only added that line as a test to see if explicitly adding the port would make a difference, it didn't. My project scope has been reduced so I don't need to support solaris anymore, but I will return to the problem when things slow down. I do remember that the error that was being reported by the native code was "2" which I believe maps to "ENOENT No such file or directory A file name is specified and the file should exist but doesn't, or one of the directories in a path name does not exist." I didn't get much farther. Thanks, -- Tristan Dyer -----Original Message----- From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] Sent: January 29, 2009 9:33 AM To: Trent Jarvi; Dyer, Tristan Cc: rxtx at qbang.org Subject: RE: [Rxtx] RXTX for OpenSolaris 2008.11 Hi Tristan, > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); I think that this code is wrong. User code must not call the RXTXCommDriver constructor, since you cannot initialize it properly. What you can do to announce previously unknown port names is this: System.setProperty("gnu.io.rxtx.SerialPorts","/dev/term/a"); before you first access any RXTX function. For details, see the code in RXTXCommDriver#registerSpecifiedPorts() > What is the output of System.getProperty("os.name") on OpenSolaris? I didn't see any response of yours to this question from Trent. What does OpenSolaris output? Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Mittwoch, 31. Dezember 2008 20:04 > To: Dyer, Tristan > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX for OpenSolaris 2008.11 > > > > On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > > > > Hi, > > > > I have tried building the rxtx library for OpenSolaris 2008.11. > > > > It seemed to build fine without errors, however code such as > > > > ????? java.util.Enumeration portList > > ???????? = CommPortIdentifier.getPortIdentifiers(); > > ????? boolean found = false; > > ????? while (portList.hasMoreElements()) { > > ???????? portId = (CommPortIdentifier) portList.nextElement(); > > ???????? System.out.println(" " + portId.getName()); > > ???????? if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > > ?????????? ???? ?? System.out.println("found"); > > ?????????????? found = true; > > ?????????????? break; > > ??????????? } > > ???????? } > > ????? } > > Will output nothing. > > > > Or rather it seems as if there are no ports found by RXTX. > This code works > > on Ubuntu8.04 and winXP. > > > > If I Add the port manually and then try and open the port > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > > ????? try{ > > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > > ????? } > > ????? catch(Exception e){ > > ??? ??? ? System.out.println("NoSuchPortException"); > > ??? ??? ? //ignore > > ????? } > > ????? try { > > ??????? ???????? System.out.println("opening port"); > > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > > WAIT_TO_OPEN); > > ??????????? connected = true; > > ??????????? System.out.println("Connected to port " + > portId.getName()); > > ???????? } catch (PortInUseException p) { > > ??????????? if (DEBUG) { > > ?????????????? System.err.println(p); > > ??????????? } > > ??????????? port = null; > > ??????????? portId = null; > > ??????????? System.out.println("PortInUseException"); > > ??????????? p.printStackTrace(); > > ???????? } > > > > I will get the following, but not the NoSuchPortException. > > > > java.lang.reflect.InvocationTargetException > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Caused by: java.lang.NullPointerException > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:296) > > > > ??????? ... 7 more > > > > > > As well as > > > > java.lang.NullPointerException > > ??????? at > gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > > ??????? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > > ??????? at > > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:255) > > > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > > > Did I build it wrong? Or is there a problem with > OpenSolaris that will > > prevent this from working? Or am I missing something > incredibly simple? > > > > As well OpenSolaris is running inside a VM with COM1 mapped to > > COM1(VirtualBox) which I believe maps it to /dev/term/a > > > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > > > > > Hi Tristan > > What is the output of System.getProperty("os.name") on OpenSolaris? > We have logic like the following in RXTX to handle platform specific > information: > > if ( osName.equals("Solaris") || osName.equals("SunOS")) > > Which may not be getting hit. The result if you will never call > private void checkSolaris(String PortName, int PortType). > > It could also result in Solaris specific settings not being set in the > Makefile. > > > The os.name is displayed when you run the configure script. > > -- > Trent Jarvi > tjarvi at qbang.org > From hho at bibliotheca.dk Thu Jan 29 08:00:49 2009 From: hho at bibliotheca.dk (Hans Hvelplund Odborg) Date: Thu, 29 Jan 2009 16:00:49 +0100 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: I know that there arent any guarantees, but could someone involved with the development of RxTx please guesstimate when 2.2 final will be released? I'm not familiar with the pre-release history of 2.1-7 but I read that there was 20 pre-relases of 2.1-7 so I guess (based on current pre-release rate) that 2.2 may easily be more than 6 months away? Thanks Med venlig hilsen / Best regards / Med v?nliga h?lsningar Hans Hvelplund Odborg BIBLIOTHECA A/S Vallensb?kvej 22A, 2. TH ? 2605 Br?ndby ? Denmark Mob.: +45 30235940 Tel.: +45 70271008 Fax: +45 70271009 hho at bibliotheca.dk www.bibliotheca.dk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: 4. januar 2009 20:15 To: rxtx at qbang.org Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Jan 29 08:33:33 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 29 Jan 2009 08:33:33 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: Projects tend to evolve from an adhoc release process to predictable releases when enough projects demand it (and help make it happen). "Its ready when Its ready" is a typical answer prior to the above. I lik$ to say "The beatings will continue until moral improves." I expect moral to improve in the next six months at most. This release i$ resolving 3 larger issues. 1) syncing of some large efforts to the same source code. 2) incorperating all community patches 3) building the binaries correctly. This does not include fixing everyones bugs. But it does include making sure the fixes get in if they are provided. Given the above, I don't expect this to be as drawn out as 2.1-7pre*. We may have several stable releases during the same period. On Thu, 29 Jan 2009, Hans Hvelplund Odborg wrote: > I know that there arent any guarantees, but could someone involved with the > development of RxTx please guesstimate when 2.2 final will be released? > > I'm not familiar with the pre-release history of 2.1-7 but I read that there > was 20 pre-relases of 2.1-7 so I guess (based on current pre-release rate) > that 2.2 may easily be more than 6 months away? > > Thanks > > Med venlig hilsen / Best regards / Med v?nliga h?lsningar > Hans Hvelplund Odborg > > BIBLIOTHECA A/S > Vallensb?kvej 22A, 2. TH ? 2605 Br?ndby ? Denmark > Mob.: +45 30235940 > Tel.: +45 70271008 > Fax: +45 70271009 > hho at bibliotheca.dk > www.bibliotheca.dk > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: 4. januar 2009 20:15 > To: rxtx at qbang.org > Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. > > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org. After this has baked, we can put the web install > in. > > Changes in rxtx 2.2 (If I missed something let me know): > > threshold fix > Alexandre Rusev > http://bugzilla.qbang.org/show_bug.cgi?id=85 > > RXTX close deadlocks in REXTXPort.finalize > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=53 > > Add ACM serial devices to all known ports. > Duncan Pierce > http://bugzilla.qbang.org/show_bug.cgi?id=51 > > Concurrency fixes for SMP/multicore systems > U. George > http://bugzilla.qbang.org/show_bug.cgi?id=100 > > Fixes for MAC systems with no drivers installed. > 1.5 stop bit fix > > Enable universal library builds for Mac OS X > Andre-John Mas ajmas at sympatico.ca > > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > Do not remove and ignore interrupts. > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=45 > > find ports which were added after program startup on Mac > OS X. > Martin Oberhuber > http://bugzilla.qbang.org/show_bug.cgi?id=48 > > Clean up CommPort Ownership code, avoid possible deadlocks, > fix lost commport ownership events. > Martin Oberhuber > http://bugzilla.qbang.org/show_bug.cgi?id=83 > > rxtx does not compile against JDK-1.6 > Neboj?a > http://bugzilla.qbang.org/show_bug.cgi?id=84 > > configure script failed at line UTS_RELEASE > megov > http://bugzilla.qbang.org/show_bug.cgi?id=80 > > code cleanup patch (extra ';' creates bug for if statements > + new String() calls removed) > Xavier Le Vourch > http://bugzilla.qbang.org/show_bug.cgi?id=77 > > Wont compile on linux ppc with glibc 2.5 - no sys/io.h > Brian Johnson > http://bugzilla.qbang.org/show_bug.cgi?id=72 > > rxtx overwrites System properties > Andrew Gillett > Nektarios K. Papadopoulos > Neboj?a > http://bugzilla.qbang.org/show_bug.cgi?id=64 > > Solaris ACM port support > Dave Cleal > http://bugzilla.qbang.org/show_bug.cgi?id=59 > > Setting of non-standard baud rate fails. > Andrew Prunicki > http://bugzilla.qbang.org/show_bug.cgi?id=58 > > RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=50 > > JavaDoc fixes > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > From mmornati at byte-code.com Fri Jan 30 02:32:44 2009 From: mmornati at byte-code.com (Marco Mornati) Date: Fri, 30 Jan 2009 10:32:44 +0100 Subject: [Rxtx] Linux Library Message-ID: <1233307964.4046.19.camel@localhost.localdomain> Hello, I made a little Applet added to my web application to support BarCode printer (on serial port). All is autoconfigured during applet init: dll/so are copied on /tmp folder on local computer and with System.load(/tmp/library.so/dll) I'm adding the library to classpath. On windows all works correctly and I'm able to print (jar is signed... without signing it there's no way to communicate with serial port). I've just a little problem on linux. It seams that library is not added to classpath, because when I try to connect with com port, applet says that is impossible to find .so. Any idea on what could be the problem? Just for information I post here my code: Container content = getContentPane(); content.setBackground(Color.white); content.setLayout(new FlowLayout()); String libraryFile = ""; String libraryName = ""; if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")) { libraryName = DLL_SERIAL_NAME; libraryFile = System.getProperty("java.io.tmpdir") + DLL_SERIAL_NAME; } else if (System.getProperty("os.name").toUpperCase().contains("LINUX")) { if (System.getProperty("os.arch").contains("i386")) { libraryName = SO_SERIAL_NAME_32; } else { libraryName = SO_SERIAL_NAME_64; } char fileSeparator = System.getProperty("file.separator").charAt(0); libraryFile = System.getProperty("java.io.tmpdir") + fileSeparator + SO_SERIAL_NAME; } System.out.println("Library File: " + libraryFile); /** * Copying DLL to java bin dir (if it's not already present) */ if (!verifyLibraryExistence(libraryFile)) { System.out.println("Library file does not exist"); copyResourceFromJar(libraryFile, libraryName); } try { System.load(libraryFile); } catch (Exception e) { System.out.println("Cannot load " + libraryFile + " you have to install it manually!!"); } try { content.add(new JLabel("Initializing Applet!")); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); content.add(new JLabel("List Porte: " + portList)); if (portList == null) { content.add(new JLabel("No Serial Port Found!!")); } while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL)) { System.out.println("Porta Trovata: " + portId.getName()); content.add(new JLabel("Porta Trovata: " + portId.getName())); } break; } } catch (Exception e) { content.add(new JLabel("Exception: " + e)); e.printStackTrace(); } Thanks a lot Bye Marco -- Dott. Ing. Mornati Marco Byte-Code s.r.l via Antonio Cechov, 1 San Giuliano Milanese (MI) E-Mail: mmornati at byte-code.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090130/c176573f/attachment-0004.bin From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0030.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0030.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0028.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0028.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0028.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0028.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0027.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0025.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0025.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0025.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0025.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0025.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0022.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0022.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0022.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment-0021.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0021.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment-0021.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment-0021.html From tjarvi at qbang.org Wed Jan 14 18:56:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 14 Jan 2009 18:56:50 -0700 (MST) Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Message-ID: On Wed, 14 Jan 2009, Jaakko Sipari wrote: > Hi (again)! > > Could someone clarify what these methods actually do and are they even > implemented? Do I get into trouble with buffer values of 0 (if I want to > handle the buffers myself)? > rxtx does not have buffers. It was not clear to me at the time why there would be a buffer when java already provides buffered input and output streams that can sit on top of rxtx. One reason I can see for implementing buffers in rxtx is to get data off the port so select() can block. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Wed Jan 14 23:23:08 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 15 Jan 2009 08:23:08 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> Message-ID: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Here's the same message for the list also. Forgot to do "Reply to all" ---------- Forwarded message ---------- From: Jaakko Sipari Date: Thu, Jan 15, 2009 at 8:22 AM Subject: Re: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize To: Trent Jarvi On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! >> >> Could someone clarify what these methods actually do and are they even >> implemented? Do I get into trouble with buffer values of 0 (if I want to >> handle the buffers myself)? >> >> > rxtx does not have buffers. It was not clear to me at the time why there > would be a buffer when java already provides buffered input and output > streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data off > the port so select() can block. > So basically those methods have currently no effect at all? - Jaakko -- Jaakko Sipari tel. +358451238191 eMail. jaakko.sipari at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090115/8b4c47c0/attachment-0020.html From tjarvi at qbang.org Thu Jan 15 18:37:12 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 15 Jan 2009 18:37:12 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: On Thu, 15 Jan 2009, Jaakko Sipari wrote: > Here's the same message for the list also. Forgot to do "Reply to all" > > ---------- Forwarded message ---------- > From: Jaakko Sipari > Date: Thu, Jan 15, 2009 at 8:22 AM > Subject: Re: [Rxtx] The functionality behind setInputBufferSize & > setOutputBufferSize > To: Trent Jarvi > > > On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! > > Could someone clarify what these methods actually do > and are they even > implemented? Do I get into trouble with buffer > values of 0 (if I want to > handle the buffers myself)? > > > rxtx does not have buffers. ?It was not clear to me at the time why > there would be a buffer when java already provides buffered input and > output streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data > off the port so select() can block. > > > So basically those methods have currently no effect at all? > Correct. You can use BufferedInputStream and BufferedOutputStream from the Java API once you get the Input/OutputStream from rxtx. But changing the input and output buffer size in rxtx is not going to change behavior. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Fri Jan 16 01:22:37 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Fri, 16 Jan 2009 10:22:37 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> > So basically those methods have currently no effect at all? >> >> > Correct. You can use BufferedInputStream and BufferedOutputStream from the > Java API once you get the Input/OutputStream from rxtx. But changing the > input and output buffer size in rxtx is not going to change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > I assume there still is some kind of buffer in rxtx (or the serial port driver) in case of processing delays. I mean, if the serial port gives data faster than can be read from the Java program using rxtx it isn't just thrown away, right? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090116/3bd9a52e/attachment-0019.html From tjarvi at qbang.org Fri Jan 16 05:17:24 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 16 Jan 2009 05:17:24 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> Message-ID: On Fri, 16 Jan 2009, Jaakko Sipari wrote: > > So basically those methods have currently no effect > at all? > > > Correct. ?You can use BufferedInputStream and BufferedOutputStream > from the Java API once you get the Input/OutputStream from rxtx. ?But > changing the input and output buffer size in rxtx is not going to > change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > > > > I assume there still is some kind of buffer in rxtx (or the serial port > driver) in case of processing delays. I mean, if the serial port gives data > faster than can be read from the Java program using rxtx it isn't just > thrown away, right? > The UART can usually hold a few bytes. The kernel driver can buffer the input. In practice, it works. With Sun commapi, the typical application has 4 buffers between the user and the incomming data. With rxtx, it is 3. BufferedInputStream -> commapi/rxtx -> kernel driver -> UART If you really do run into overflows on the UART, then hardware flow control is what you should be using and tinkering with rxtx to avoid it is not a very sound approach. -- Trent Jarvi tjarvi at qbang.org From llowrey at nuclearwinter.com Sun Jan 18 12:49:39 2009 From: llowrey at nuclearwinter.com (Larkin Lowrey) Date: Sun, 18 Jan 2009 13:49:39 -0600 Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain Message-ID: <497387D3.9040201@nuclearwinter.com> After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when running code that uses RXTXComm. The crashes only occur when using 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. As far as I can tell, the crash happens immediately on start. I can't see any evidence of much, if anything, happening before the crash. The code used to work and only stopped working after the "upgrade" to FC10. I have tried RXTX v2.1 and 2.2pre1. Any ideas? Here's the error: # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode linux-amd64) # Problematic frame: # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 --Larkin From tjarvi at qbang.org Mon Jan 19 17:48:34 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 19 Jan 2009 17:48:34 -0700 (MST) Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain In-Reply-To: <497387D3.9040201@nuclearwinter.com> References: <497387D3.9040201@nuclearwinter.com> Message-ID: On Sun, 18 Jan 2009, Larkin Lowrey wrote: > After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when > running code that uses RXTXComm. The crashes only occur when using > 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. > > As far as I can tell, the crash happens immediately on start. I can't > see any evidence of much, if anything, happening before the crash. > > The code used to work and only stopped working after the "upgrade" to > FC10. I have tried RXTX v2.1 and 2.2pre1. > > Any ideas? > > Here's the error: > > # > # An unexpected error has been detected by Java Runtime Environment: > # > # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 > # > # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode > linux-amd64) > # Problematic frame: > # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 > > > --Larkin Hi Larkin, I can think of 2 segv's in rxtx that may apply. Both are fixed in rxtx 2.2pre.. The first was that pointers required by nativeDrain needed to be stored in something larger than a 32 bit integer in java. This resulted in a crash like you see the first time the 'nativedrain' thread tried to use the pointer. The second was a concurrency issue George resolved with synchronization. The crash was usually during close but happened in the 'nativedrain' thread. (eventLoop) As mentioned, these are both fixed in the prerelease. There is a class provided in recent versions of RXTX that allow you confirm the version being used: gnu.io.RXTXVersion with member methods getVersion() and nativeGetVersion(). This allows you to confirm that you are indeed using the version you think you are. -- Trent Jarvi tjarvi at qbang.org From alexandrepoletto at gmail.com Wed Jan 21 11:48:07 2009 From: alexandrepoletto at gmail.com (Alexandre Poletto) Date: Wed, 21 Jan 2009 16:48:07 -0200 Subject: [Rxtx] work in windows but dont work in linux Message-ID: hi folks, I have an application to communicate with the serial port using rxtx, in the windows os my application works well, but when i try to run in the linux os i open the port (in windows "COM1", in Linux "/dev/ttyS0") send my commandes but i never receive any answer. I'm using ubuntu 8.10 and java 1.5, there is any configuration in that i'm missing? Thanks for the help! ps: Sorry form my bad english :( -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/70baea51/attachment-0013.html From jmudd at dtiweb.net Wed Jan 21 14:08:04 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Wed, 21 Jan 2009 16:08:04 -0500 Subject: [Rxtx] Hot unplugging of a USB device Message-ID: Looking to see if the issues surrounding an uplugging of a USB device have been resolved. I see from the mail list archives and bug reports that others have noted this issue. I have a USB GPS Receiver that is plugged into a Windows (XP) system and am using Netbeans 6.5 and Java jdk 1.6 and RXTX 2.1.7 and 2.2pre1. In the thread that is reading data via listening for a SerialEvent I can capture a Java IOException: No error in readArray. The application is essentially hung at this point. Only a termination of the application will clear it up and not leave the port hung. I had read in the archives that this is because the event loop in the native code portion is continually putting out the exceptions. I had also seen that this might be addressed in future releases. Any help is appreciated. Thanks, Jerry ________________________________ Jerry Mudd Senior Programmer 21795 Shangri-La Drive, Ste C Lexington Park, MD 20653 (301) 737-8893 (301) 737-8897 Fax jmudd at dtiweb.net www.dtiweb.net This message may contain sensitive, proprietary and/or privileged information. Disclosure is not authorized unless provided in writing by Defense Technologies, Inc. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0013.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 6296 bytes Desc: image001.gif Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0013.gif From netbeans at gatworks.com Wed Jan 21 17:33:46 2009 From: netbeans at gatworks.com (U. George) Date: Wed, 21 Jan 2009 19:33:46 -0500 Subject: [Rxtx] Hot unplugging of a USB device In-Reply-To: References: Message-ID: <4977BEEA.4020708@gatworks.com> > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:34 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:34 +1100 Subject: [Rxtx] Part 1 of 2 parts re rxtx 2.2 pre.. and OSX Message-ID: Hi, I have tried out the latest version of rxtx on a mac and can report that running with ImageJ (32 bit ) all seems to be fine. However when I attempt to use it with ImageJ64, I get a crash whenever the serial port is used. The details follow. What I did. Ran our plug-in in ImageJ 64 bit (1.42g) for Measuring, which is using the latest rxtx (the beta 2.2 compiled on 30 December 2008) for MacOSX 10.5.x) I installed this by putting the two files in the directory ~ LIBRARY/JAVA/EXTENSIONS. The Plug-in uses the serial port. The window we put up to show the numbers from the stage appeared, but only with the default "0" (zero) in each row, which is what we put there until we get data back from the port and the device attached. Then it crashed. I should point out that this all works fine using ImageJ (32 bit) 1.42g, on the same platform. So the only difference is the use of ImageJ 64 bit, and I guess the version of rxtx for 64 bit. I hope that cleverer people than me can throw some light onto this little problem. ImageJ64 seems to work ok until rxtx is called, although I haven't tried much so far, just some 3D rendering with 1 Gb of image data, which all went well, apart from the fact that the data was marginal. I am now showing the data supplied by the report to Apple window. This has three tabs, one to write your information in, one called Problem Details, and the third called SYSTEM CONFIG. These are pasted in below. Best wishes Noel Problem Details Process: JavaApplicationStub [463] Path: /Applications/ImageJ/ImageJ64.app/Contents/MacOS/JavaApplicationStub Identifier: gov.nih.info.rsb.ImageJ Version: ??? (10.2) Code Type: X86-64 (Native) Parent Process: launchd [398] Date/Time: 2009-01-19 10:48:09.342 +1100 OS Version: Mac OS X 10.5.6 (9G55) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000000029507c8 Crashed Thread: 16 Application Specific Information: Java information: Exception type: Bus Error (0xa) at pc=0x00000006ff70f418 Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0_07-b06-57 mixed mode macosx-amd64) Current thread (0x00000001020de800): JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] Stack: [0x0000000702851000,0x0000000702951000] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j gnu.io.RXTXPort.readByte()I+0 j gnu.io.RXTXPort$SerialInputStream.read()I+81 j SerialConnection.serialEvent(Lgnu/io/SerialPortEvent;)V+41 j gnu.io.RXTXPort.sendEvent(IZ)Z+382 v ~BufferBlob::StubRoutines (1) j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~BufferBlob::StubRoutines (1) Java Threads: ( => current thread ) =>0x00000001020de800 JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] 0x00000001020e8800 JavaThread "Measure XYZ" [_thread_blocked, id=44384256, stack(0x0000000702954000,0x0000000702a54000)] 0x0000000102001000 JavaThread "DestroyJavaVM" [_thread_blocked, id=25169920, stack(0x0000000101001000,0x0000000101801000)] 0x00000001020da800 JavaThread "SocketListener" [_thread_in_native, id=29671424, stack(0x0000000701b4c000,0x0000000701c4c000)] 0x00000001020b4800 JavaThread "AWT-EventQueue-0" [_thread_in_Java, id=-27992064, stack(0x00000006fe44e000,0x00000006fe54e000)] 0x0000000102096000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=-34344960, stack(0x00000006fde3f000,0x00000006fdf3f000)] 0x0000000102078000 JavaThread "AWT-Shutdown" [_thread_blocked, id=-58392576, stack(0x00000006fc750000,0x00000006fc850000)] 0x0000000102077800 JavaThread "AWT-AppKit" daemon [_thread_in_native, id=1886770976, stack(0x00007fff5f400000,0x00007fff5fc00000)] 0x0000000102044800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=-333877248, stack(0x00000006ec097000,0x00000006ec197000)] 0x0000000102043000 JavaThread "CompilerThread1" daemon [_thread_blocked, id=-334938112, stack(0x00000006ebf94000,0x00000006ec094000)] 0x0000000102041800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=-335998976, stack(0x00000006ebe91000,0x00000006ebf91000)] 0x0000000102041000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=-337059840, stack(0x00000006ebd8e000,0x00000006ebe8e000)] 0x0000000102029800 JavaThread "Finalizer" daemon [_thread_blocked, id=-338214912, stack(0x00000006ebc74000,0x00000006ebd74000)] 0x0000000102028800 JavaThread "Reference Handler" daemon [_thread_blocked, id=-339333120, stack(0x00000006ebb63000,0x00000006ebc63000)] Other Threads: 0x0000000102020800 VMThread [stack: 0x00000006eba60000,0x00000006ebb60000] [id=-340393984] 0x0000000102046000 WatcherThread [stack: 0x00000006ec19a000,0x00000006ec29a000] [id=-332816384] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 76480K, used 14448K [0x0000000105800000, 0x000000010ad50000, 0x00000002f9800000) eden space 65600K, 22% used [0x0000000105800000, 0x000000010661c398, 0x0000000109810000) from space 10880K, 0% used [0x0000000109810000, 0x0000000109810000, 0x000000010a2b0000) to space 10880K, 0% used [0x000000010a2b0000, 0x000000010a2b0000, 0x000000010ad50000) tenured generation total 174784K, used 0K [0x00000002f9800000, 0x00000003042b0000, 0x00000006e1800000) the space 174784K, 0% used [0x00000002f9800000, 0x00000002f9800000, 0x00000002f9800200, 0x00000003042b0000) compacting perm gen total 21248K, used 10319K [0x00000006e1800000, 0x00000006e2cc0000, 0x00000006e6c00000) the space 21248K, 48% used [0x00000006e1800000, 0x00000006e2213d28, 0x00000006e2213e00, 0x00000006e2cc0000) No shared spaces configured. Virtual Machine Arguments: JVM Args: -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher. framework/Resources/LauncherSupport.jar -Xms256m -Xmx24000m -Dcom.apple.macos.useScreenMenuBar=false -Dcom.apple.mrj.application.growbox.intrudes=false -Dcom.apple.mrj.application.live-resize=true -Dcom.apple.hwaccel=false -Dapple.awt.Antialiasing=false -Dcom.apple.smallTabs=true -Dapple.awt.brushMetalLook=false Java Command: Launcher Type: generic Physical Memory: Page Size = 4k, Total = 2048M, Free = 30996M Thread 0: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 com.apple.CoreFoundation 0x00007fff8204dc4f CFRunLoopRunSpecific + 1631 3 com.apple.HIToolbox 0x00007fff839fdda2 RunCurrentEventLoopInMode + 278 4 com.apple.HIToolbox 0x00007fff839fdbd8 ReceiveNextEventCommon + 322 5 com.apple.HIToolbox 0x00007fff839fda83 BlockUntilNextEventMatchingListInMode + 79 6 com.apple.AppKit 0x00007fff8299d3b0 _DPSNextEvent + 603 7 com.apple.AppKit 0x00007fff8299ccf1 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 136 8 com.apple.AppKit 0x00007fff82996a84 -[NSApplication run] + 455 9 libawt.jnilib 0x00000006ec433257 +[AWTStarter startAWT:] + 1343 10 libawt.jnilib 0x00000006ec432c46 -[CPerformer perform] + 112 11 com.apple.Foundation 0x00007fff8153f2b4 __NSThreadPerformPerform + 148 12 com.apple.CoreFoundation 0x00007fff8204e0e8 CFRunLoopRunSpecific + 2808 13 ...ple.JavaApplicationLauncher 0x0000000100005165 startupJava(LauncherArgsStruct*) + 235 14 ...ple.JavaApplicationLauncher 0x000000010000579c launchJavaApplication + 1224 15 JavaApplicationStub 0x0000000100000b9c 0x100000000 + 2972 Thread 1: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x0000000101a93b61 JVM_GetCPFieldModifiers + 128961 5 libjvm.dylib 0x0000000101a93a36 JVM_GetCPFieldModifiers + 128662 6 ...ple.JavaApplicationLauncher 0x000000010000c0ce startJavaApplication + 2886 7 ...ple.JavaApplicationLauncher 0x000000010000506d java_main_stub(void*) + 9 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 2: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libSystem.B.dylib 0x00007fff840db0b0 mach_msg_server + 436 3 libjvm.dylib 0x000000010181176d JNI_CreateJavaVM_Impl + 53277 4 libjvm.dylib 0x0000000101811375 JNI_CreateJavaVM_Impl + 52261 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 3: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x00000001018e452f JVM_Lseek + 235727 5 libjvm.dylib 0x00000001018e42df JVM_Lseek + 235135 6 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 7 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 8 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 4: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x00000001028003ea 0 + 4336911338 11 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 12 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 13 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 14 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 15 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 16 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 17 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 18 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 19 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 20 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 5: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 6: 0 libSystem.B.dylib 0x00007fff8406dd72 semaphore_wait_trap + 10 1 libjvm.dylib 0x0000000101915bdb JVM_IsPrimitiveClass + 12139 2 libjvm.dylib 0x00000001019155b5 JVM_IsPrimitiveClass + 10565 3 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 4 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 7: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 8: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 9: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x0000000101918ec8 JVM_IsPrimitiveClass + 25176 5 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 6 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 7 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 10: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x000000010191abb5 JVM_IsPrimitiveClass + 32581 4 libjvm.dylib 0x000000010191a70a JVM_IsPrimitiveClass + 31386 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 11: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 12: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x0000000102803414 0 + 4336923668 12 ??? 0x00000001028003ea 0 + 4336911338 13 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 14 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 15 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 16 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 17 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 18 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 19 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 20 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 21 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 22 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 13: 0 ??? 0x0000000102817034 0 + 4337004596 1 ??? 0x000000010280304e 0 + 4336922702 2 ??? 0x0000000102803093 0 + 4336922771 3 ??? 0x000000010280356d 0 + 4336924013 4 ??? 0x0000000102803093 0 + 4336922771 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x000000010280356d 0 + 4336924013 8 ??? 0x0000000102803093 0 + 4336922771 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x0000000102802f3a 0 + 4336922426 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102802f3a 0 + 4336922426 14 ??? 0x0000000102802f3a 0 + 4336922426 15 ??? 0x0000000102803162 0 + 4336922978 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102802f3a 0 + 4336922426 19 ??? 0x0000000102802f3a 0 + 4336922426 20 ??? 0x00000001028003ea 0 + 4336911338 21 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 22 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 23 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 24 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 25 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 26 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 27 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 28 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 29 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 30 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 14: 0 libSystem.B.dylib 0x00007fff840f210e accept + 10 1 libnet.jnilib 0x00000006ff6b6b11 Java_java_net_PlainSocketImpl_socketAccept + 277 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x0000000102802f3a 0 + 4336922426 4 ??? 0x0000000102802f3a 0 + 4336922426 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x0000000102803414 0 + 4336923668 8 ??? 0x00000001028003ea 0 + 4336911338 9 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 10 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 11 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 12 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 13 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 14 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 15 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 16 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 17 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 18 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 15: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x000000010280304e 0 + 4336922702 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102803414 0 + 4336923668 14 ??? 0x0000000102803093 0 + 4336922771 15 ??? 0x0000000102803093 0 + 4336922771 16 ??? 0x0000000102803093 0 + 4336922771 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102803414 0 + 4336923668 19 ??? 0x00000001028003ea 0 + 4336911338 20 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 21 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 22 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 23 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 24 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 25 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 26 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 27 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 28 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 29 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 Crashed: 0 librxtxSerial.jnilib 0x00000006ff70f418 read_byte_array + 68 1 librxtxSerial.jnilib 0x00000006ff70f9b3 Java_gnu_io_RXTXPort_readByte + 93 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x000000010280304e 0 + 4336922702 4 ??? 0x000000010280304e 0 + 4336922702 5 ??? 0x0000000102803414 0 + 4336923668 6 ??? 0x00000001028003ea 0 + 4336911338 7 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 8 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 9 libjvm.dylib 0x00000001018e5be8 JVM_Lseek + 241544 10 libjvm.dylib 0x0000000101900b11 JVM_MonitorWait + 17249 11 libjvm.dylib 0x0000000101a1e59e JVM_DisableCompiler + 1166 12 librxtxSerial.jnilib 0x00000006ff70d91e send_event + 132 13 librxtxSerial.jnilib 0x00000006ff70e82b report_serial_events + 92 14 librxtxSerial.jnilib 0x00000006ff7108c9 Java_gnu_io_RXTXPort_eventLoop + 237 15 ??? 0x000000010280e878 0 + 4336969848 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x00000001028003ea 0 + 4336911338 18 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 19 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 20 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 21 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 22 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 23 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 24 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 25 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 26 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 27 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 17: 0 libSystem.B.dylib 0x00007fff84074d02 __semwait_signal + 10 1 libSystem.B.dylib 0x00007fff840dce91 usleep + 57 2 librxtxSerial.jnilib 0x00000006ff70d729 drain_loop + 45 3 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 4 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 crashed with X86 Thread State (64-bit): rax: 0x00000000029507c0 rbx: 0x0000000000000041 rcx: 0x0000000000000065 rdx: 0x0000000000000002 rdi: 0x00000006ff71205e rsi: 0x00000006ff711c67 rbp: 0x0000000702950000 rsp: 0x000000070294fef0 r8: 0x000000000000004d r9: 0x00000006e21d64c0 r10: 0x00000006e21d38e8 r11: 0x00000000000000d2 r12: 0x00000001020de998 r13: 0x00000006e21d93b0 r14: 0x0000000000000032 r15: 0x00000000029507c0 rip: 0x00000006ff70f418 rfl: 0x0000000000010202 cr2: 0x00000000029507c8 Continued in the message part 2 -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:41 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:41 +1100 Subject: [Rxtx] Part 2 re rxtx 2.2 pre... and MacOSX Message-ID: Continued from Part 1. Binary Images: 0x100000000 - 0x100000fff JavaApplicationStub ??? (???) /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationS tub 0x100004000 - 0x100011fff com.apple.JavaApplicationLauncher 12.2.0 (12.2.0) /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/JavaApplicationLauncher 0x10001a000 - 0x100022ffd com.apple.JavaVM 12.2.0 (12.2.0) <2b178e8d4bbcc0aa427c2f3f71bb2fcb> /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM 0x100055000 - 0x10005dff0 libverify.dylib ??? (???) <56eac95084cb86cd1339a721b1353182> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libveri fy.dylib 0x100063000 - 0x10006cffb JavaNativeFoundation ??? (???) <68ca6409dc49542301edda1e0744ac69> /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNative Foundation.framework/Versions/A/JavaNativeFoundation 0x1000a8000 - 0x1000c7fef libjava.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjava .jnilib 0x1000d8000 - 0x1000e5ffb libzip.jnilib ??? (???) <5b6dce7c9a1f25aa5dff1a633c9dc342> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libzip. jnilib 0x101803000 - 0x101eafff3 libjvm.dylib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bundle/Libra ries/libjvm.dylib 0x6ec2c5000 - 0x6ec2c6fff liblauncher.jnilib ??? (???) <567fa54a222b965b2c4aefea21d9800a> /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/Resources/liblauncher.jnilib 0x6ec431000 - 0x6ec5e4fff libawt.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libawt. jnilib 0x6fdc3b000 - 0x6fdc3cfff ATSHI.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/Resources/ATSHI.dylib 0x6fdd6e000 - 0x6fdd6efff libcmm.jnilib ??? (???) <114e1a620a6920d77bf09bd57a7f7d52> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libcmm. jnilib 0x6fdd9e000 - 0x6fde1fff7 libfontmanager.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libfont manager.jnilib 0x6fdf41000 - 0x6fdf8ffff libsuncmm.jnilib ??? (???) <47330f1f17822de3a5cf921e07615cf7> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libsunc mm.jnilib 0x6fdf95000 - 0x6fdfc4ff7 libjpeg.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjpeg .jnilib 0x6ff6ae000 - 0x6ff6baffb libnet.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnet. jnilib 0x6ff6c0000 - 0x6ff6c4fff libnio.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnio. jnilib 0x6ff6d4000 - 0x6ff6e8ff7 libdcpr.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libdcpr .jnilib 0x6ff70c000 - 0x6ff713fff +librxtxSerial.jnilib ??? (???) <5133deacebd01ceab7d528c541241956> /Library/Java/Extensions/librxtxSerial.jnilib 0x6ff734000 - 0x6ff74bfef libJapaneseConverter.dylib ??? (???) <64cca6bb4650a269f49a8427507e4963> /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib 0x70204f000 - 0x702218fef com.apple.RawCamera.bundle 2.0.10 (2.0.10) /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera 0x7fff5fc00000 - 0x7fff5fc2e643 dyld 97.1 (???) /usr/lib/dyld 0x7fff80003000 - 0x7fff80146ffb com.apple.audio.toolbox.AudioToolbox 1.5.2 (1.5.2) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x7fff801d2000 - 0x7fff801d5ffb com.apple.help 1.1 (36) <9000c05ccad96fdcc25bc35264abf587> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.frame work/Versions/A/Help 0x7fff801d6000 - 0x7fff80211fff com.apple.AE 402.2 (402.2) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.f ramework/Versions/A/AE 0x7fff80212000 - 0x7fff80257fef libRIP.A.dylib ??? (???) <8c818d7fd3dc57839ac48caf107ff4c0> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x7fff80258000 - 0x7fff8029bfef com.apple.QD 3.11.54 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/QD.framework/Versions/A/QD 0x7fff8029c000 - 0x7fff802dffef libTIFF.dylib ??? (???) <86be7909f46cc044a887cbb60ab7826d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x7fff802e0000 - 0x7fff803d4fff libobjc.A.dylib ??? (???) <118dc1ae05e685ad64290352fc94f1f0> /usr/lib/libobjc.A.dylib 0x7fff803d5000 - 0x7fff8045dfe7 libsqlite3.0.dylib ??? (???) <3c7ab3523b816dbd3e039ee7e6e2c580> /usr/lib/libsqlite3.0.dylib 0x7fff8045e000 - 0x7fff80466ffa libbsm.dylib ??? (???) <4d838c0d8a74fe61c781a53a8723303d> /usr/lib/libbsm.dylib 0x7fff80467000 - 0x7fff80497fff com.apple.shortcut 1 (1.0) <9822328df9321a661af3afcc841e8f80> /System/Library/PrivateFrameworks/Shortcut.framework/Versions/A/Shortcut 0x7fff80498000 - 0x7fff8049bfff com.apple.securityhi 3.0 (30817) <00ddd6e60692b62b7649573eab8aef5a> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI .framework/Versions/A/SecurityHI 0x7fff8049c000 - 0x7fff8049efff com.apple.print.framework.Print 218.0.2 (220.1) <2b847a0a1cd885f596a4d10409d50ba3> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.fram ework/Versions/A/Print 0x7fff8049f000 - 0x7fff805dbfe9 com.apple.ImageIO.framework 2.0.4 (2.0.4) <47dcdc0b5986b2c157e0b6dae48ce464> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/ImageIO 0x7fff805dc000 - 0x7fff805f9fef com.apple.CoreVideo 1.5.1 (1.5.1) <78253b3fe8d3dcc90f159d7ed866c295> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x7fff805fa000 - 0x7fff8068bfff com.apple.SearchKit 1.2.1 (1.2.1) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Sear chKit.framework/Versions/A/SearchKit 0x7fff8068c000 - 0x7fff80e49fef libBLAS.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libBLAS.dylib 0x7fff80e4a000 - 0x7fff81416fff com.apple.CoreGraphics 1.407.2 (???) <436dbc70f8c9b29b3beb1d2de220acf2> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/CoreGraphics 0x7fff81417000 - 0x7fff8141dfff com.apple.DiskArbitration 2.2.1 (2.2.1) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitrat ion 0x7fff8141e000 - 0x7fff8145bff7 com.apple.SystemConfiguration 1.9.2 (1.9.2) <150119d0cecb0c80f6736b9881c2411e> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemCo nfiguration 0x7fff8145c000 - 0x7fff81523fec com.apple.CFNetwork 422.11 (422.11) <570ca46de3b907cb1c8e33fc62f562b4> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNe twork.framework/Versions/A/CFNetwork 0x7fff81524000 - 0x7fff8152dfff libCGATS.A.dylib ??? (???) <722a0bbd58740d46739008e881010631> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib 0x7fff8152e000 - 0x7fff81533fff com.apple.CommonPanels 1.2.4 (85) <2cec1ecc95cf1ecea8bea030975a46b8> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPane ls.framework/Versions/A/CommonPanels 0x7fff81534000 - 0x7fff817cffe3 com.apple.Foundation 6.5.7 (677.22) <8134977fcc57198a53dc494b60592980> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x7fff817d0000 - 0x7fff817d0ffd com.apple.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x7fff817d1000 - 0x7fff81cf1fc6 libGLProgrammability.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgra mmability.dylib 0x7fff81cf2000 - 0x7fff81cf4fff com.apple.NavigationServices 3.5.2 (163) <7cb7f3fe7f9d56ec89ef28a6d3a1da7d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Navigation Services.framework/Versions/A/NavigationServices 0x7fff81cf5000 - 0x7fff81d32fe7 com.apple.coreui 1.2 (62) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x7fff81d33000 - 0x7fff81d33fff com.apple.Carbon 136 (136) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x7fff81d34000 - 0x7fff81d42fff libCSync.A.dylib ??? (???) <61f6cc104b3e9b77cd583635a3a9a5cf> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x7fff81d43000 - 0x7fff81d45ff9 libRadiance.dylib ??? (???) <6d9f2235e8f70a7aedfc59383a7548d8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x7fff81d46000 - 0x7fff81db5ff9 com.apple.print.framework.PrintCore 5.5.3 (245.3) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/PrintCore.framework/Versions/A/PrintCore 0x7fff81db6000 - 0x7fff81db6ff8 com.apple.ApplicationServices 34 (34) <81cd02cc2ccf4e47e51d03db860da556> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Applicat ionServices 0x7fff81db7000 - 0x7fff81dd8fff libresolv.9.dylib ??? (???) <38318f9fbcfbdb384e0f9b08cc0e757a> /usr/lib/libresolv.9.dylib 0x7fff81dd9000 - 0x7fff81e4ffef libvMisc.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvMisc.dylib 0x7fff81e50000 - 0x7fff81e52ff7 libffi.dylib ??? (???) <920bb19728451f35703bb95dc908c7ca> /usr/lib/libffi.dylib 0x7fff81e53000 - 0x7fff81eeefe7 com.apple.ink.framework 101.3 (86) <60c6579faf114ea9677fd9ae25389ed2> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framew ork/Versions/A/Ink 0x7fff81eef000 - 0x7fff81f0dfff libPng.dylib ??? (???) <4017eab74319a648dfd73b7d503e557d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x7fff81f0e000 - 0x7fff81f24ff9 com.apple.ImageCapture 5.0.1 (5.0.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCaptu re.framework/Versions/A/ImageCapture 0x7fff81f25000 - 0x7fff81f3dfff com.apple.DictionaryServices 1.0.0 (1.0.0) <78ea11e9a92120f76d69efa24b8d1f95> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Dict ionaryServices.framework/Versions/A/DictionaryServices 0x7fff81f3e000 - 0x7fff81f42fff libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib 0x7fff81f43000 - 0x7fff81fe3fe3 com.apple.ApplicationServices.ATS 3.4 (???) <47cf09bf78935889f17f1b6b09badf0d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/ATS 0x7fff81fe4000 - 0x7fff8211bfff com.apple.CoreFoundation 6.5.5 (476.17) <51930d43c7c2d8fb24148cbfc05bba0f> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundatio n 0x7fff8211c000 - 0x7fff82126fff com.apple.speech.recognition.framework 3.7.24 (3.7.24) <2399374b096b284345daba82e2cb833d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechReco gnition.framework/Versions/A/SpeechRecognition 0x7fff82127000 - 0x7fff82159ff7 libauto.dylib ??? (???) /usr/lib/libauto.dylib 0x7fff8215a000 - 0x7fff821cefe7 libstdc++.6.dylib ??? (???) <565ee6f798f7fef6f804c60682787280> /usr/lib/libstdc++.6.dylib 0x7fff821cf000 - 0x7fff8228dfff edu.mit.Kerberos 6.0.12 (6.0.12) /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x7fff8228e000 - 0x7fff8228effb com.apple.installserver.framework 1.0 (8) /System/Library/PrivateFrameworks/InstallServer.framework/Versions/A/Install Server 0x7fff8228f000 - 0x7fff82293fff libGIF.dylib ??? (???) <66436b84211fe0e723051eab15af0aca> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x7fff82294000 - 0x7fff8258ffe3 com.apple.CoreServices.CarbonCore 786.10 (786.10) <2ac701edf3ca98a86ae9d5f733200b40> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Carb onCore.framework/Versions/A/CarbonCore 0x7fff82590000 - 0x7fff825aafff libvDSP.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvDSP.dylib 0x7fff825ab000 - 0x7fff827b1ff3 com.apple.security 5.0.4 (34102) <47c559b17c1f51998e7a981d0fbec4c8> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x7fff827b2000 - 0x7fff827d9fff libxslt.1.dylib ??? (???) /usr/lib/libxslt.1.dylib 0x7fff827da000 - 0x7fff82948fff libicucore.A.dylib ??? (???) <374ddaf141bf88dba00ab9058f2dbad6> /usr/lib/libicucore.A.dylib 0x7fff82949000 - 0x7fff8295dff7 libGL.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x7fff8295e000 - 0x7fff83286fff com.apple.AppKit 6.5.6 (949.43) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x7fff83287000 - 0x7fff83667fef com.apple.QuartzCore 1.5.7 (1.5.7) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x7fff83668000 - 0x7fff836b8fe7 com.apple.Metadata 10.5.2 (398.25) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Meta data.framework/Versions/A/Metadata 0x7fff836b9000 - 0x7fff836baff3 com.apple.audio.units.AudioUnit 1.5 (1.5) /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x7fff836bb000 - 0x7fff83710fe3 com.apple.HIServices 1.7.0 (???) <6bef766448d67adb91901b432629ea0f> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/HIServices.framework/Versions/A/HIServices 0x7fff83711000 - 0x7fff83711ffd com.apple.Accelerate.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/vecLib 0x7fff83712000 - 0x7fff837a7ffb com.apple.LaunchServices 290.3 (290.3) <56544e16c5192d2ce72df772901fcaef> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Laun chServices.framework/Versions/A/LaunchServices 0x7fff837a8000 - 0x7fff8382ffef com.apple.audio.CoreAudio 3.1.1 (3.1.1) <9c1714647fd7515c900362ad2ac76874> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x7fff83830000 - 0x7fff83893fef libGLU.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dyli b 0x7fff83894000 - 0x7fff838a2ff9 com.apple.helpdata 1.0.1 (14.2) /System/Library/PrivateFrameworks/HelpData.framework/Versions/A/HelpData 0x7fff838a3000 - 0x7fff838afff1 libgcc_s.1.dylib ??? (???) <23fa31a628c1ea8a62ac529fa333b6e1> /usr/lib/libgcc_s.1.dylib 0x7fff838b0000 - 0x7fff838d2fff libJPEG.dylib ??? (???) <4257ab268996bbeb93b47946df181cdc> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x7fff838d3000 - 0x7fff838d3ffd com.apple.Accelerate 1.4.2 (Accelerate 1.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x7fff838d4000 - 0x7fff838d4ff8 com.apple.Cocoa 6.5 (???) <8c59f679ffbd9178134df1d83dedde28> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa 0x7fff838d5000 - 0x7fff839cafff libxml2.2.dylib ??? (???) <8226d1180354f493954c5fa1fc0e1154> /usr/lib/libxml2.2.dylib 0x7fff839cb000 - 0x7fff839dafe7 com.apple.opengl 1.5.9 (1.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x7fff839db000 - 0x7fff83cc2feb com.apple.HIToolbox 1.5.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. framework/Versions/A/HIToolbox 0x7fff83cc3000 - 0x7fff83d03fef com.apple.framework.IOKit 1.5.1 (???) <17e6707127a60c5e2d7a9bd2b7bf2db0> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x7fff83d04000 - 0x7fff83dc8fe2 com.apple.vImage 3.0 (3.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage .framework/Versions/A/vImage 0x7fff83dc9000 - 0x7fff83df3fff libcups.2.dylib ??? (???) /usr/lib/libcups.2.dylib 0x7fff83df4000 - 0x7fff83df4ffa com.apple.CoreServices 32 (32) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x7fff83df5000 - 0x7fff83ed6fff libcrypto.0.9.7.dylib ??? (???) <66f1f8773bd9fdfdcfd09e2b4b010636> /usr/lib/libcrypto.0.9.7.dylib 0x7fff83ed7000 - 0x7fff83f87fef com.apple.CoreServices.OSServices 226.5 (226.5) <1c38f727b3ad3293272db7323b37c735> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSSe rvices.framework/Versions/A/OSServices 0x7fff83f88000 - 0x7fff83fa2fff com.apple.openscripting 1.2.8 (???) <0674c4e3353c677c9f58df3297ae559b> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScript ing.framework/Versions/A/OpenScripting 0x7fff83fa3000 - 0x7fff83fdfff7 libGLImage.dylib ??? (???) <02258bcdbe8defdb254acc077a81dd9b> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage. dylib 0x7fff83fe0000 - 0x7fff83ff1fff com.apple.speech.synthesis.framework 3.7.1 (3.7.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x7fff83ff2000 - 0x7fff8406cff3 com.apple.CoreText 2.0.3 (???) <827bbfef670df72316719c25bfb39915> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreText.framework/Versions/A/CoreText 0x7fff8406d000 - 0x7fff841f8ffb libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0x7fff841f9000 - 0x7fff8420affd libz.1.dylib ??? (???) /usr/lib/libz.1.dylib 0x7fff8420b000 - 0x7fff842befef com.apple.DesktopServices 1.4.7 (1.4.7) /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/D esktopServicesPriv 0x7fff842bf000 - 0x7fff84677fff libLAPACK.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libLAPACK.dylib 0x7fff84678000 - 0x7fff84743fef com.apple.ColorSync 4.5.1 (4.5.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ColorSync.framework/Versions/A/ColorSync 0x7fff84744000 - 0x7fff84847feb com.apple.CoreData 100.1 (186) <074abc7f43f81f7885e4d0674a8be4bc> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x7fffffe00000 - 0x7fffffe01780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0xfffffffffffec000 - 0xfffffffffffeffff libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib SYSTEM CONFIG Model: MacPro3,1, BootROM MP31.006C.B05, 8 processors, Quad-Core Intel Xeon, 2.8 GHz, 32 GB Graphics: kHW_ATIrv630Item, ATI Radeon HD 2600, spdisplays_pcie_device, 256 MB Memory Module: DIMM Riser B/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Bluetooth: Version 2.1.3f8, 2 service, 1 devices, 1 incoming serial ports Network Service: Ethernet 2, Ethernet, en1 PCI Card: ATI Radeon HD 2600, display, Slot-1 Serial ATA Device: WDC WD3200AAJS-41VWA0, 298.09 GB Parallel ATA Device: PIONEER DVD-RW DVR-112D USB Device: Keyboard Hub, (null) mA USB Device: Apple Optical USB Mouse, (null) mA USB Device: Apple Keyboard, (null) mA USB Device: hub_device, (null) mA USB Device: Apple Cinema HD Display, (null) mA USB Device: Keyspan USA-28Xb, (null) mA USB Device: Bluetooth USB Host Controller, (null) mA FireWire Device: built-in_hub, unknown_value, unknown_speed FireWire Device: My Book, WD, 800mbit_speed FireWire Device: unknown_device, unknown_value, unknown_speed -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From jaakko.sipari at gmail.com Thu Jan 22 03:00:03 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 22 Jan 2009 12:00:03 +0200 Subject: [Rxtx] RXTX compilation with GCJ possible? Message-ID: <901f25b80901220200s53792317o374b80cbb6066a52@mail.gmail.com> Hi! Does anyone have experience on using RXTX in a GCJ compiled Java application? I'm interested whether this is possible in Windows and/or in Linux platforms. And of course what does it take to get it work, or does it just work out of the box. Ultimately my aim here would be to move to a more time deterministic system by utilizing GCJ, jRate & Javolution and possibly run the RXTX (and other important) threads at a priority higher than the garbage collector. This of course would require some modification for the RXTX threads to run in a Javolution pool context or non allocating real time contexts so they wouldn't produce any garbage, but that's something to hack on later. For now I'd just like to know if there are any obstacles on the road to compiling & running RXTX with GCJ. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/5592681a/attachment-0013.html From jmudd at dtiweb.net Thu Jan 22 06:21:03 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Thu, 22 Jan 2009 08:21:03 -0500 Subject: [Rxtx] Hot unplugging of a USB device References: <4977BEEA.4020708@gatworks.com> Message-ID: U. George, Thanks for the information. How did you resolve your USB/GPS device on Linux? My application has to run on both Linux and Windows eventually. Thanks, Jerry -----Original Message----- From: U. George [mailto:netbeans at gatworks.com] Sent: Wednesday, January 21, 2009 7:34 PM To: Jerry Mudd Cc: rxtx at qbang.org Subject: Re: [Rxtx] Hot unplugging of a USB device > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From m.kirkland at comcast.net Thu Jan 22 09:21:01 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Thu, 22 Jan 2009 08:21:01 -0800 Subject: [Rxtx] Serial port control lines change with call to getPortIdentifiers() on Linux Message-ID: <94443DEFFD574B6CA8DDB2B201D9E007@bengal.net> Hi All ! I have noticed an issue with RXTX on Ubuntu Linux 8.10 that has prevented me from being able to use RXTX on Linux. I have noticed this issue on both the rxtx 2.1.7 and the new rxtx2.2pre1. When I execute the following line to get the ports on a system - java.util.Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); Both DTR and RTS become active on ttyS0 and only ttyS0, not ttyS1 (I only have 2 ports). I see this prior to opening any ports or making any other calls to RXTX. I have stepped it though with the debugger and I am sure this is the trigger. My application uses these control lines to perform functions other then the standard flow control so it is critical that I be able to control them exactly. I would also think that folks using RXTX for more standard serial IO would also have issues with devices starting to talk before a listener was ready. I checked Windows XP and I do not see this issue (but I only have a com1 on the Windows computer). I also noticed that the DTR line blips when setting up a port on 2.2.pre1 like it does on 2.1.7r2. This it the same issue that the folks at http://www.codeskin.com/ patched. I see this issue on both Linux and Windows XP. Any help or clues would be greatly appreciated. If I can provide any additional info or do any testing I would be glad to help out to get version 2.2 in top shape for release. BTW I have written a simple dynamic loader to load the RXTX jar and native code that is drive by the os.name and os.arch system properties. I would be more then happy to contribute this to the project if folks though it would be useful. Its more convenient then having to manage copying the files around to various JVM's. TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/eab26bae/attachment-0012.html From josefk_5 at yahoo.com Fri Jan 23 09:44:06 2009 From: josefk_5 at yahoo.com (Josef Kahsay) Date: Fri, 23 Jan 2009 08:44:06 -0800 (PST) Subject: [Rxtx] Help on Accessing RS232 Message-ID: <509617.88308.qm@web38205.mail.mud.yahoo.com> Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS From m.kirkland at comcast.net Sat Jan 24 01:28:52 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Sat, 24 Jan 2009 00:28:52 -0800 Subject: [Rxtx] Help on Accessing RS232 In-Reply-To: <509617.88308.qm@web38205.mail.mud.yahoo.com> References: <509617.88308.qm@web38205.mail.mud.yahoo.com> Message-ID: <665887C02E1446708CE392FE0BD73D79@bengal.net> It seems to me that you are having a classic java classpath issue. Java classpath issues can be annoying to solve sometimes. As some random guesses I would suggest you look at the following. 1 - You might not be running the JVM from the location that you think you are (gets me all the time). I which Windows had a which command. 2 - You don't mention what development environment you are using like Eclipse etc., and if you are trying to run the demo from inside the development environment. If so, do whatever is appropriate for the development environment to control the classpath. In Eclipse this would involve adding a "User Library" to point to the jar and native code. 3 - Once you get the classpath ok, the next thing you might run into is not being able to load the native library. 4 - I have found that on XP I can place the RXTX jar and native library in the same directory as my application's jar file (and a class-path entry in the application's jar file manifest) and it all works. 5 - If you need more control of managing different versions of RXTX for different OS platforms, I have a dynamic RXTX loader I can send you (but I recommend getting the simple case working first). Let me know if this helps. Mike -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Josef Kahsay Sent: Friday, January 23, 2009 8:44 AM To: rxtx at qbang.org Subject: [Rxtx] Help on Accessing RS232 Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jacomoman at hotmail.com Mon Jan 26 12:12:27 2009 From: jacomoman at hotmail.com (Joseph Schmoley) Date: Mon, 26 Jan 2009 11:12:27 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: Message-ID: Hi All, First, let me thank you all for your effort on this excellent project. I've been using the Win32 binaries in the 2.1-7r2 package without any problems on WinXP Pro (32-bit). I then tried the .jnilib of the same version on my Mac OSX 10.5 64-bit darwin and got the familiar UnsatisfiedLinkError problem. I read up on all the mailing list archive messages and found this one (http://mailman.qbang.org/pipermail/rxtx/2008-May/2436699.html) suggesting that perhaps rxtx-devel from CVS would have a fix. So I got latest rxtx-devel + commapi-0-0-1 as suggested by the CVS page at rxtx.org. I even set my CFLAGS and LDFLAGS to include "-arch x86_64 -arch ppc64", but as it turned out, the latest configure script didn't need it. In any case, I configured and built rxtx-devel with no errors (that I could see) and transferred the resulting i386-apple-darwin9.6.0/librxtxSerial.jnilib to where my java.library.path is pointing to and ran my test class. Whereas before I was getting UnsatisfiedLinkError, I now simply get this: Invalid memory access of location 22d927c8 rip=22356420 Invalid memory access of location 22d9292c rip=22357540 [error occurred during error reporting (null), id 0xa] ./run-class.sh: line 10: 15647 Segmentation fault java -Djava.library.path=./lib/native -Dapp.logging.file.path=./log/runtime.log -classpath .:${MYCP} ${CLASSNAME} "${CMD}" run-class.sh is simply a script I've got to run my test class and all that class does is invoke the RXTX API, first one being: CommPortIdentifier.getPortIdentifiers(). Has anyone had any luck with getting latest CVS sources to work on Mac OS X 10.5 64-bit? Any help/pointers would be greatly appreciated. Thank you in advance. -Jac I've attached my configure and make output as txt files. Here's all my build/machine environment info, as per the troubleshooting wiki page: Mac OS X 10.5.6 (9G55) ----------------------------------------------- /usr/bin/java -version java version "1.6.0_07" Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153) Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode) ----------------------------------------------- Darwin my-macbook.local 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 ----------------------------------------------- autoconf (GNU Autoconf) 2.61 Copyright (C) 2006 Free Software Foundation, Inc. This is free software. You may redistribute copies of it under the terms of the GNU General Public License . There is NO WARRANTY, to the extent permitted by law. Written by David J. MacKenzie and Akim Demaille. ----------------------------------------------- automake (GNU automake) 1.10 Written by Tom Tromey and Alexandre Duret-Lutz . Copyright 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ----------------------------------------------- $ libtool -V Apple Computer, Inc. version cctools-698.1 ----------------------------------------------- GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program built for powerpc-apple-darwin9.0 ----------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: my-configure.out.txt Type: application/octet-stream Size: 6934 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090126/89d9c7f6/attachment-0016.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: my-make.out.txt Type: application/octet-stream Size: 7737 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090126/89d9c7f6/attachment-0017.obj From kintel at sim.no Mon Jan 26 16:16:19 2009 From: kintel at sim.no (Marius Kintel) Date: Tue, 27 Jan 2009 00:16:19 +0100 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: Message-ID: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Hi Jac, I've had the same issue, and I suggested a patch to partially fix it a while back: http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html I don't know the status of this in the current incarnation of the rxtx code and I have reverted to Java-1.5 since then.. ~/= Marius -- We are Elektropeople for a better living. From tjarvi at qbang.org Tue Jan 27 08:08:54 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 27 Jan 2009 08:08:54 -0700 (MST) Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: On Tue, 27 Jan 2009, Marius Kintel wrote: > Hi Jac, > > I've had the same issue, and I suggested a patch to partially fix it a > while back: > http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html > > I don't know the status of this in the current incarnation of the rxtx > code and I have reverted to Java-1.5 since then.. > > ~/= Marius > > -- > We are Elektropeople for a better living. > Hmm. That did not get in. I can add it and put a new prerelease out this week. The eis must be a regression. I was sure we fixed that. -- Trent Jarvi tjarvi at qbang.org From jacomoman at hotmail.com Tue Jan 27 08:48:16 2009 From: jacomoman at hotmail.com (Joseph Schmoley) Date: Tue, 27 Jan 2009 07:48:16 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: That would be excellent Trent. I've got a project partially on hold because of this. It runs great on Win32 (XP/Vista), it just has to do the same on Mac 64-bit and Linux 32-bit. I look forward to this pre-release. Again, thanks a bunch to you and all the other code contributors for this excellent project. I wish I could donate something to you guys. I couldn't find a donation link anywhere. RxTx has been a great help with my project. -Jac From: Trent Jarvi Sent: Tuesday, January 27, 2009 7:08 AM To: Marius Kintel Cc: Joseph Schmoley ; rxtx at qbang.org Subject: Re: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit On Tue, 27 Jan 2009, Marius Kintel wrote: > Hi Jac, > > I've had the same issue, and I suggested a patch to partially fix it a > while back: > http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html > > I don't know the status of this in the current incarnation of the rxtx > code and I have reverted to Java-1.5 since then.. > > ~/= Marius > > -- > We are Elektropeople for a better living. > Hmm. That did not get in. I can add it and put a new prerelease out this week. The eis must be a regression. I was sure we fixed that. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090127/bbd287bb/attachment-0007.html From bschlining at gmail.com Tue Jan 27 09:38:26 2009 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 27 Jan 2009 08:38:26 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: > That would be excellent Trent. I've got a project partially on hold > because of this. It runs great on Win32 (XP/Vista), it just has to do the > same on Mac 64-bit and Linux 32-bit. I look forward to this pre-release. > I'm in the same spot too. Looking forward to the pre-release! -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090127/2275013b/attachment-0007.html From andrew.paverd at rorotika.com Wed Jan 28 03:14:58 2009 From: andrew.paverd at rorotika.com (Andrew Paverd) Date: Wed, 28 Jan 2009 12:14:58 +0200 Subject: [Rxtx] RXTX not working on Solaris Message-ID: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Hi all, I am attempting to use RXTX on a Sun SPARC server running Solaris. I have tried the binaries from both the latest release (2.1-7) and the pre-release (2.2pre1). The 2.1-7 driver gives the following error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: fatal: libgcc_s.so.1: open failed: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)" I'm not sure what this "libgcc_s.so.1" file does in terms of RXTX but its absence is preventing the application from running. With the 2.2pre1 binary, the application loads without any issue but does not detect any comm-ports. I know that there are multiple ports available because when using the Sun javax.comm library for Solaris SPARC, the ports are all correctly discovered and the application can read from and write to them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in the 2.2 release. Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if so, how did you do it (which versions did you use etc.)? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090128/a97b220d/attachment-0007.html From tjarvi at qbang.org Wed Jan 28 17:01:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 28 Jan 2009 17:01:50 -0700 (MST) Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: On Wed, 28 Jan 2009, Andrew Paverd wrote: > > Hi all, > > ? > > I am attempting to use RXTX on a Sun SPARC server running Solaris. I have > tried the binaries from both the latest release (2.1-7) and the pre-release > (2.2pre1). > > ? > > The 2.1-7 driver gives the following error: > > ? > > ?Exception in thread "main" java.lang.UnsatisfiedLinkError: > /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: > fatal: libgcc_s.so.1: open failed: No such file or directory > > ??????? at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > ??????? at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) > > ??????? at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) > > ??????? at java.lang.Runtime.loadLibrary0(Runtime.java:823) > > ??????? at java.lang.System.loadLibrary(System.java:1030) > > ??????? at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)? > > ? > > I?m not sure what this ?libgcc_s.so.1? file does in terms of RXTX but its > absence is preventing the application from running. > > ? > > With the 2.2pre1 binary, the application loads without any issue but does > not detect any comm-ports. I know that there are multiple ports available > because when using the Sun javax.comm library for Solaris SPARC, the ports > are all correctly discovered and the application can read from and write to > them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in > the 2.2 release. > > ? > > Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if > so, how did you do it (which versions did you use etc.)? > > ? Hi Andrew ld.so/libgcc_s.so are part of GNU gcc/ld. They are available for solaris. I'm not sure how to link them without requiring them. It is also possible to compile rxtx with Sun's compiler if you have it. Perhaps someone here knows how to get rxtx compiled on Solaris using gcc without requiring those libs by everyone? -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Jan 28 17:39:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 28 Jan 2009 17:39:08 -0700 (MST) Subject: [Rxtx] Problem on 'Trouble Shooting' wiki page. Message-ID: It has been pointed out that the rxtx wiki page says usermod -G may be used to update the group a user is in. http://rxtx.qbang.org/wiki/index.php/Trouble_shooting The corrected text now says to use usermod -aG to add the user to a group in addition to their current group(s). The previous -G version would replace the users current groups with the new group. Replacing group information can cause significant problems for end users. If you have information based upon the wiki, please update your content. Thanks, -- Trent Jarvi tjarvi at qbang.org From andrew.paverd at rorotika.com Thu Jan 29 02:15:35 2009 From: andrew.paverd at rorotika.com (Andrew Paverd) Date: Thu, 29 Jan 2009 11:15:35 +0200 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Thanks for the advice Trent - I was originally using the precompiled librxtxSerial.so. I've subsequently compiled rxtx for Solaris (using gcc) and after copying the libgcc_s.so file to my .../jre/lib/sparc directory, the library loads. However, it does not detect any ports. When I call the getComPortIdentifiers() nothing is returned and I can't connect to any port. Sun's javax.comm package detects and can connect to all the ports. This is the same as when I tried the 2.2pre1 library. Are there any extra steps that must be taken to detect ports on Solaris? (user is member of uucp group) Thanks, Andrew From tristan.dyer at cgi.com Thu Jan 29 05:57:25 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 29 Jan 2009 07:57:25 -0500 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D030BE152@MTL-MSG-02.cgiclients.com> Andrew, I had the same problem, but before I got too far the scope of my project changed, and I don't have to support Solaris anymore.. I was getting a weird error, file does not exist but should, or something like that. The project ended before I figured out why. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Andrew Paverd Sent: January 29, 2009 5:16 AM To: 'Trent Jarvi' Cc: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working on Solaris Thanks for the advice Trent - I was originally using the precompiled librxtxSerial.so. I've subsequently compiled rxtx for Solaris (using gcc) and after copying the libgcc_s.so file to my .../jre/lib/sparc directory, the library loads. However, it does not detect any ports. When I call the getComPortIdentifiers() nothing is returned and I can't connect to any port. Sun's javax.comm package detects and can connect to all the ports. This is the same as when I tried the 2.2pre1 library. Are there any extra steps that must be taken to detect ports on Solaris? (user is member of uucp group) Thanks, Andrew _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Martin.Oberhuber at windriver.com Thu Jan 29 06:15:01 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:15:01 +0100 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2326@ism-mail03.corp.ad.wrs.com> Hi Andrew & Paverd, the trick of compiling with gcc on Solaris such that the libgcc_s.so library is not needed at runtime is that gcc itself must be configured and compiled with special options: cd gcc-src ./configure --disable-shared make Using that specially compiled gcc, you can then build the RXTX library: setenv PATH $HOME/my-gcc/bin:$PATH cd rxtx mkdir build-solaris && cd build-solaris ../configure --disable-lockfiles make For more details, see the original bug and its attachments: http://bugzilla.qbang.org/show_bug.cgi?id=73 An rxtx-2.1-7r2 build for Solaris without libgcc_s dependency is available from the Eclipse packages at http://rxtx.qbang.org/eclipse/downloads/ Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Andrew Paverd Sent: Mittwoch, 28. J?nner 2009 11:15 To: rxtx at qbang.org Subject: [Rxtx] RXTX not working on Solaris Hi all, I am attempting to use RXTX on a Sun SPARC server running Solaris. I have tried the binaries from both the latest release (2.1-7) and the pre-release (2.2pre1). The 2.1-7 driver gives the following error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: fatal: libgcc_s.so.1: open failed: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)" I'm not sure what this "libgcc_s.so.1" file does in terms of RXTX but its absence is preventing the application from running. With the 2.2pre1 binary, the application loads without any issue but does not detect any comm-ports. I know that there are multiple ports available because when using the Sun javax.comm library for Solaris SPARC, the ports are all correctly discovered and the application can read from and write to them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in the 2.2 release. Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if so, how did you do it (which versions did you use etc.)? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090129/d6d73f3e/attachment-0006.html From Martin.Oberhuber at windriver.com Thu Jan 29 06:16:38 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:16:38 +0100 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E232A@ism-mail03.corp.ad.wrs.com> Hi Andrew, one thing I did notice on Solaris was that after closing a port, the Solaris Kernel seems to have some timeout before it can be re-opened. So, when you try it again, make sure that no other application hogs the port or has been hogging it shortly before. It may make sense to try a few times. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Andrew Paverd > Sent: Donnerstag, 29. J?nner 2009 10:16 > To: 'Trent Jarvi' > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX not working on Solaris > > Thanks for the advice Trent - I was originally using the > precompiled librxtxSerial.so. I've subsequently compiled rxtx > for Solaris (using gcc) and after copying the libgcc_s.so > file to my .../jre/lib/sparc directory, the library loads. > > However, it does not detect any ports. When I call the > getComPortIdentifiers() nothing is returned and I can't > connect to any port. Sun's javax.comm package detects and can > connect to all the ports. This is the same as when I tried > the 2.2pre1 library. > > Are there any extra steps that must be taken to detect ports > on Solaris? (user is member of uucp group) > > Thanks, > > > Andrew > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From Martin.Oberhuber at windriver.com Thu Jan 29 06:24:05 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:24:05 +0100 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2335@ism-mail03.corp.ad.wrs.com> Hi Greg, sorry for the late response (just catching up on E-Mails). I do not plan to create any Eclipse bundles before rxtx-2.2 is released. Creating the packages is a bit of an effort, which I'd rather postpone until the release, and then do it only once. In the meantime, if you need it for testing, I think it should be easy to take the existing Eclipse bundles/fragments and simply replace any new DLL's / so's in them, plus use WinZIP to replace the .class files in the Java bundle. For Eclipse, it will still look like rxtx-2.1-7 but in reality it will be your own latest build. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Trent Jarvi > Sent: Sonntag, 04. J?nner 2009 20:42 > To: Greg Johnson > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] [Announce] RXTX 2.2pre1 is available. > > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse > packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be > a popular > spam abuse page. I'll put a license and download link on there. All > other pages are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > > > Hi Trent, > > The download link on rxtx.org > (http://users.frii.com/jarvi/rxtx/) loops back > > to rxtx.org, and the wiki doesn't seem to have a link (top > level at least) to > > download. I think Martin had been generating > (fantastically useful) Eclipse > > bundles, as well - are these available for 2.2pre1 also? > > > > Many thanks to everyone for their work - rxtx is an > essential part of our > > product, and we have been keenly awaiting this release. > > > > Regards, > > greg > > > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > > > >> > >> The binaries, source and pending wiki move are now announced on > >> http://www.rxtx.org. After this has baked, we can put > the web install in. > >> > >> Changes in rxtx 2.2 (If I missed something let me know): > >> ... snip ... > >> > >> -- > >> Trent Jarvi > >> tjarvi at qbang.org_______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > -- > > Greg Johnson, PhD > > Director of Engineering > > http://www.rbr-global.com > > greg.johnson at rbr-global.com > > +1.613.233.1621 (GMT-5) office > > > > > > See us at: Ocean Business 2009, Southampton, England, March > 31 - April 1, > > 2009 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From Martin.Oberhuber at windriver.com Thu Jan 29 06:32:57 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:32:57 +0100 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> Hi Tristan, > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); I think that this code is wrong. User code must not call the RXTXCommDriver constructor, since you cannot initialize it properly. What you can do to announce previously unknown port names is this: System.setProperty("gnu.io.rxtx.SerialPorts","/dev/term/a"); before you first access any RXTX function. For details, see the code in RXTXCommDriver#registerSpecifiedPorts() > What is the output of System.getProperty("os.name") on OpenSolaris? I didn't see any response of yours to this question from Trent. What does OpenSolaris output? Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Trent Jarvi > Sent: Mittwoch, 31. Dezember 2008 20:04 > To: Dyer, Tristan > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX for OpenSolaris 2008.11 > > > > On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > > > > Hi, > > > > I have tried building the rxtx library for OpenSolaris 2008.11. > > > > It seemed to build fine without errors, however code such as > > > > ????? java.util.Enumeration portList > > ???????? = CommPortIdentifier.getPortIdentifiers(); > > ????? boolean found = false; > > ????? while (portList.hasMoreElements()) { > > ???????? portId = (CommPortIdentifier) portList.nextElement(); > > ???????? System.out.println(" " + portId.getName()); > > ???????? if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > > ?????????? ???? ?? System.out.println("found"); > > ?????????????? found = true; > > ?????????????? break; > > ??????????? } > > ???????? } > > ????? } > > Will output nothing. > > > > Or rather it seems as if there are no ports found by RXTX. > This code works > > on Ubuntu8.04 and winXP. > > > > If I Add the port manually and then try and open the port > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > > ????? try{ > > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > > ????? } > > ????? catch(Exception e){ > > ??? ??? ? System.out.println("NoSuchPortException"); > > ??? ??? ? //ignore > > ????? } > > ????? try { > > ??????? ???????? System.out.println("opening port"); > > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > > WAIT_TO_OPEN); > > ??????????? connected = true; > > ??????????? System.out.println("Connected to port " + > portId.getName()); > > ???????? } catch (PortInUseException p) { > > ??????????? if (DEBUG) { > > ?????????????? System.err.println(p); > > ??????????? } > > ??????????? port = null; > > ??????????? portId = null; > > ??????????? System.out.println("PortInUseException"); > > ??????????? p.printStackTrace(); > > ???????? } > > > > I will get the following, but not the NoSuchPortException. > > > > java.lang.reflect.InvocationTargetException > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Caused by: java.lang.NullPointerException > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:296) > > > > ??????? ... 7 more > > > > > > As well as > > > > java.lang.NullPointerException > > ??????? at > gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > > ??????? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > > ??????? at > > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:255) > > > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > > > Did I build it wrong? Or is there a problem with > OpenSolaris that will > > prevent this from working? Or am I missing something > incredibly simple? > > > > As well OpenSolaris is running inside a VM with COM1 mapped to > > COM1(VirtualBox) which I believe maps it to /dev/term/a > > > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > > > > > Hi Tristan? > > What is the output of System.getProperty("os.name") on > OpenSolaris? We > have logic like the following in RXTX to handle platform specific > information: > > if ( osName.equals("Solaris") || osName.equals("SunOS")) > > Which may not be getting hit. The result if you will never > call private > void checkSolaris(String PortName, int PortType). > > It could also result in Solaris specific settings not being > set in the > Makefile. > > > The os.name is displayed when you run the configure script. > > -- > Trent Jarvi > tjarvi at qbang.org > From Martin.Oberhuber at windriver.com Thu Jan 29 06:38:20 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:38:20 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] how do you dynamically reload native libraries? In-Reply-To: References: Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2341@ism-mail03.corp.ad.wrs.com> Hi Douglas, Eclipse / OSGi may be doing what you want. It does say that multiple versions of a lib can co-exist at the same time, when the MANIFEST.MF doesn't specify a lib as a singleton. I'm not sure though if or how that would work with native libs. Eclipse bundles for RXTX-2.1-7r2 are available on http://rxtx.qbang.org/eclipse/downloads/ You could build RXTX-2.2pre and then manually create those Eclipse bundles just by adding the MANIFEST.MF to the JAR with the version number exchanged. Then you should be able to try it out. If you do, let me know how it goes... Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Samstag, 27. Dezember 2008 15:00 > To: rxtx at qbang.org; lyon at docjava.com > Subject: [Suspected Spam][Blocked Sender][Rxtx] how do you > dynamically reload native libraries? > > Hi All, > I am trying to test multiple versions of the RXTX native libraries > in a single JVM. > > Each RXTX library instance can share a single virtual machine, but > must have an isolated context class loader. > A context class loader maps a thread to specific classes and > resources. > When the thread dies, the classes and resources are freed. > > Is there some way to have multiple context class loaders that can > load different native method > library implementations? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Thu Jan 29 07:50:05 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 29 Jan 2009 09:50:05 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D030BE22B@MTL-MSG-02.cgiclients.com> Sorry, I had sent it to Trent alone. It outputs "SunOS" Also I had only added that line as a test to see if explicitly adding the port would make a difference, it didn't. My project scope has been reduced so I don't need to support solaris anymore, but I will return to the problem when things slow down. I do remember that the error that was being reported by the native code was "2" which I believe maps to "ENOENT No such file or directory A file name is specified and the file should exist but doesn't, or one of the directories in a path name does not exist." I didn't get much farther. Thanks, -- Tristan Dyer -----Original Message----- From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] Sent: January 29, 2009 9:33 AM To: Trent Jarvi; Dyer, Tristan Cc: rxtx at qbang.org Subject: RE: [Rxtx] RXTX for OpenSolaris 2008.11 Hi Tristan, > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); I think that this code is wrong. User code must not call the RXTXCommDriver constructor, since you cannot initialize it properly. What you can do to announce previously unknown port names is this: System.setProperty("gnu.io.rxtx.SerialPorts","/dev/term/a"); before you first access any RXTX function. For details, see the code in RXTXCommDriver#registerSpecifiedPorts() > What is the output of System.getProperty("os.name") on OpenSolaris? I didn't see any response of yours to this question from Trent. What does OpenSolaris output? Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Mittwoch, 31. Dezember 2008 20:04 > To: Dyer, Tristan > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX for OpenSolaris 2008.11 > > > > On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > > > > Hi, > > > > I have tried building the rxtx library for OpenSolaris 2008.11. > > > > It seemed to build fine without errors, however code such as > > > > ????? java.util.Enumeration portList > > ???????? = CommPortIdentifier.getPortIdentifiers(); > > ????? boolean found = false; > > ????? while (portList.hasMoreElements()) { > > ???????? portId = (CommPortIdentifier) portList.nextElement(); > > ???????? System.out.println(" " + portId.getName()); > > ???????? if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > > ?????????? ???? ?? System.out.println("found"); > > ?????????????? found = true; > > ?????????????? break; > > ??????????? } > > ???????? } > > ????? } > > Will output nothing. > > > > Or rather it seems as if there are no ports found by RXTX. > This code works > > on Ubuntu8.04 and winXP. > > > > If I Add the port manually and then try and open the port > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > > ????? try{ > > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > > ????? } > > ????? catch(Exception e){ > > ??? ??? ? System.out.println("NoSuchPortException"); > > ??? ??? ? //ignore > > ????? } > > ????? try { > > ??????? ???????? System.out.println("opening port"); > > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > > WAIT_TO_OPEN); > > ??????????? connected = true; > > ??????????? System.out.println("Connected to port " + > portId.getName()); > > ???????? } catch (PortInUseException p) { > > ??????????? if (DEBUG) { > > ?????????????? System.err.println(p); > > ??????????? } > > ??????????? port = null; > > ??????????? portId = null; > > ??????????? System.out.println("PortInUseException"); > > ??????????? p.printStackTrace(); > > ???????? } > > > > I will get the following, but not the NoSuchPortException. > > > > java.lang.reflect.InvocationTargetException > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Caused by: java.lang.NullPointerException > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:296) > > > > ??????? ... 7 more > > > > > > As well as > > > > java.lang.NullPointerException > > ??????? at > gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > > ??????? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > > ??????? at > > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:255) > > > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > > > Did I build it wrong? Or is there a problem with > OpenSolaris that will > > prevent this from working? Or am I missing something > incredibly simple? > > > > As well OpenSolaris is running inside a VM with COM1 mapped to > > COM1(VirtualBox) which I believe maps it to /dev/term/a > > > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > > > > > Hi Tristan > > What is the output of System.getProperty("os.name") on OpenSolaris? > We have logic like the following in RXTX to handle platform specific > information: > > if ( osName.equals("Solaris") || osName.equals("SunOS")) > > Which may not be getting hit. The result if you will never call > private void checkSolaris(String PortName, int PortType). > > It could also result in Solaris specific settings not being set in the > Makefile. > > > The os.name is displayed when you run the configure script. > > -- > Trent Jarvi > tjarvi at qbang.org > From hho at bibliotheca.dk Thu Jan 29 08:00:49 2009 From: hho at bibliotheca.dk (Hans Hvelplund Odborg) Date: Thu, 29 Jan 2009 16:00:49 +0100 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: I know that there arent any guarantees, but could someone involved with the development of RxTx please guesstimate when 2.2 final will be released? I'm not familiar with the pre-release history of 2.1-7 but I read that there was 20 pre-relases of 2.1-7 so I guess (based on current pre-release rate) that 2.2 may easily be more than 6 months away? Thanks Med venlig hilsen / Best regards / Med v?nliga h?lsningar Hans Hvelplund Odborg BIBLIOTHECA A/S Vallensb?kvej 22A, 2. TH ? 2605 Br?ndby ? Denmark Mob.: +45 30235940 Tel.: +45 70271008 Fax: +45 70271009 hho at bibliotheca.dk www.bibliotheca.dk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: 4. januar 2009 20:15 To: rxtx at qbang.org Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Jan 29 08:33:33 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 29 Jan 2009 08:33:33 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: Projects tend to evolve from an adhoc release process to predictable releases when enough projects demand it (and help make it happen). "Its ready when Its ready" is a typical answer prior to the above. I lik$ to say "The beatings will continue until moral improves." I expect moral to improve in the next six months at most. This release i$ resolving 3 larger issues. 1) syncing of some large efforts to the same source code. 2) incorperating all community patches 3) building the binaries correctly. This does not include fixing everyones bugs. But it does include making sure the fixes get in if they are provided. Given the above, I don't expect this to be as drawn out as 2.1-7pre*. We may have several stable releases during the same period. On Thu, 29 Jan 2009, Hans Hvelplund Odborg wrote: > I know that there arent any guarantees, but could someone involved with the > development of RxTx please guesstimate when 2.2 final will be released? > > I'm not familiar with the pre-release history of 2.1-7 but I read that there > was 20 pre-relases of 2.1-7 so I guess (based on current pre-release rate) > that 2.2 may easily be more than 6 months away? > > Thanks > > Med venlig hilsen / Best regards / Med v?nliga h?lsningar > Hans Hvelplund Odborg > > BIBLIOTHECA A/S > Vallensb?kvej 22A, 2. TH ? 2605 Br?ndby ? Denmark > Mob.: +45 30235940 > Tel.: +45 70271008 > Fax: +45 70271009 > hho at bibliotheca.dk > www.bibliotheca.dk > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: 4. januar 2009 20:15 > To: rxtx at qbang.org > Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. > > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org. After this has baked, we can put the web install > in. > > Changes in rxtx 2.2 (If I missed something let me know): > > threshold fix > Alexandre Rusev > http://bugzilla.qbang.org/show_bug.cgi?id=85 > > RXTX close deadlocks in REXTXPort.finalize > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=53 > > Add ACM serial devices to all known ports. > Duncan Pierce > http://bugzilla.qbang.org/show_bug.cgi?id=51 > > Concurrency fixes for SMP/multicore systems > U. George > http://bugzilla.qbang.org/show_bug.cgi?id=100 > > Fixes for MAC systems with no drivers installed. > 1.5 stop bit fix > > Enable universal library builds for Mac OS X > Andre-John Mas ajmas at sympatico.ca > > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > Do not remove and ignore interrupts. > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=45 > > find ports which were added after program startup on Mac > OS X. > Martin Oberhuber > http://bugzilla.qbang.org/show_bug.cgi?id=48 > > Clean up CommPort Ownership code, avoid possible deadlocks, > fix lost commport ownership events. > Martin Oberhuber > http://bugzilla.qbang.org/show_bug.cgi?id=83 > > rxtx does not compile against JDK-1.6 > Neboj?a > http://bugzilla.qbang.org/show_bug.cgi?id=84 > > configure script failed at line UTS_RELEASE > megov > http://bugzilla.qbang.org/show_bug.cgi?id=80 > > code cleanup patch (extra ';' creates bug for if statements > + new String() calls removed) > Xavier Le Vourch > http://bugzilla.qbang.org/show_bug.cgi?id=77 > > Wont compile on linux ppc with glibc 2.5 - no sys/io.h > Brian Johnson > http://bugzilla.qbang.org/show_bug.cgi?id=72 > > rxtx overwrites System properties > Andrew Gillett > Nektarios K. Papadopoulos > Neboj?a > http://bugzilla.qbang.org/show_bug.cgi?id=64 > > Solaris ACM port support > Dave Cleal > http://bugzilla.qbang.org/show_bug.cgi?id=59 > > Setting of non-standard baud rate fails. > Andrew Prunicki > http://bugzilla.qbang.org/show_bug.cgi?id=58 > > RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=50 > > JavaDoc fixes > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > From mmornati at byte-code.com Fri Jan 30 02:32:44 2009 From: mmornati at byte-code.com (Marco Mornati) Date: Fri, 30 Jan 2009 10:32:44 +0100 Subject: [Rxtx] Linux Library Message-ID: <1233307964.4046.19.camel@localhost.localdomain> Hello, I made a little Applet added to my web application to support BarCode printer (on serial port). All is autoconfigured during applet init: dll/so are copied on /tmp folder on local computer and with System.load(/tmp/library.so/dll) I'm adding the library to classpath. On windows all works correctly and I'm able to print (jar is signed... without signing it there's no way to communicate with serial port). I've just a little problem on linux. It seams that library is not added to classpath, because when I try to connect with com port, applet says that is impossible to find .so. Any idea on what could be the problem? Just for information I post here my code: Container content = getContentPane(); content.setBackground(Color.white); content.setLayout(new FlowLayout()); String libraryFile = ""; String libraryName = ""; if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")) { libraryName = DLL_SERIAL_NAME; libraryFile = System.getProperty("java.io.tmpdir") + DLL_SERIAL_NAME; } else if (System.getProperty("os.name").toUpperCase().contains("LINUX")) { if (System.getProperty("os.arch").contains("i386")) { libraryName = SO_SERIAL_NAME_32; } else { libraryName = SO_SERIAL_NAME_64; } char fileSeparator = System.getProperty("file.separator").charAt(0); libraryFile = System.getProperty("java.io.tmpdir") + fileSeparator + SO_SERIAL_NAME; } System.out.println("Library File: " + libraryFile); /** * Copying DLL to java bin dir (if it's not already present) */ if (!verifyLibraryExistence(libraryFile)) { System.out.println("Library file does not exist"); copyResourceFromJar(libraryFile, libraryName); } try { System.load(libraryFile); } catch (Exception e) { System.out.println("Cannot load " + libraryFile + " you have to install it manually!!"); } try { content.add(new JLabel("Initializing Applet!")); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); content.add(new JLabel("List Porte: " + portList)); if (portList == null) { content.add(new JLabel("No Serial Port Found!!")); } while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL)) { System.out.println("Porta Trovata: " + portId.getName()); content.add(new JLabel("Porta Trovata: " + portId.getName())); } break; } } catch (Exception e) { content.add(new JLabel("Exception: " + e)); e.printStackTrace(); } Thanks a lot Bye Marco -- Dott. Ing. Mornati Marco Byte-Code s.r.l via Antonio Cechov, 1 San Giuliano Milanese (MI) E-Mail: mmornati at byte-code.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090130/c176573f/attachment-0005.bin From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0031.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0031.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0029.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0029.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0029.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0029.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0028.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0026.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0026.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0026.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0026.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0026.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0023.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0023.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0023.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment-0022.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0022.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment-0022.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment-0022.html From tjarvi at qbang.org Wed Jan 14 18:56:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 14 Jan 2009 18:56:50 -0700 (MST) Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Message-ID: On Wed, 14 Jan 2009, Jaakko Sipari wrote: > Hi (again)! > > Could someone clarify what these methods actually do and are they even > implemented? Do I get into trouble with buffer values of 0 (if I want to > handle the buffers myself)? > rxtx does not have buffers. It was not clear to me at the time why there would be a buffer when java already provides buffered input and output streams that can sit on top of rxtx. One reason I can see for implementing buffers in rxtx is to get data off the port so select() can block. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Wed Jan 14 23:23:08 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 15 Jan 2009 08:23:08 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> Message-ID: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Here's the same message for the list also. Forgot to do "Reply to all" ---------- Forwarded message ---------- From: Jaakko Sipari Date: Thu, Jan 15, 2009 at 8:22 AM Subject: Re: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize To: Trent Jarvi On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! >> >> Could someone clarify what these methods actually do and are they even >> implemented? Do I get into trouble with buffer values of 0 (if I want to >> handle the buffers myself)? >> >> > rxtx does not have buffers. It was not clear to me at the time why there > would be a buffer when java already provides buffered input and output > streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data off > the port so select() can block. > So basically those methods have currently no effect at all? - Jaakko -- Jaakko Sipari tel. +358451238191 eMail. jaakko.sipari at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090115/8b4c47c0/attachment-0021.html From tjarvi at qbang.org Thu Jan 15 18:37:12 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 15 Jan 2009 18:37:12 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: On Thu, 15 Jan 2009, Jaakko Sipari wrote: > Here's the same message for the list also. Forgot to do "Reply to all" > > ---------- Forwarded message ---------- > From: Jaakko Sipari > Date: Thu, Jan 15, 2009 at 8:22 AM > Subject: Re: [Rxtx] The functionality behind setInputBufferSize & > setOutputBufferSize > To: Trent Jarvi > > > On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! > > Could someone clarify what these methods actually do > and are they even > implemented? Do I get into trouble with buffer > values of 0 (if I want to > handle the buffers myself)? > > > rxtx does not have buffers. ?It was not clear to me at the time why > there would be a buffer when java already provides buffered input and > output streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data > off the port so select() can block. > > > So basically those methods have currently no effect at all? > Correct. You can use BufferedInputStream and BufferedOutputStream from the Java API once you get the Input/OutputStream from rxtx. But changing the input and output buffer size in rxtx is not going to change behavior. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Fri Jan 16 01:22:37 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Fri, 16 Jan 2009 10:22:37 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> > So basically those methods have currently no effect at all? >> >> > Correct. You can use BufferedInputStream and BufferedOutputStream from the > Java API once you get the Input/OutputStream from rxtx. But changing the > input and output buffer size in rxtx is not going to change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > I assume there still is some kind of buffer in rxtx (or the serial port driver) in case of processing delays. I mean, if the serial port gives data faster than can be read from the Java program using rxtx it isn't just thrown away, right? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090116/3bd9a52e/attachment-0020.html From tjarvi at qbang.org Fri Jan 16 05:17:24 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 16 Jan 2009 05:17:24 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> Message-ID: On Fri, 16 Jan 2009, Jaakko Sipari wrote: > > So basically those methods have currently no effect > at all? > > > Correct. ?You can use BufferedInputStream and BufferedOutputStream > from the Java API once you get the Input/OutputStream from rxtx. ?But > changing the input and output buffer size in rxtx is not going to > change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > > > > I assume there still is some kind of buffer in rxtx (or the serial port > driver) in case of processing delays. I mean, if the serial port gives data > faster than can be read from the Java program using rxtx it isn't just > thrown away, right? > The UART can usually hold a few bytes. The kernel driver can buffer the input. In practice, it works. With Sun commapi, the typical application has 4 buffers between the user and the incomming data. With rxtx, it is 3. BufferedInputStream -> commapi/rxtx -> kernel driver -> UART If you really do run into overflows on the UART, then hardware flow control is what you should be using and tinkering with rxtx to avoid it is not a very sound approach. -- Trent Jarvi tjarvi at qbang.org From llowrey at nuclearwinter.com Sun Jan 18 12:49:39 2009 From: llowrey at nuclearwinter.com (Larkin Lowrey) Date: Sun, 18 Jan 2009 13:49:39 -0600 Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain Message-ID: <497387D3.9040201@nuclearwinter.com> After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when running code that uses RXTXComm. The crashes only occur when using 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. As far as I can tell, the crash happens immediately on start. I can't see any evidence of much, if anything, happening before the crash. The code used to work and only stopped working after the "upgrade" to FC10. I have tried RXTX v2.1 and 2.2pre1. Any ideas? Here's the error: # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode linux-amd64) # Problematic frame: # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 --Larkin From tjarvi at qbang.org Mon Jan 19 17:48:34 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 19 Jan 2009 17:48:34 -0700 (MST) Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain In-Reply-To: <497387D3.9040201@nuclearwinter.com> References: <497387D3.9040201@nuclearwinter.com> Message-ID: On Sun, 18 Jan 2009, Larkin Lowrey wrote: > After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when > running code that uses RXTXComm. The crashes only occur when using > 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. > > As far as I can tell, the crash happens immediately on start. I can't > see any evidence of much, if anything, happening before the crash. > > The code used to work and only stopped working after the "upgrade" to > FC10. I have tried RXTX v2.1 and 2.2pre1. > > Any ideas? > > Here's the error: > > # > # An unexpected error has been detected by Java Runtime Environment: > # > # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 > # > # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode > linux-amd64) > # Problematic frame: > # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 > > > --Larkin Hi Larkin, I can think of 2 segv's in rxtx that may apply. Both are fixed in rxtx 2.2pre.. The first was that pointers required by nativeDrain needed to be stored in something larger than a 32 bit integer in java. This resulted in a crash like you see the first time the 'nativedrain' thread tried to use the pointer. The second was a concurrency issue George resolved with synchronization. The crash was usually during close but happened in the 'nativedrain' thread. (eventLoop) As mentioned, these are both fixed in the prerelease. There is a class provided in recent versions of RXTX that allow you confirm the version being used: gnu.io.RXTXVersion with member methods getVersion() and nativeGetVersion(). This allows you to confirm that you are indeed using the version you think you are. -- Trent Jarvi tjarvi at qbang.org From alexandrepoletto at gmail.com Wed Jan 21 11:48:07 2009 From: alexandrepoletto at gmail.com (Alexandre Poletto) Date: Wed, 21 Jan 2009 16:48:07 -0200 Subject: [Rxtx] work in windows but dont work in linux Message-ID: hi folks, I have an application to communicate with the serial port using rxtx, in the windows os my application works well, but when i try to run in the linux os i open the port (in windows "COM1", in Linux "/dev/ttyS0") send my commandes but i never receive any answer. I'm using ubuntu 8.10 and java 1.5, there is any configuration in that i'm missing? Thanks for the help! ps: Sorry form my bad english :( -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/70baea51/attachment-0014.html From jmudd at dtiweb.net Wed Jan 21 14:08:04 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Wed, 21 Jan 2009 16:08:04 -0500 Subject: [Rxtx] Hot unplugging of a USB device Message-ID: Looking to see if the issues surrounding an uplugging of a USB device have been resolved. I see from the mail list archives and bug reports that others have noted this issue. I have a USB GPS Receiver that is plugged into a Windows (XP) system and am using Netbeans 6.5 and Java jdk 1.6 and RXTX 2.1.7 and 2.2pre1. In the thread that is reading data via listening for a SerialEvent I can capture a Java IOException: No error in readArray. The application is essentially hung at this point. Only a termination of the application will clear it up and not leave the port hung. I had read in the archives that this is because the event loop in the native code portion is continually putting out the exceptions. I had also seen that this might be addressed in future releases. Any help is appreciated. Thanks, Jerry ________________________________ Jerry Mudd Senior Programmer 21795 Shangri-La Drive, Ste C Lexington Park, MD 20653 (301) 737-8893 (301) 737-8897 Fax jmudd at dtiweb.net www.dtiweb.net This message may contain sensitive, proprietary and/or privileged information. Disclosure is not authorized unless provided in writing by Defense Technologies, Inc. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0014.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 6296 bytes Desc: image001.gif Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0014.gif From netbeans at gatworks.com Wed Jan 21 17:33:46 2009 From: netbeans at gatworks.com (U. George) Date: Wed, 21 Jan 2009 19:33:46 -0500 Subject: [Rxtx] Hot unplugging of a USB device In-Reply-To: References: Message-ID: <4977BEEA.4020708@gatworks.com> > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:34 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:34 +1100 Subject: [Rxtx] Part 1 of 2 parts re rxtx 2.2 pre.. and OSX Message-ID: Hi, I have tried out the latest version of rxtx on a mac and can report that running with ImageJ (32 bit ) all seems to be fine. However when I attempt to use it with ImageJ64, I get a crash whenever the serial port is used. The details follow. What I did. Ran our plug-in in ImageJ 64 bit (1.42g) for Measuring, which is using the latest rxtx (the beta 2.2 compiled on 30 December 2008) for MacOSX 10.5.x) I installed this by putting the two files in the directory ~ LIBRARY/JAVA/EXTENSIONS. The Plug-in uses the serial port. The window we put up to show the numbers from the stage appeared, but only with the default "0" (zero) in each row, which is what we put there until we get data back from the port and the device attached. Then it crashed. I should point out that this all works fine using ImageJ (32 bit) 1.42g, on the same platform. So the only difference is the use of ImageJ 64 bit, and I guess the version of rxtx for 64 bit. I hope that cleverer people than me can throw some light onto this little problem. ImageJ64 seems to work ok until rxtx is called, although I haven't tried much so far, just some 3D rendering with 1 Gb of image data, which all went well, apart from the fact that the data was marginal. I am now showing the data supplied by the report to Apple window. This has three tabs, one to write your information in, one called Problem Details, and the third called SYSTEM CONFIG. These are pasted in below. Best wishes Noel Problem Details Process: JavaApplicationStub [463] Path: /Applications/ImageJ/ImageJ64.app/Contents/MacOS/JavaApplicationStub Identifier: gov.nih.info.rsb.ImageJ Version: ??? (10.2) Code Type: X86-64 (Native) Parent Process: launchd [398] Date/Time: 2009-01-19 10:48:09.342 +1100 OS Version: Mac OS X 10.5.6 (9G55) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000000029507c8 Crashed Thread: 16 Application Specific Information: Java information: Exception type: Bus Error (0xa) at pc=0x00000006ff70f418 Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0_07-b06-57 mixed mode macosx-amd64) Current thread (0x00000001020de800): JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] Stack: [0x0000000702851000,0x0000000702951000] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j gnu.io.RXTXPort.readByte()I+0 j gnu.io.RXTXPort$SerialInputStream.read()I+81 j SerialConnection.serialEvent(Lgnu/io/SerialPortEvent;)V+41 j gnu.io.RXTXPort.sendEvent(IZ)Z+382 v ~BufferBlob::StubRoutines (1) j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~BufferBlob::StubRoutines (1) Java Threads: ( => current thread ) =>0x00000001020de800 JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] 0x00000001020e8800 JavaThread "Measure XYZ" [_thread_blocked, id=44384256, stack(0x0000000702954000,0x0000000702a54000)] 0x0000000102001000 JavaThread "DestroyJavaVM" [_thread_blocked, id=25169920, stack(0x0000000101001000,0x0000000101801000)] 0x00000001020da800 JavaThread "SocketListener" [_thread_in_native, id=29671424, stack(0x0000000701b4c000,0x0000000701c4c000)] 0x00000001020b4800 JavaThread "AWT-EventQueue-0" [_thread_in_Java, id=-27992064, stack(0x00000006fe44e000,0x00000006fe54e000)] 0x0000000102096000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=-34344960, stack(0x00000006fde3f000,0x00000006fdf3f000)] 0x0000000102078000 JavaThread "AWT-Shutdown" [_thread_blocked, id=-58392576, stack(0x00000006fc750000,0x00000006fc850000)] 0x0000000102077800 JavaThread "AWT-AppKit" daemon [_thread_in_native, id=1886770976, stack(0x00007fff5f400000,0x00007fff5fc00000)] 0x0000000102044800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=-333877248, stack(0x00000006ec097000,0x00000006ec197000)] 0x0000000102043000 JavaThread "CompilerThread1" daemon [_thread_blocked, id=-334938112, stack(0x00000006ebf94000,0x00000006ec094000)] 0x0000000102041800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=-335998976, stack(0x00000006ebe91000,0x00000006ebf91000)] 0x0000000102041000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=-337059840, stack(0x00000006ebd8e000,0x00000006ebe8e000)] 0x0000000102029800 JavaThread "Finalizer" daemon [_thread_blocked, id=-338214912, stack(0x00000006ebc74000,0x00000006ebd74000)] 0x0000000102028800 JavaThread "Reference Handler" daemon [_thread_blocked, id=-339333120, stack(0x00000006ebb63000,0x00000006ebc63000)] Other Threads: 0x0000000102020800 VMThread [stack: 0x00000006eba60000,0x00000006ebb60000] [id=-340393984] 0x0000000102046000 WatcherThread [stack: 0x00000006ec19a000,0x00000006ec29a000] [id=-332816384] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 76480K, used 14448K [0x0000000105800000, 0x000000010ad50000, 0x00000002f9800000) eden space 65600K, 22% used [0x0000000105800000, 0x000000010661c398, 0x0000000109810000) from space 10880K, 0% used [0x0000000109810000, 0x0000000109810000, 0x000000010a2b0000) to space 10880K, 0% used [0x000000010a2b0000, 0x000000010a2b0000, 0x000000010ad50000) tenured generation total 174784K, used 0K [0x00000002f9800000, 0x00000003042b0000, 0x00000006e1800000) the space 174784K, 0% used [0x00000002f9800000, 0x00000002f9800000, 0x00000002f9800200, 0x00000003042b0000) compacting perm gen total 21248K, used 10319K [0x00000006e1800000, 0x00000006e2cc0000, 0x00000006e6c00000) the space 21248K, 48% used [0x00000006e1800000, 0x00000006e2213d28, 0x00000006e2213e00, 0x00000006e2cc0000) No shared spaces configured. Virtual Machine Arguments: JVM Args: -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher. framework/Resources/LauncherSupport.jar -Xms256m -Xmx24000m -Dcom.apple.macos.useScreenMenuBar=false -Dcom.apple.mrj.application.growbox.intrudes=false -Dcom.apple.mrj.application.live-resize=true -Dcom.apple.hwaccel=false -Dapple.awt.Antialiasing=false -Dcom.apple.smallTabs=true -Dapple.awt.brushMetalLook=false Java Command: Launcher Type: generic Physical Memory: Page Size = 4k, Total = 2048M, Free = 30996M Thread 0: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 com.apple.CoreFoundation 0x00007fff8204dc4f CFRunLoopRunSpecific + 1631 3 com.apple.HIToolbox 0x00007fff839fdda2 RunCurrentEventLoopInMode + 278 4 com.apple.HIToolbox 0x00007fff839fdbd8 ReceiveNextEventCommon + 322 5 com.apple.HIToolbox 0x00007fff839fda83 BlockUntilNextEventMatchingListInMode + 79 6 com.apple.AppKit 0x00007fff8299d3b0 _DPSNextEvent + 603 7 com.apple.AppKit 0x00007fff8299ccf1 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 136 8 com.apple.AppKit 0x00007fff82996a84 -[NSApplication run] + 455 9 libawt.jnilib 0x00000006ec433257 +[AWTStarter startAWT:] + 1343 10 libawt.jnilib 0x00000006ec432c46 -[CPerformer perform] + 112 11 com.apple.Foundation 0x00007fff8153f2b4 __NSThreadPerformPerform + 148 12 com.apple.CoreFoundation 0x00007fff8204e0e8 CFRunLoopRunSpecific + 2808 13 ...ple.JavaApplicationLauncher 0x0000000100005165 startupJava(LauncherArgsStruct*) + 235 14 ...ple.JavaApplicationLauncher 0x000000010000579c launchJavaApplication + 1224 15 JavaApplicationStub 0x0000000100000b9c 0x100000000 + 2972 Thread 1: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x0000000101a93b61 JVM_GetCPFieldModifiers + 128961 5 libjvm.dylib 0x0000000101a93a36 JVM_GetCPFieldModifiers + 128662 6 ...ple.JavaApplicationLauncher 0x000000010000c0ce startJavaApplication + 2886 7 ...ple.JavaApplicationLauncher 0x000000010000506d java_main_stub(void*) + 9 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 2: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libSystem.B.dylib 0x00007fff840db0b0 mach_msg_server + 436 3 libjvm.dylib 0x000000010181176d JNI_CreateJavaVM_Impl + 53277 4 libjvm.dylib 0x0000000101811375 JNI_CreateJavaVM_Impl + 52261 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 3: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x00000001018e452f JVM_Lseek + 235727 5 libjvm.dylib 0x00000001018e42df JVM_Lseek + 235135 6 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 7 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 8 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 4: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x00000001028003ea 0 + 4336911338 11 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 12 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 13 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 14 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 15 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 16 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 17 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 18 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 19 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 20 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 5: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 6: 0 libSystem.B.dylib 0x00007fff8406dd72 semaphore_wait_trap + 10 1 libjvm.dylib 0x0000000101915bdb JVM_IsPrimitiveClass + 12139 2 libjvm.dylib 0x00000001019155b5 JVM_IsPrimitiveClass + 10565 3 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 4 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 7: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 8: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 9: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x0000000101918ec8 JVM_IsPrimitiveClass + 25176 5 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 6 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 7 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 10: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x000000010191abb5 JVM_IsPrimitiveClass + 32581 4 libjvm.dylib 0x000000010191a70a JVM_IsPrimitiveClass + 31386 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 11: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 12: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x0000000102803414 0 + 4336923668 12 ??? 0x00000001028003ea 0 + 4336911338 13 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 14 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 15 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 16 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 17 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 18 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 19 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 20 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 21 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 22 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 13: 0 ??? 0x0000000102817034 0 + 4337004596 1 ??? 0x000000010280304e 0 + 4336922702 2 ??? 0x0000000102803093 0 + 4336922771 3 ??? 0x000000010280356d 0 + 4336924013 4 ??? 0x0000000102803093 0 + 4336922771 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x000000010280356d 0 + 4336924013 8 ??? 0x0000000102803093 0 + 4336922771 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x0000000102802f3a 0 + 4336922426 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102802f3a 0 + 4336922426 14 ??? 0x0000000102802f3a 0 + 4336922426 15 ??? 0x0000000102803162 0 + 4336922978 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102802f3a 0 + 4336922426 19 ??? 0x0000000102802f3a 0 + 4336922426 20 ??? 0x00000001028003ea 0 + 4336911338 21 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 22 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 23 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 24 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 25 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 26 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 27 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 28 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 29 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 30 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 14: 0 libSystem.B.dylib 0x00007fff840f210e accept + 10 1 libnet.jnilib 0x00000006ff6b6b11 Java_java_net_PlainSocketImpl_socketAccept + 277 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x0000000102802f3a 0 + 4336922426 4 ??? 0x0000000102802f3a 0 + 4336922426 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x0000000102803414 0 + 4336923668 8 ??? 0x00000001028003ea 0 + 4336911338 9 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 10 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 11 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 12 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 13 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 14 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 15 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 16 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 17 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 18 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 15: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x000000010280304e 0 + 4336922702 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102803414 0 + 4336923668 14 ??? 0x0000000102803093 0 + 4336922771 15 ??? 0x0000000102803093 0 + 4336922771 16 ??? 0x0000000102803093 0 + 4336922771 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102803414 0 + 4336923668 19 ??? 0x00000001028003ea 0 + 4336911338 20 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 21 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 22 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 23 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 24 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 25 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 26 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 27 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 28 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 29 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 Crashed: 0 librxtxSerial.jnilib 0x00000006ff70f418 read_byte_array + 68 1 librxtxSerial.jnilib 0x00000006ff70f9b3 Java_gnu_io_RXTXPort_readByte + 93 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x000000010280304e 0 + 4336922702 4 ??? 0x000000010280304e 0 + 4336922702 5 ??? 0x0000000102803414 0 + 4336923668 6 ??? 0x00000001028003ea 0 + 4336911338 7 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 8 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 9 libjvm.dylib 0x00000001018e5be8 JVM_Lseek + 241544 10 libjvm.dylib 0x0000000101900b11 JVM_MonitorWait + 17249 11 libjvm.dylib 0x0000000101a1e59e JVM_DisableCompiler + 1166 12 librxtxSerial.jnilib 0x00000006ff70d91e send_event + 132 13 librxtxSerial.jnilib 0x00000006ff70e82b report_serial_events + 92 14 librxtxSerial.jnilib 0x00000006ff7108c9 Java_gnu_io_RXTXPort_eventLoop + 237 15 ??? 0x000000010280e878 0 + 4336969848 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x00000001028003ea 0 + 4336911338 18 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 19 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 20 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 21 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 22 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 23 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 24 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 25 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 26 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 27 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 17: 0 libSystem.B.dylib 0x00007fff84074d02 __semwait_signal + 10 1 libSystem.B.dylib 0x00007fff840dce91 usleep + 57 2 librxtxSerial.jnilib 0x00000006ff70d729 drain_loop + 45 3 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 4 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 crashed with X86 Thread State (64-bit): rax: 0x00000000029507c0 rbx: 0x0000000000000041 rcx: 0x0000000000000065 rdx: 0x0000000000000002 rdi: 0x00000006ff71205e rsi: 0x00000006ff711c67 rbp: 0x0000000702950000 rsp: 0x000000070294fef0 r8: 0x000000000000004d r9: 0x00000006e21d64c0 r10: 0x00000006e21d38e8 r11: 0x00000000000000d2 r12: 0x00000001020de998 r13: 0x00000006e21d93b0 r14: 0x0000000000000032 r15: 0x00000000029507c0 rip: 0x00000006ff70f418 rfl: 0x0000000000010202 cr2: 0x00000000029507c8 Continued in the message part 2 -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:41 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:41 +1100 Subject: [Rxtx] Part 2 re rxtx 2.2 pre... and MacOSX Message-ID: Continued from Part 1. Binary Images: 0x100000000 - 0x100000fff JavaApplicationStub ??? (???) /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationS tub 0x100004000 - 0x100011fff com.apple.JavaApplicationLauncher 12.2.0 (12.2.0) /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/JavaApplicationLauncher 0x10001a000 - 0x100022ffd com.apple.JavaVM 12.2.0 (12.2.0) <2b178e8d4bbcc0aa427c2f3f71bb2fcb> /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM 0x100055000 - 0x10005dff0 libverify.dylib ??? (???) <56eac95084cb86cd1339a721b1353182> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libveri fy.dylib 0x100063000 - 0x10006cffb JavaNativeFoundation ??? (???) <68ca6409dc49542301edda1e0744ac69> /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNative Foundation.framework/Versions/A/JavaNativeFoundation 0x1000a8000 - 0x1000c7fef libjava.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjava .jnilib 0x1000d8000 - 0x1000e5ffb libzip.jnilib ??? (???) <5b6dce7c9a1f25aa5dff1a633c9dc342> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libzip. jnilib 0x101803000 - 0x101eafff3 libjvm.dylib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bundle/Libra ries/libjvm.dylib 0x6ec2c5000 - 0x6ec2c6fff liblauncher.jnilib ??? (???) <567fa54a222b965b2c4aefea21d9800a> /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/Resources/liblauncher.jnilib 0x6ec431000 - 0x6ec5e4fff libawt.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libawt. jnilib 0x6fdc3b000 - 0x6fdc3cfff ATSHI.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/Resources/ATSHI.dylib 0x6fdd6e000 - 0x6fdd6efff libcmm.jnilib ??? (???) <114e1a620a6920d77bf09bd57a7f7d52> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libcmm. jnilib 0x6fdd9e000 - 0x6fde1fff7 libfontmanager.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libfont manager.jnilib 0x6fdf41000 - 0x6fdf8ffff libsuncmm.jnilib ??? (???) <47330f1f17822de3a5cf921e07615cf7> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libsunc mm.jnilib 0x6fdf95000 - 0x6fdfc4ff7 libjpeg.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjpeg .jnilib 0x6ff6ae000 - 0x6ff6baffb libnet.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnet. jnilib 0x6ff6c0000 - 0x6ff6c4fff libnio.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnio. jnilib 0x6ff6d4000 - 0x6ff6e8ff7 libdcpr.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libdcpr .jnilib 0x6ff70c000 - 0x6ff713fff +librxtxSerial.jnilib ??? (???) <5133deacebd01ceab7d528c541241956> /Library/Java/Extensions/librxtxSerial.jnilib 0x6ff734000 - 0x6ff74bfef libJapaneseConverter.dylib ??? (???) <64cca6bb4650a269f49a8427507e4963> /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib 0x70204f000 - 0x702218fef com.apple.RawCamera.bundle 2.0.10 (2.0.10) /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera 0x7fff5fc00000 - 0x7fff5fc2e643 dyld 97.1 (???) /usr/lib/dyld 0x7fff80003000 - 0x7fff80146ffb com.apple.audio.toolbox.AudioToolbox 1.5.2 (1.5.2) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x7fff801d2000 - 0x7fff801d5ffb com.apple.help 1.1 (36) <9000c05ccad96fdcc25bc35264abf587> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.frame work/Versions/A/Help 0x7fff801d6000 - 0x7fff80211fff com.apple.AE 402.2 (402.2) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.f ramework/Versions/A/AE 0x7fff80212000 - 0x7fff80257fef libRIP.A.dylib ??? (???) <8c818d7fd3dc57839ac48caf107ff4c0> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x7fff80258000 - 0x7fff8029bfef com.apple.QD 3.11.54 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/QD.framework/Versions/A/QD 0x7fff8029c000 - 0x7fff802dffef libTIFF.dylib ??? (???) <86be7909f46cc044a887cbb60ab7826d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x7fff802e0000 - 0x7fff803d4fff libobjc.A.dylib ??? (???) <118dc1ae05e685ad64290352fc94f1f0> /usr/lib/libobjc.A.dylib 0x7fff803d5000 - 0x7fff8045dfe7 libsqlite3.0.dylib ??? (???) <3c7ab3523b816dbd3e039ee7e6e2c580> /usr/lib/libsqlite3.0.dylib 0x7fff8045e000 - 0x7fff80466ffa libbsm.dylib ??? (???) <4d838c0d8a74fe61c781a53a8723303d> /usr/lib/libbsm.dylib 0x7fff80467000 - 0x7fff80497fff com.apple.shortcut 1 (1.0) <9822328df9321a661af3afcc841e8f80> /System/Library/PrivateFrameworks/Shortcut.framework/Versions/A/Shortcut 0x7fff80498000 - 0x7fff8049bfff com.apple.securityhi 3.0 (30817) <00ddd6e60692b62b7649573eab8aef5a> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI .framework/Versions/A/SecurityHI 0x7fff8049c000 - 0x7fff8049efff com.apple.print.framework.Print 218.0.2 (220.1) <2b847a0a1cd885f596a4d10409d50ba3> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.fram ework/Versions/A/Print 0x7fff8049f000 - 0x7fff805dbfe9 com.apple.ImageIO.framework 2.0.4 (2.0.4) <47dcdc0b5986b2c157e0b6dae48ce464> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/ImageIO 0x7fff805dc000 - 0x7fff805f9fef com.apple.CoreVideo 1.5.1 (1.5.1) <78253b3fe8d3dcc90f159d7ed866c295> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x7fff805fa000 - 0x7fff8068bfff com.apple.SearchKit 1.2.1 (1.2.1) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Sear chKit.framework/Versions/A/SearchKit 0x7fff8068c000 - 0x7fff80e49fef libBLAS.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libBLAS.dylib 0x7fff80e4a000 - 0x7fff81416fff com.apple.CoreGraphics 1.407.2 (???) <436dbc70f8c9b29b3beb1d2de220acf2> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/CoreGraphics 0x7fff81417000 - 0x7fff8141dfff com.apple.DiskArbitration 2.2.1 (2.2.1) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitrat ion 0x7fff8141e000 - 0x7fff8145bff7 com.apple.SystemConfiguration 1.9.2 (1.9.2) <150119d0cecb0c80f6736b9881c2411e> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemCo nfiguration 0x7fff8145c000 - 0x7fff81523fec com.apple.CFNetwork 422.11 (422.11) <570ca46de3b907cb1c8e33fc62f562b4> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNe twork.framework/Versions/A/CFNetwork 0x7fff81524000 - 0x7fff8152dfff libCGATS.A.dylib ??? (???) <722a0bbd58740d46739008e881010631> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib 0x7fff8152e000 - 0x7fff81533fff com.apple.CommonPanels 1.2.4 (85) <2cec1ecc95cf1ecea8bea030975a46b8> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPane ls.framework/Versions/A/CommonPanels 0x7fff81534000 - 0x7fff817cffe3 com.apple.Foundation 6.5.7 (677.22) <8134977fcc57198a53dc494b60592980> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x7fff817d0000 - 0x7fff817d0ffd com.apple.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x7fff817d1000 - 0x7fff81cf1fc6 libGLProgrammability.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgra mmability.dylib 0x7fff81cf2000 - 0x7fff81cf4fff com.apple.NavigationServices 3.5.2 (163) <7cb7f3fe7f9d56ec89ef28a6d3a1da7d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Navigation Services.framework/Versions/A/NavigationServices 0x7fff81cf5000 - 0x7fff81d32fe7 com.apple.coreui 1.2 (62) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x7fff81d33000 - 0x7fff81d33fff com.apple.Carbon 136 (136) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x7fff81d34000 - 0x7fff81d42fff libCSync.A.dylib ??? (???) <61f6cc104b3e9b77cd583635a3a9a5cf> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x7fff81d43000 - 0x7fff81d45ff9 libRadiance.dylib ??? (???) <6d9f2235e8f70a7aedfc59383a7548d8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x7fff81d46000 - 0x7fff81db5ff9 com.apple.print.framework.PrintCore 5.5.3 (245.3) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/PrintCore.framework/Versions/A/PrintCore 0x7fff81db6000 - 0x7fff81db6ff8 com.apple.ApplicationServices 34 (34) <81cd02cc2ccf4e47e51d03db860da556> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Applicat ionServices 0x7fff81db7000 - 0x7fff81dd8fff libresolv.9.dylib ??? (???) <38318f9fbcfbdb384e0f9b08cc0e757a> /usr/lib/libresolv.9.dylib 0x7fff81dd9000 - 0x7fff81e4ffef libvMisc.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvMisc.dylib 0x7fff81e50000 - 0x7fff81e52ff7 libffi.dylib ??? (???) <920bb19728451f35703bb95dc908c7ca> /usr/lib/libffi.dylib 0x7fff81e53000 - 0x7fff81eeefe7 com.apple.ink.framework 101.3 (86) <60c6579faf114ea9677fd9ae25389ed2> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framew ork/Versions/A/Ink 0x7fff81eef000 - 0x7fff81f0dfff libPng.dylib ??? (???) <4017eab74319a648dfd73b7d503e557d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x7fff81f0e000 - 0x7fff81f24ff9 com.apple.ImageCapture 5.0.1 (5.0.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCaptu re.framework/Versions/A/ImageCapture 0x7fff81f25000 - 0x7fff81f3dfff com.apple.DictionaryServices 1.0.0 (1.0.0) <78ea11e9a92120f76d69efa24b8d1f95> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Dict ionaryServices.framework/Versions/A/DictionaryServices 0x7fff81f3e000 - 0x7fff81f42fff libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib 0x7fff81f43000 - 0x7fff81fe3fe3 com.apple.ApplicationServices.ATS 3.4 (???) <47cf09bf78935889f17f1b6b09badf0d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/ATS 0x7fff81fe4000 - 0x7fff8211bfff com.apple.CoreFoundation 6.5.5 (476.17) <51930d43c7c2d8fb24148cbfc05bba0f> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundatio n 0x7fff8211c000 - 0x7fff82126fff com.apple.speech.recognition.framework 3.7.24 (3.7.24) <2399374b096b284345daba82e2cb833d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechReco gnition.framework/Versions/A/SpeechRecognition 0x7fff82127000 - 0x7fff82159ff7 libauto.dylib ??? (???) /usr/lib/libauto.dylib 0x7fff8215a000 - 0x7fff821cefe7 libstdc++.6.dylib ??? (???) <565ee6f798f7fef6f804c60682787280> /usr/lib/libstdc++.6.dylib 0x7fff821cf000 - 0x7fff8228dfff edu.mit.Kerberos 6.0.12 (6.0.12) /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x7fff8228e000 - 0x7fff8228effb com.apple.installserver.framework 1.0 (8) /System/Library/PrivateFrameworks/InstallServer.framework/Versions/A/Install Server 0x7fff8228f000 - 0x7fff82293fff libGIF.dylib ??? (???) <66436b84211fe0e723051eab15af0aca> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x7fff82294000 - 0x7fff8258ffe3 com.apple.CoreServices.CarbonCore 786.10 (786.10) <2ac701edf3ca98a86ae9d5f733200b40> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Carb onCore.framework/Versions/A/CarbonCore 0x7fff82590000 - 0x7fff825aafff libvDSP.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvDSP.dylib 0x7fff825ab000 - 0x7fff827b1ff3 com.apple.security 5.0.4 (34102) <47c559b17c1f51998e7a981d0fbec4c8> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x7fff827b2000 - 0x7fff827d9fff libxslt.1.dylib ??? (???) /usr/lib/libxslt.1.dylib 0x7fff827da000 - 0x7fff82948fff libicucore.A.dylib ??? (???) <374ddaf141bf88dba00ab9058f2dbad6> /usr/lib/libicucore.A.dylib 0x7fff82949000 - 0x7fff8295dff7 libGL.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x7fff8295e000 - 0x7fff83286fff com.apple.AppKit 6.5.6 (949.43) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x7fff83287000 - 0x7fff83667fef com.apple.QuartzCore 1.5.7 (1.5.7) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x7fff83668000 - 0x7fff836b8fe7 com.apple.Metadata 10.5.2 (398.25) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Meta data.framework/Versions/A/Metadata 0x7fff836b9000 - 0x7fff836baff3 com.apple.audio.units.AudioUnit 1.5 (1.5) /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x7fff836bb000 - 0x7fff83710fe3 com.apple.HIServices 1.7.0 (???) <6bef766448d67adb91901b432629ea0f> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/HIServices.framework/Versions/A/HIServices 0x7fff83711000 - 0x7fff83711ffd com.apple.Accelerate.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/vecLib 0x7fff83712000 - 0x7fff837a7ffb com.apple.LaunchServices 290.3 (290.3) <56544e16c5192d2ce72df772901fcaef> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Laun chServices.framework/Versions/A/LaunchServices 0x7fff837a8000 - 0x7fff8382ffef com.apple.audio.CoreAudio 3.1.1 (3.1.1) <9c1714647fd7515c900362ad2ac76874> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x7fff83830000 - 0x7fff83893fef libGLU.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dyli b 0x7fff83894000 - 0x7fff838a2ff9 com.apple.helpdata 1.0.1 (14.2) /System/Library/PrivateFrameworks/HelpData.framework/Versions/A/HelpData 0x7fff838a3000 - 0x7fff838afff1 libgcc_s.1.dylib ??? (???) <23fa31a628c1ea8a62ac529fa333b6e1> /usr/lib/libgcc_s.1.dylib 0x7fff838b0000 - 0x7fff838d2fff libJPEG.dylib ??? (???) <4257ab268996bbeb93b47946df181cdc> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x7fff838d3000 - 0x7fff838d3ffd com.apple.Accelerate 1.4.2 (Accelerate 1.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x7fff838d4000 - 0x7fff838d4ff8 com.apple.Cocoa 6.5 (???) <8c59f679ffbd9178134df1d83dedde28> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa 0x7fff838d5000 - 0x7fff839cafff libxml2.2.dylib ??? (???) <8226d1180354f493954c5fa1fc0e1154> /usr/lib/libxml2.2.dylib 0x7fff839cb000 - 0x7fff839dafe7 com.apple.opengl 1.5.9 (1.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x7fff839db000 - 0x7fff83cc2feb com.apple.HIToolbox 1.5.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. framework/Versions/A/HIToolbox 0x7fff83cc3000 - 0x7fff83d03fef com.apple.framework.IOKit 1.5.1 (???) <17e6707127a60c5e2d7a9bd2b7bf2db0> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x7fff83d04000 - 0x7fff83dc8fe2 com.apple.vImage 3.0 (3.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage .framework/Versions/A/vImage 0x7fff83dc9000 - 0x7fff83df3fff libcups.2.dylib ??? (???) /usr/lib/libcups.2.dylib 0x7fff83df4000 - 0x7fff83df4ffa com.apple.CoreServices 32 (32) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x7fff83df5000 - 0x7fff83ed6fff libcrypto.0.9.7.dylib ??? (???) <66f1f8773bd9fdfdcfd09e2b4b010636> /usr/lib/libcrypto.0.9.7.dylib 0x7fff83ed7000 - 0x7fff83f87fef com.apple.CoreServices.OSServices 226.5 (226.5) <1c38f727b3ad3293272db7323b37c735> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSSe rvices.framework/Versions/A/OSServices 0x7fff83f88000 - 0x7fff83fa2fff com.apple.openscripting 1.2.8 (???) <0674c4e3353c677c9f58df3297ae559b> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScript ing.framework/Versions/A/OpenScripting 0x7fff83fa3000 - 0x7fff83fdfff7 libGLImage.dylib ??? (???) <02258bcdbe8defdb254acc077a81dd9b> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage. dylib 0x7fff83fe0000 - 0x7fff83ff1fff com.apple.speech.synthesis.framework 3.7.1 (3.7.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x7fff83ff2000 - 0x7fff8406cff3 com.apple.CoreText 2.0.3 (???) <827bbfef670df72316719c25bfb39915> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreText.framework/Versions/A/CoreText 0x7fff8406d000 - 0x7fff841f8ffb libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0x7fff841f9000 - 0x7fff8420affd libz.1.dylib ??? (???) /usr/lib/libz.1.dylib 0x7fff8420b000 - 0x7fff842befef com.apple.DesktopServices 1.4.7 (1.4.7) /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/D esktopServicesPriv 0x7fff842bf000 - 0x7fff84677fff libLAPACK.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libLAPACK.dylib 0x7fff84678000 - 0x7fff84743fef com.apple.ColorSync 4.5.1 (4.5.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ColorSync.framework/Versions/A/ColorSync 0x7fff84744000 - 0x7fff84847feb com.apple.CoreData 100.1 (186) <074abc7f43f81f7885e4d0674a8be4bc> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x7fffffe00000 - 0x7fffffe01780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0xfffffffffffec000 - 0xfffffffffffeffff libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib SYSTEM CONFIG Model: MacPro3,1, BootROM MP31.006C.B05, 8 processors, Quad-Core Intel Xeon, 2.8 GHz, 32 GB Graphics: kHW_ATIrv630Item, ATI Radeon HD 2600, spdisplays_pcie_device, 256 MB Memory Module: DIMM Riser B/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Bluetooth: Version 2.1.3f8, 2 service, 1 devices, 1 incoming serial ports Network Service: Ethernet 2, Ethernet, en1 PCI Card: ATI Radeon HD 2600, display, Slot-1 Serial ATA Device: WDC WD3200AAJS-41VWA0, 298.09 GB Parallel ATA Device: PIONEER DVD-RW DVR-112D USB Device: Keyboard Hub, (null) mA USB Device: Apple Optical USB Mouse, (null) mA USB Device: Apple Keyboard, (null) mA USB Device: hub_device, (null) mA USB Device: Apple Cinema HD Display, (null) mA USB Device: Keyspan USA-28Xb, (null) mA USB Device: Bluetooth USB Host Controller, (null) mA FireWire Device: built-in_hub, unknown_value, unknown_speed FireWire Device: My Book, WD, 800mbit_speed FireWire Device: unknown_device, unknown_value, unknown_speed -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From jaakko.sipari at gmail.com Thu Jan 22 03:00:03 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 22 Jan 2009 12:00:03 +0200 Subject: [Rxtx] RXTX compilation with GCJ possible? Message-ID: <901f25b80901220200s53792317o374b80cbb6066a52@mail.gmail.com> Hi! Does anyone have experience on using RXTX in a GCJ compiled Java application? I'm interested whether this is possible in Windows and/or in Linux platforms. And of course what does it take to get it work, or does it just work out of the box. Ultimately my aim here would be to move to a more time deterministic system by utilizing GCJ, jRate & Javolution and possibly run the RXTX (and other important) threads at a priority higher than the garbage collector. This of course would require some modification for the RXTX threads to run in a Javolution pool context or non allocating real time contexts so they wouldn't produce any garbage, but that's something to hack on later. For now I'd just like to know if there are any obstacles on the road to compiling & running RXTX with GCJ. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/5592681a/attachment-0014.html From jmudd at dtiweb.net Thu Jan 22 06:21:03 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Thu, 22 Jan 2009 08:21:03 -0500 Subject: [Rxtx] Hot unplugging of a USB device References: <4977BEEA.4020708@gatworks.com> Message-ID: U. George, Thanks for the information. How did you resolve your USB/GPS device on Linux? My application has to run on both Linux and Windows eventually. Thanks, Jerry -----Original Message----- From: U. George [mailto:netbeans at gatworks.com] Sent: Wednesday, January 21, 2009 7:34 PM To: Jerry Mudd Cc: rxtx at qbang.org Subject: Re: [Rxtx] Hot unplugging of a USB device > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From m.kirkland at comcast.net Thu Jan 22 09:21:01 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Thu, 22 Jan 2009 08:21:01 -0800 Subject: [Rxtx] Serial port control lines change with call to getPortIdentifiers() on Linux Message-ID: <94443DEFFD574B6CA8DDB2B201D9E007@bengal.net> Hi All ! I have noticed an issue with RXTX on Ubuntu Linux 8.10 that has prevented me from being able to use RXTX on Linux. I have noticed this issue on both the rxtx 2.1.7 and the new rxtx2.2pre1. When I execute the following line to get the ports on a system - java.util.Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); Both DTR and RTS become active on ttyS0 and only ttyS0, not ttyS1 (I only have 2 ports). I see this prior to opening any ports or making any other calls to RXTX. I have stepped it though with the debugger and I am sure this is the trigger. My application uses these control lines to perform functions other then the standard flow control so it is critical that I be able to control them exactly. I would also think that folks using RXTX for more standard serial IO would also have issues with devices starting to talk before a listener was ready. I checked Windows XP and I do not see this issue (but I only have a com1 on the Windows computer). I also noticed that the DTR line blips when setting up a port on 2.2.pre1 like it does on 2.1.7r2. This it the same issue that the folks at http://www.codeskin.com/ patched. I see this issue on both Linux and Windows XP. Any help or clues would be greatly appreciated. If I can provide any additional info or do any testing I would be glad to help out to get version 2.2 in top shape for release. BTW I have written a simple dynamic loader to load the RXTX jar and native code that is drive by the os.name and os.arch system properties. I would be more then happy to contribute this to the project if folks though it would be useful. Its more convenient then having to manage copying the files around to various JVM's. TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/eab26bae/attachment-0013.html From josefk_5 at yahoo.com Fri Jan 23 09:44:06 2009 From: josefk_5 at yahoo.com (Josef Kahsay) Date: Fri, 23 Jan 2009 08:44:06 -0800 (PST) Subject: [Rxtx] Help on Accessing RS232 Message-ID: <509617.88308.qm@web38205.mail.mud.yahoo.com> Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS From m.kirkland at comcast.net Sat Jan 24 01:28:52 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Sat, 24 Jan 2009 00:28:52 -0800 Subject: [Rxtx] Help on Accessing RS232 In-Reply-To: <509617.88308.qm@web38205.mail.mud.yahoo.com> References: <509617.88308.qm@web38205.mail.mud.yahoo.com> Message-ID: <665887C02E1446708CE392FE0BD73D79@bengal.net> It seems to me that you are having a classic java classpath issue. Java classpath issues can be annoying to solve sometimes. As some random guesses I would suggest you look at the following. 1 - You might not be running the JVM from the location that you think you are (gets me all the time). I which Windows had a which command. 2 - You don't mention what development environment you are using like Eclipse etc., and if you are trying to run the demo from inside the development environment. If so, do whatever is appropriate for the development environment to control the classpath. In Eclipse this would involve adding a "User Library" to point to the jar and native code. 3 - Once you get the classpath ok, the next thing you might run into is not being able to load the native library. 4 - I have found that on XP I can place the RXTX jar and native library in the same directory as my application's jar file (and a class-path entry in the application's jar file manifest) and it all works. 5 - If you need more control of managing different versions of RXTX for different OS platforms, I have a dynamic RXTX loader I can send you (but I recommend getting the simple case working first). Let me know if this helps. Mike -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Josef Kahsay Sent: Friday, January 23, 2009 8:44 AM To: rxtx at qbang.org Subject: [Rxtx] Help on Accessing RS232 Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jacomoman at hotmail.com Mon Jan 26 12:12:27 2009 From: jacomoman at hotmail.com (Joseph Schmoley) Date: Mon, 26 Jan 2009 11:12:27 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: Message-ID: Hi All, First, let me thank you all for your effort on this excellent project. I've been using the Win32 binaries in the 2.1-7r2 package without any problems on WinXP Pro (32-bit). I then tried the .jnilib of the same version on my Mac OSX 10.5 64-bit darwin and got the familiar UnsatisfiedLinkError problem. I read up on all the mailing list archive messages and found this one (http://mailman.qbang.org/pipermail/rxtx/2008-May/2436699.html) suggesting that perhaps rxtx-devel from CVS would have a fix. So I got latest rxtx-devel + commapi-0-0-1 as suggested by the CVS page at rxtx.org. I even set my CFLAGS and LDFLAGS to include "-arch x86_64 -arch ppc64", but as it turned out, the latest configure script didn't need it. In any case, I configured and built rxtx-devel with no errors (that I could see) and transferred the resulting i386-apple-darwin9.6.0/librxtxSerial.jnilib to where my java.library.path is pointing to and ran my test class. Whereas before I was getting UnsatisfiedLinkError, I now simply get this: Invalid memory access of location 22d927c8 rip=22356420 Invalid memory access of location 22d9292c rip=22357540 [error occurred during error reporting (null), id 0xa] ./run-class.sh: line 10: 15647 Segmentation fault java -Djava.library.path=./lib/native -Dapp.logging.file.path=./log/runtime.log -classpath .:${MYCP} ${CLASSNAME} "${CMD}" run-class.sh is simply a script I've got to run my test class and all that class does is invoke the RXTX API, first one being: CommPortIdentifier.getPortIdentifiers(). Has anyone had any luck with getting latest CVS sources to work on Mac OS X 10.5 64-bit? Any help/pointers would be greatly appreciated. Thank you in advance. -Jac I've attached my configure and make output as txt files. Here's all my build/machine environment info, as per the troubleshooting wiki page: Mac OS X 10.5.6 (9G55) ----------------------------------------------- /usr/bin/java -version java version "1.6.0_07" Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153) Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode) ----------------------------------------------- Darwin my-macbook.local 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 ----------------------------------------------- autoconf (GNU Autoconf) 2.61 Copyright (C) 2006 Free Software Foundation, Inc. This is free software. You may redistribute copies of it under the terms of the GNU General Public License . There is NO WARRANTY, to the extent permitted by law. Written by David J. MacKenzie and Akim Demaille. ----------------------------------------------- automake (GNU automake) 1.10 Written by Tom Tromey and Alexandre Duret-Lutz . Copyright 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ----------------------------------------------- $ libtool -V Apple Computer, Inc. version cctools-698.1 ----------------------------------------------- GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program built for powerpc-apple-darwin9.0 ----------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: my-configure.out.txt Type: application/octet-stream Size: 6934 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090126/89d9c7f6/attachment-0018.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: my-make.out.txt Type: application/octet-stream Size: 7737 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090126/89d9c7f6/attachment-0019.obj From kintel at sim.no Mon Jan 26 16:16:19 2009 From: kintel at sim.no (Marius Kintel) Date: Tue, 27 Jan 2009 00:16:19 +0100 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: Message-ID: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Hi Jac, I've had the same issue, and I suggested a patch to partially fix it a while back: http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html I don't know the status of this in the current incarnation of the rxtx code and I have reverted to Java-1.5 since then.. ~/= Marius -- We are Elektropeople for a better living. From tjarvi at qbang.org Tue Jan 27 08:08:54 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 27 Jan 2009 08:08:54 -0700 (MST) Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: On Tue, 27 Jan 2009, Marius Kintel wrote: > Hi Jac, > > I've had the same issue, and I suggested a patch to partially fix it a > while back: > http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html > > I don't know the status of this in the current incarnation of the rxtx > code and I have reverted to Java-1.5 since then.. > > ~/= Marius > > -- > We are Elektropeople for a better living. > Hmm. That did not get in. I can add it and put a new prerelease out this week. The eis must be a regression. I was sure we fixed that. -- Trent Jarvi tjarvi at qbang.org From jacomoman at hotmail.com Tue Jan 27 08:48:16 2009 From: jacomoman at hotmail.com (Joseph Schmoley) Date: Tue, 27 Jan 2009 07:48:16 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: That would be excellent Trent. I've got a project partially on hold because of this. It runs great on Win32 (XP/Vista), it just has to do the same on Mac 64-bit and Linux 32-bit. I look forward to this pre-release. Again, thanks a bunch to you and all the other code contributors for this excellent project. I wish I could donate something to you guys. I couldn't find a donation link anywhere. RxTx has been a great help with my project. -Jac From: Trent Jarvi Sent: Tuesday, January 27, 2009 7:08 AM To: Marius Kintel Cc: Joseph Schmoley ; rxtx at qbang.org Subject: Re: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit On Tue, 27 Jan 2009, Marius Kintel wrote: > Hi Jac, > > I've had the same issue, and I suggested a patch to partially fix it a > while back: > http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html > > I don't know the status of this in the current incarnation of the rxtx > code and I have reverted to Java-1.5 since then.. > > ~/= Marius > > -- > We are Elektropeople for a better living. > Hmm. That did not get in. I can add it and put a new prerelease out this week. The eis must be a regression. I was sure we fixed that. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090127/bbd287bb/attachment-0008.html From bschlining at gmail.com Tue Jan 27 09:38:26 2009 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 27 Jan 2009 08:38:26 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: > That would be excellent Trent. I've got a project partially on hold > because of this. It runs great on Win32 (XP/Vista), it just has to do the > same on Mac 64-bit and Linux 32-bit. I look forward to this pre-release. > I'm in the same spot too. Looking forward to the pre-release! -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090127/2275013b/attachment-0008.html From andrew.paverd at rorotika.com Wed Jan 28 03:14:58 2009 From: andrew.paverd at rorotika.com (Andrew Paverd) Date: Wed, 28 Jan 2009 12:14:58 +0200 Subject: [Rxtx] RXTX not working on Solaris Message-ID: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Hi all, I am attempting to use RXTX on a Sun SPARC server running Solaris. I have tried the binaries from both the latest release (2.1-7) and the pre-release (2.2pre1). The 2.1-7 driver gives the following error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: fatal: libgcc_s.so.1: open failed: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)" I'm not sure what this "libgcc_s.so.1" file does in terms of RXTX but its absence is preventing the application from running. With the 2.2pre1 binary, the application loads without any issue but does not detect any comm-ports. I know that there are multiple ports available because when using the Sun javax.comm library for Solaris SPARC, the ports are all correctly discovered and the application can read from and write to them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in the 2.2 release. Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if so, how did you do it (which versions did you use etc.)? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090128/a97b220d/attachment-0008.html From tjarvi at qbang.org Wed Jan 28 17:01:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 28 Jan 2009 17:01:50 -0700 (MST) Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: On Wed, 28 Jan 2009, Andrew Paverd wrote: > > Hi all, > > ? > > I am attempting to use RXTX on a Sun SPARC server running Solaris. I have > tried the binaries from both the latest release (2.1-7) and the pre-release > (2.2pre1). > > ? > > The 2.1-7 driver gives the following error: > > ? > > ?Exception in thread "main" java.lang.UnsatisfiedLinkError: > /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: > fatal: libgcc_s.so.1: open failed: No such file or directory > > ??????? at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > ??????? at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) > > ??????? at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) > > ??????? at java.lang.Runtime.loadLibrary0(Runtime.java:823) > > ??????? at java.lang.System.loadLibrary(System.java:1030) > > ??????? at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)? > > ? > > I?m not sure what this ?libgcc_s.so.1? file does in terms of RXTX but its > absence is preventing the application from running. > > ? > > With the 2.2pre1 binary, the application loads without any issue but does > not detect any comm-ports. I know that there are multiple ports available > because when using the Sun javax.comm library for Solaris SPARC, the ports > are all correctly discovered and the application can read from and write to > them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in > the 2.2 release. > > ? > > Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if > so, how did you do it (which versions did you use etc.)? > > ? Hi Andrew ld.so/libgcc_s.so are part of GNU gcc/ld. They are available for solaris. I'm not sure how to link them without requiring them. It is also possible to compile rxtx with Sun's compiler if you have it. Perhaps someone here knows how to get rxtx compiled on Solaris using gcc without requiring those libs by everyone? -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Jan 28 17:39:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 28 Jan 2009 17:39:08 -0700 (MST) Subject: [Rxtx] Problem on 'Trouble Shooting' wiki page. Message-ID: It has been pointed out that the rxtx wiki page says usermod -G may be used to update the group a user is in. http://rxtx.qbang.org/wiki/index.php/Trouble_shooting The corrected text now says to use usermod -aG to add the user to a group in addition to their current group(s). The previous -G version would replace the users current groups with the new group. Replacing group information can cause significant problems for end users. If you have information based upon the wiki, please update your content. Thanks, -- Trent Jarvi tjarvi at qbang.org From andrew.paverd at rorotika.com Thu Jan 29 02:15:35 2009 From: andrew.paverd at rorotika.com (Andrew Paverd) Date: Thu, 29 Jan 2009 11:15:35 +0200 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Thanks for the advice Trent - I was originally using the precompiled librxtxSerial.so. I've subsequently compiled rxtx for Solaris (using gcc) and after copying the libgcc_s.so file to my .../jre/lib/sparc directory, the library loads. However, it does not detect any ports. When I call the getComPortIdentifiers() nothing is returned and I can't connect to any port. Sun's javax.comm package detects and can connect to all the ports. This is the same as when I tried the 2.2pre1 library. Are there any extra steps that must be taken to detect ports on Solaris? (user is member of uucp group) Thanks, Andrew From tristan.dyer at cgi.com Thu Jan 29 05:57:25 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 29 Jan 2009 07:57:25 -0500 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D030BE152@MTL-MSG-02.cgiclients.com> Andrew, I had the same problem, but before I got too far the scope of my project changed, and I don't have to support Solaris anymore.. I was getting a weird error, file does not exist but should, or something like that. The project ended before I figured out why. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Andrew Paverd Sent: January 29, 2009 5:16 AM To: 'Trent Jarvi' Cc: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working on Solaris Thanks for the advice Trent - I was originally using the precompiled librxtxSerial.so. I've subsequently compiled rxtx for Solaris (using gcc) and after copying the libgcc_s.so file to my .../jre/lib/sparc directory, the library loads. However, it does not detect any ports. When I call the getComPortIdentifiers() nothing is returned and I can't connect to any port. Sun's javax.comm package detects and can connect to all the ports. This is the same as when I tried the 2.2pre1 library. Are there any extra steps that must be taken to detect ports on Solaris? (user is member of uucp group) Thanks, Andrew _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Martin.Oberhuber at windriver.com Thu Jan 29 06:15:01 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:15:01 +0100 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2326@ism-mail03.corp.ad.wrs.com> Hi Andrew & Paverd, the trick of compiling with gcc on Solaris such that the libgcc_s.so library is not needed at runtime is that gcc itself must be configured and compiled with special options: cd gcc-src ./configure --disable-shared make Using that specially compiled gcc, you can then build the RXTX library: setenv PATH $HOME/my-gcc/bin:$PATH cd rxtx mkdir build-solaris && cd build-solaris ../configure --disable-lockfiles make For more details, see the original bug and its attachments: http://bugzilla.qbang.org/show_bug.cgi?id=73 An rxtx-2.1-7r2 build for Solaris without libgcc_s dependency is available from the Eclipse packages at http://rxtx.qbang.org/eclipse/downloads/ Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Andrew Paverd Sent: Mittwoch, 28. J?nner 2009 11:15 To: rxtx at qbang.org Subject: [Rxtx] RXTX not working on Solaris Hi all, I am attempting to use RXTX on a Sun SPARC server running Solaris. I have tried the binaries from both the latest release (2.1-7) and the pre-release (2.2pre1). The 2.1-7 driver gives the following error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: fatal: libgcc_s.so.1: open failed: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)" I'm not sure what this "libgcc_s.so.1" file does in terms of RXTX but its absence is preventing the application from running. With the 2.2pre1 binary, the application loads without any issue but does not detect any comm-ports. I know that there are multiple ports available because when using the Sun javax.comm library for Solaris SPARC, the ports are all correctly discovered and the application can read from and write to them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in the 2.2 release. Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if so, how did you do it (which versions did you use etc.)? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090129/d6d73f3e/attachment-0007.html From Martin.Oberhuber at windriver.com Thu Jan 29 06:16:38 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:16:38 +0100 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E232A@ism-mail03.corp.ad.wrs.com> Hi Andrew, one thing I did notice on Solaris was that after closing a port, the Solaris Kernel seems to have some timeout before it can be re-opened. So, when you try it again, make sure that no other application hogs the port or has been hogging it shortly before. It may make sense to try a few times. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Andrew Paverd > Sent: Donnerstag, 29. J?nner 2009 10:16 > To: 'Trent Jarvi' > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX not working on Solaris > > Thanks for the advice Trent - I was originally using the > precompiled librxtxSerial.so. I've subsequently compiled rxtx > for Solaris (using gcc) and after copying the libgcc_s.so > file to my .../jre/lib/sparc directory, the library loads. > > However, it does not detect any ports. When I call the > getComPortIdentifiers() nothing is returned and I can't > connect to any port. Sun's javax.comm package detects and can > connect to all the ports. This is the same as when I tried > the 2.2pre1 library. > > Are there any extra steps that must be taken to detect ports > on Solaris? (user is member of uucp group) > > Thanks, > > > Andrew > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From Martin.Oberhuber at windriver.com Thu Jan 29 06:24:05 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:24:05 +0100 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2335@ism-mail03.corp.ad.wrs.com> Hi Greg, sorry for the late response (just catching up on E-Mails). I do not plan to create any Eclipse bundles before rxtx-2.2 is released. Creating the packages is a bit of an effort, which I'd rather postpone until the release, and then do it only once. In the meantime, if you need it for testing, I think it should be easy to take the existing Eclipse bundles/fragments and simply replace any new DLL's / so's in them, plus use WinZIP to replace the .class files in the Java bundle. For Eclipse, it will still look like rxtx-2.1-7 but in reality it will be your own latest build. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Trent Jarvi > Sent: Sonntag, 04. J?nner 2009 20:42 > To: Greg Johnson > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] [Announce] RXTX 2.2pre1 is available. > > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse > packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be > a popular > spam abuse page. I'll put a license and download link on there. All > other pages are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > > > Hi Trent, > > The download link on rxtx.org > (http://users.frii.com/jarvi/rxtx/) loops back > > to rxtx.org, and the wiki doesn't seem to have a link (top > level at least) to > > download. I think Martin had been generating > (fantastically useful) Eclipse > > bundles, as well - are these available for 2.2pre1 also? > > > > Many thanks to everyone for their work - rxtx is an > essential part of our > > product, and we have been keenly awaiting this release. > > > > Regards, > > greg > > > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > > > >> > >> The binaries, source and pending wiki move are now announced on > >> http://www.rxtx.org. After this has baked, we can put > the web install in. > >> > >> Changes in rxtx 2.2 (If I missed something let me know): > >> ... snip ... > >> > >> -- > >> Trent Jarvi > >> tjarvi at qbang.org_______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > -- > > Greg Johnson, PhD > > Director of Engineering > > http://www.rbr-global.com > > greg.johnson at rbr-global.com > > +1.613.233.1621 (GMT-5) office > > > > > > See us at: Ocean Business 2009, Southampton, England, March > 31 - April 1, > > 2009 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From Martin.Oberhuber at windriver.com Thu Jan 29 06:32:57 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:32:57 +0100 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> Hi Tristan, > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); I think that this code is wrong. User code must not call the RXTXCommDriver constructor, since you cannot initialize it properly. What you can do to announce previously unknown port names is this: System.setProperty("gnu.io.rxtx.SerialPorts","/dev/term/a"); before you first access any RXTX function. For details, see the code in RXTXCommDriver#registerSpecifiedPorts() > What is the output of System.getProperty("os.name") on OpenSolaris? I didn't see any response of yours to this question from Trent. What does OpenSolaris output? Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Trent Jarvi > Sent: Mittwoch, 31. Dezember 2008 20:04 > To: Dyer, Tristan > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX for OpenSolaris 2008.11 > > > > On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > > > > Hi, > > > > I have tried building the rxtx library for OpenSolaris 2008.11. > > > > It seemed to build fine without errors, however code such as > > > > ????? java.util.Enumeration portList > > ???????? = CommPortIdentifier.getPortIdentifiers(); > > ????? boolean found = false; > > ????? while (portList.hasMoreElements()) { > > ???????? portId = (CommPortIdentifier) portList.nextElement(); > > ???????? System.out.println(" " + portId.getName()); > > ???????? if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > > ?????????? ???? ?? System.out.println("found"); > > ?????????????? found = true; > > ?????????????? break; > > ??????????? } > > ???????? } > > ????? } > > Will output nothing. > > > > Or rather it seems as if there are no ports found by RXTX. > This code works > > on Ubuntu8.04 and winXP. > > > > If I Add the port manually and then try and open the port > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > > ????? try{ > > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > > ????? } > > ????? catch(Exception e){ > > ??? ??? ? System.out.println("NoSuchPortException"); > > ??? ??? ? //ignore > > ????? } > > ????? try { > > ??????? ???????? System.out.println("opening port"); > > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > > WAIT_TO_OPEN); > > ??????????? connected = true; > > ??????????? System.out.println("Connected to port " + > portId.getName()); > > ???????? } catch (PortInUseException p) { > > ??????????? if (DEBUG) { > > ?????????????? System.err.println(p); > > ??????????? } > > ??????????? port = null; > > ??????????? portId = null; > > ??????????? System.out.println("PortInUseException"); > > ??????????? p.printStackTrace(); > > ???????? } > > > > I will get the following, but not the NoSuchPortException. > > > > java.lang.reflect.InvocationTargetException > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Caused by: java.lang.NullPointerException > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:296) > > > > ??????? ... 7 more > > > > > > As well as > > > > java.lang.NullPointerException > > ??????? at > gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > > ??????? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > > ??????? at > > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:255) > > > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > > > Did I build it wrong? Or is there a problem with > OpenSolaris that will > > prevent this from working? Or am I missing something > incredibly simple? > > > > As well OpenSolaris is running inside a VM with COM1 mapped to > > COM1(VirtualBox) which I believe maps it to /dev/term/a > > > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > > > > > Hi Tristan? > > What is the output of System.getProperty("os.name") on > OpenSolaris? We > have logic like the following in RXTX to handle platform specific > information: > > if ( osName.equals("Solaris") || osName.equals("SunOS")) > > Which may not be getting hit. The result if you will never > call private > void checkSolaris(String PortName, int PortType). > > It could also result in Solaris specific settings not being > set in the > Makefile. > > > The os.name is displayed when you run the configure script. > > -- > Trent Jarvi > tjarvi at qbang.org > From Martin.Oberhuber at windriver.com Thu Jan 29 06:38:20 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:38:20 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] how do you dynamically reload native libraries? In-Reply-To: References: Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2341@ism-mail03.corp.ad.wrs.com> Hi Douglas, Eclipse / OSGi may be doing what you want. It does say that multiple versions of a lib can co-exist at the same time, when the MANIFEST.MF doesn't specify a lib as a singleton. I'm not sure though if or how that would work with native libs. Eclipse bundles for RXTX-2.1-7r2 are available on http://rxtx.qbang.org/eclipse/downloads/ You could build RXTX-2.2pre and then manually create those Eclipse bundles just by adding the MANIFEST.MF to the JAR with the version number exchanged. Then you should be able to try it out. If you do, let me know how it goes... Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Samstag, 27. Dezember 2008 15:00 > To: rxtx at qbang.org; lyon at docjava.com > Subject: [Suspected Spam][Blocked Sender][Rxtx] how do you > dynamically reload native libraries? > > Hi All, > I am trying to test multiple versions of the RXTX native libraries > in a single JVM. > > Each RXTX library instance can share a single virtual machine, but > must have an isolated context class loader. > A context class loader maps a thread to specific classes and > resources. > When the thread dies, the classes and resources are freed. > > Is there some way to have multiple context class loaders that can > load different native method > library implementations? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Thu Jan 29 07:50:05 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 29 Jan 2009 09:50:05 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D030BE22B@MTL-MSG-02.cgiclients.com> Sorry, I had sent it to Trent alone. It outputs "SunOS" Also I had only added that line as a test to see if explicitly adding the port would make a difference, it didn't. My project scope has been reduced so I don't need to support solaris anymore, but I will return to the problem when things slow down. I do remember that the error that was being reported by the native code was "2" which I believe maps to "ENOENT No such file or directory A file name is specified and the file should exist but doesn't, or one of the directories in a path name does not exist." I didn't get much farther. Thanks, -- Tristan Dyer -----Original Message----- From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] Sent: January 29, 2009 9:33 AM To: Trent Jarvi; Dyer, Tristan Cc: rxtx at qbang.org Subject: RE: [Rxtx] RXTX for OpenSolaris 2008.11 Hi Tristan, > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); I think that this code is wrong. User code must not call the RXTXCommDriver constructor, since you cannot initialize it properly. What you can do to announce previously unknown port names is this: System.setProperty("gnu.io.rxtx.SerialPorts","/dev/term/a"); before you first access any RXTX function. For details, see the code in RXTXCommDriver#registerSpecifiedPorts() > What is the output of System.getProperty("os.name") on OpenSolaris? I didn't see any response of yours to this question from Trent. What does OpenSolaris output? Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Mittwoch, 31. Dezember 2008 20:04 > To: Dyer, Tristan > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX for OpenSolaris 2008.11 > > > > On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > > > > Hi, > > > > I have tried building the rxtx library for OpenSolaris 2008.11. > > > > It seemed to build fine without errors, however code such as > > > > ????? java.util.Enumeration portList > > ???????? = CommPortIdentifier.getPortIdentifiers(); > > ????? boolean found = false; > > ????? while (portList.hasMoreElements()) { > > ???????? portId = (CommPortIdentifier) portList.nextElement(); > > ???????? System.out.println(" " + portId.getName()); > > ???????? if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > > ?????????? ???? ?? System.out.println("found"); > > ?????????????? found = true; > > ?????????????? break; > > ??????????? } > > ???????? } > > ????? } > > Will output nothing. > > > > Or rather it seems as if there are no ports found by RXTX. > This code works > > on Ubuntu8.04 and winXP. > > > > If I Add the port manually and then try and open the port > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > > ????? try{ > > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > > ????? } > > ????? catch(Exception e){ > > ??? ??? ? System.out.println("NoSuchPortException"); > > ??? ??? ? //ignore > > ????? } > > ????? try { > > ??????? ???????? System.out.println("opening port"); > > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > > WAIT_TO_OPEN); > > ??????????? connected = true; > > ??????????? System.out.println("Connected to port " + > portId.getName()); > > ???????? } catch (PortInUseException p) { > > ??????????? if (DEBUG) { > > ?????????????? System.err.println(p); > > ??????????? } > > ??????????? port = null; > > ??????????? portId = null; > > ??????????? System.out.println("PortInUseException"); > > ??????????? p.printStackTrace(); > > ???????? } > > > > I will get the following, but not the NoSuchPortException. > > > > java.lang.reflect.InvocationTargetException > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Caused by: java.lang.NullPointerException > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:296) > > > > ??????? ... 7 more > > > > > > As well as > > > > java.lang.NullPointerException > > ??????? at > gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > > ??????? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > > ??????? at > > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:255) > > > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > > > Did I build it wrong? Or is there a problem with > OpenSolaris that will > > prevent this from working? Or am I missing something > incredibly simple? > > > > As well OpenSolaris is running inside a VM with COM1 mapped to > > COM1(VirtualBox) which I believe maps it to /dev/term/a > > > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > > > > > Hi Tristan > > What is the output of System.getProperty("os.name") on OpenSolaris? > We have logic like the following in RXTX to handle platform specific > information: > > if ( osName.equals("Solaris") || osName.equals("SunOS")) > > Which may not be getting hit. The result if you will never call > private void checkSolaris(String PortName, int PortType). > > It could also result in Solaris specific settings not being set in the > Makefile. > > > The os.name is displayed when you run the configure script. > > -- > Trent Jarvi > tjarvi at qbang.org > From hho at bibliotheca.dk Thu Jan 29 08:00:49 2009 From: hho at bibliotheca.dk (Hans Hvelplund Odborg) Date: Thu, 29 Jan 2009 16:00:49 +0100 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: I know that there arent any guarantees, but could someone involved with the development of RxTx please guesstimate when 2.2 final will be released? I'm not familiar with the pre-release history of 2.1-7 but I read that there was 20 pre-relases of 2.1-7 so I guess (based on current pre-release rate) that 2.2 may easily be more than 6 months away? Thanks Med venlig hilsen / Best regards / Med v?nliga h?lsningar Hans Hvelplund Odborg BIBLIOTHECA A/S Vallensb?kvej 22A, 2. TH ? 2605 Br?ndby ? Denmark Mob.: +45 30235940 Tel.: +45 70271008 Fax: +45 70271009 hho at bibliotheca.dk www.bibliotheca.dk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: 4. januar 2009 20:15 To: rxtx at qbang.org Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Jan 29 08:33:33 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 29 Jan 2009 08:33:33 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: Projects tend to evolve from an adhoc release process to predictable releases when enough projects demand it (and help make it happen). "Its ready when Its ready" is a typical answer prior to the above. I lik$ to say "The beatings will continue until moral improves." I expect moral to improve in the next six months at most. This release i$ resolving 3 larger issues. 1) syncing of some large efforts to the same source code. 2) incorperating all community patches 3) building the binaries correctly. This does not include fixing everyones bugs. But it does include making sure the fixes get in if they are provided. Given the above, I don't expect this to be as drawn out as 2.1-7pre*. We may have several stable releases during the same period. On Thu, 29 Jan 2009, Hans Hvelplund Odborg wrote: > I know that there arent any guarantees, but could someone involved with the > development of RxTx please guesstimate when 2.2 final will be released? > > I'm not familiar with the pre-release history of 2.1-7 but I read that there > was 20 pre-relases of 2.1-7 so I guess (based on current pre-release rate) > that 2.2 may easily be more than 6 months away? > > Thanks > > Med venlig hilsen / Best regards / Med v?nliga h?lsningar > Hans Hvelplund Odborg > > BIBLIOTHECA A/S > Vallensb?kvej 22A, 2. TH ? 2605 Br?ndby ? Denmark > Mob.: +45 30235940 > Tel.: +45 70271008 > Fax: +45 70271009 > hho at bibliotheca.dk > www.bibliotheca.dk > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: 4. januar 2009 20:15 > To: rxtx at qbang.org > Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. > > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org. After this has baked, we can put the web install > in. > > Changes in rxtx 2.2 (If I missed something let me know): > > threshold fix > Alexandre Rusev > http://bugzilla.qbang.org/show_bug.cgi?id=85 > > RXTX close deadlocks in REXTXPort.finalize > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=53 > > Add ACM serial devices to all known ports. > Duncan Pierce > http://bugzilla.qbang.org/show_bug.cgi?id=51 > > Concurrency fixes for SMP/multicore systems > U. George > http://bugzilla.qbang.org/show_bug.cgi?id=100 > > Fixes for MAC systems with no drivers installed. > 1.5 stop bit fix > > Enable universal library builds for Mac OS X > Andre-John Mas ajmas at sympatico.ca > > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > Do not remove and ignore interrupts. > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=45 > > find ports which were added after program startup on Mac > OS X. > Martin Oberhuber > http://bugzilla.qbang.org/show_bug.cgi?id=48 > > Clean up CommPort Ownership code, avoid possible deadlocks, > fix lost commport ownership events. > Martin Oberhuber > http://bugzilla.qbang.org/show_bug.cgi?id=83 > > rxtx does not compile against JDK-1.6 > Neboj?a > http://bugzilla.qbang.org/show_bug.cgi?id=84 > > configure script failed at line UTS_RELEASE > megov > http://bugzilla.qbang.org/show_bug.cgi?id=80 > > code cleanup patch (extra ';' creates bug for if statements > + new String() calls removed) > Xavier Le Vourch > http://bugzilla.qbang.org/show_bug.cgi?id=77 > > Wont compile on linux ppc with glibc 2.5 - no sys/io.h > Brian Johnson > http://bugzilla.qbang.org/show_bug.cgi?id=72 > > rxtx overwrites System properties > Andrew Gillett > Nektarios K. Papadopoulos > Neboj?a > http://bugzilla.qbang.org/show_bug.cgi?id=64 > > Solaris ACM port support > Dave Cleal > http://bugzilla.qbang.org/show_bug.cgi?id=59 > > Setting of non-standard baud rate fails. > Andrew Prunicki > http://bugzilla.qbang.org/show_bug.cgi?id=58 > > RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=50 > > JavaDoc fixes > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > From mmornati at byte-code.com Fri Jan 30 02:32:44 2009 From: mmornati at byte-code.com (Marco Mornati) Date: Fri, 30 Jan 2009 10:32:44 +0100 Subject: [Rxtx] Linux Library Message-ID: <1233307964.4046.19.camel@localhost.localdomain> Hello, I made a little Applet added to my web application to support BarCode printer (on serial port). All is autoconfigured during applet init: dll/so are copied on /tmp folder on local computer and with System.load(/tmp/library.so/dll) I'm adding the library to classpath. On windows all works correctly and I'm able to print (jar is signed... without signing it there's no way to communicate with serial port). I've just a little problem on linux. It seams that library is not added to classpath, because when I try to connect with com port, applet says that is impossible to find .so. Any idea on what could be the problem? Just for information I post here my code: Container content = getContentPane(); content.setBackground(Color.white); content.setLayout(new FlowLayout()); String libraryFile = ""; String libraryName = ""; if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")) { libraryName = DLL_SERIAL_NAME; libraryFile = System.getProperty("java.io.tmpdir") + DLL_SERIAL_NAME; } else if (System.getProperty("os.name").toUpperCase().contains("LINUX")) { if (System.getProperty("os.arch").contains("i386")) { libraryName = SO_SERIAL_NAME_32; } else { libraryName = SO_SERIAL_NAME_64; } char fileSeparator = System.getProperty("file.separator").charAt(0); libraryFile = System.getProperty("java.io.tmpdir") + fileSeparator + SO_SERIAL_NAME; } System.out.println("Library File: " + libraryFile); /** * Copying DLL to java bin dir (if it's not already present) */ if (!verifyLibraryExistence(libraryFile)) { System.out.println("Library file does not exist"); copyResourceFromJar(libraryFile, libraryName); } try { System.load(libraryFile); } catch (Exception e) { System.out.println("Cannot load " + libraryFile + " you have to install it manually!!"); } try { content.add(new JLabel("Initializing Applet!")); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); content.add(new JLabel("List Porte: " + portList)); if (portList == null) { content.add(new JLabel("No Serial Port Found!!")); } while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL)) { System.out.println("Porta Trovata: " + portId.getName()); content.add(new JLabel("Porta Trovata: " + portId.getName())); } break; } } catch (Exception e) { content.add(new JLabel("Exception: " + e)); e.printStackTrace(); } Thanks a lot Bye Marco -- Dott. Ing. Mornati Marco Byte-Code s.r.l via Antonio Cechov, 1 San Giuliano Milanese (MI) E-Mail: mmornati at byte-code.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090130/c176573f/attachment-0006.bin From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0032.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0032.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0030.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0030.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0030.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0030.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0029.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0027.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0027.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0027.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0027.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0027.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0024.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0024.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0024.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment-0023.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0023.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment-0023.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment-0023.html From tjarvi at qbang.org Wed Jan 14 18:56:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 14 Jan 2009 18:56:50 -0700 (MST) Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Message-ID: On Wed, 14 Jan 2009, Jaakko Sipari wrote: > Hi (again)! > > Could someone clarify what these methods actually do and are they even > implemented? Do I get into trouble with buffer values of 0 (if I want to > handle the buffers myself)? > rxtx does not have buffers. It was not clear to me at the time why there would be a buffer when java already provides buffered input and output streams that can sit on top of rxtx. One reason I can see for implementing buffers in rxtx is to get data off the port so select() can block. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Wed Jan 14 23:23:08 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 15 Jan 2009 08:23:08 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> Message-ID: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Here's the same message for the list also. Forgot to do "Reply to all" ---------- Forwarded message ---------- From: Jaakko Sipari Date: Thu, Jan 15, 2009 at 8:22 AM Subject: Re: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize To: Trent Jarvi On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! >> >> Could someone clarify what these methods actually do and are they even >> implemented? Do I get into trouble with buffer values of 0 (if I want to >> handle the buffers myself)? >> >> > rxtx does not have buffers. It was not clear to me at the time why there > would be a buffer when java already provides buffered input and output > streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data off > the port so select() can block. > So basically those methods have currently no effect at all? - Jaakko -- Jaakko Sipari tel. +358451238191 eMail. jaakko.sipari at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090115/8b4c47c0/attachment-0022.html From tjarvi at qbang.org Thu Jan 15 18:37:12 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 15 Jan 2009 18:37:12 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: On Thu, 15 Jan 2009, Jaakko Sipari wrote: > Here's the same message for the list also. Forgot to do "Reply to all" > > ---------- Forwarded message ---------- > From: Jaakko Sipari > Date: Thu, Jan 15, 2009 at 8:22 AM > Subject: Re: [Rxtx] The functionality behind setInputBufferSize & > setOutputBufferSize > To: Trent Jarvi > > > On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! > > Could someone clarify what these methods actually do > and are they even > implemented? Do I get into trouble with buffer > values of 0 (if I want to > handle the buffers myself)? > > > rxtx does not have buffers. ?It was not clear to me at the time why > there would be a buffer when java already provides buffered input and > output streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data > off the port so select() can block. > > > So basically those methods have currently no effect at all? > Correct. You can use BufferedInputStream and BufferedOutputStream from the Java API once you get the Input/OutputStream from rxtx. But changing the input and output buffer size in rxtx is not going to change behavior. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Fri Jan 16 01:22:37 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Fri, 16 Jan 2009 10:22:37 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> > So basically those methods have currently no effect at all? >> >> > Correct. You can use BufferedInputStream and BufferedOutputStream from the > Java API once you get the Input/OutputStream from rxtx. But changing the > input and output buffer size in rxtx is not going to change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > I assume there still is some kind of buffer in rxtx (or the serial port driver) in case of processing delays. I mean, if the serial port gives data faster than can be read from the Java program using rxtx it isn't just thrown away, right? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090116/3bd9a52e/attachment-0021.html From tjarvi at qbang.org Fri Jan 16 05:17:24 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 16 Jan 2009 05:17:24 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> Message-ID: On Fri, 16 Jan 2009, Jaakko Sipari wrote: > > So basically those methods have currently no effect > at all? > > > Correct. ?You can use BufferedInputStream and BufferedOutputStream > from the Java API once you get the Input/OutputStream from rxtx. ?But > changing the input and output buffer size in rxtx is not going to > change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > > > > I assume there still is some kind of buffer in rxtx (or the serial port > driver) in case of processing delays. I mean, if the serial port gives data > faster than can be read from the Java program using rxtx it isn't just > thrown away, right? > The UART can usually hold a few bytes. The kernel driver can buffer the input. In practice, it works. With Sun commapi, the typical application has 4 buffers between the user and the incomming data. With rxtx, it is 3. BufferedInputStream -> commapi/rxtx -> kernel driver -> UART If you really do run into overflows on the UART, then hardware flow control is what you should be using and tinkering with rxtx to avoid it is not a very sound approach. -- Trent Jarvi tjarvi at qbang.org From llowrey at nuclearwinter.com Sun Jan 18 12:49:39 2009 From: llowrey at nuclearwinter.com (Larkin Lowrey) Date: Sun, 18 Jan 2009 13:49:39 -0600 Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain Message-ID: <497387D3.9040201@nuclearwinter.com> After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when running code that uses RXTXComm. The crashes only occur when using 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. As far as I can tell, the crash happens immediately on start. I can't see any evidence of much, if anything, happening before the crash. The code used to work and only stopped working after the "upgrade" to FC10. I have tried RXTX v2.1 and 2.2pre1. Any ideas? Here's the error: # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode linux-amd64) # Problematic frame: # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 --Larkin From tjarvi at qbang.org Mon Jan 19 17:48:34 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 19 Jan 2009 17:48:34 -0700 (MST) Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain In-Reply-To: <497387D3.9040201@nuclearwinter.com> References: <497387D3.9040201@nuclearwinter.com> Message-ID: On Sun, 18 Jan 2009, Larkin Lowrey wrote: > After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when > running code that uses RXTXComm. The crashes only occur when using > 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. > > As far as I can tell, the crash happens immediately on start. I can't > see any evidence of much, if anything, happening before the crash. > > The code used to work and only stopped working after the "upgrade" to > FC10. I have tried RXTX v2.1 and 2.2pre1. > > Any ideas? > > Here's the error: > > # > # An unexpected error has been detected by Java Runtime Environment: > # > # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 > # > # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode > linux-amd64) > # Problematic frame: > # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 > > > --Larkin Hi Larkin, I can think of 2 segv's in rxtx that may apply. Both are fixed in rxtx 2.2pre.. The first was that pointers required by nativeDrain needed to be stored in something larger than a 32 bit integer in java. This resulted in a crash like you see the first time the 'nativedrain' thread tried to use the pointer. The second was a concurrency issue George resolved with synchronization. The crash was usually during close but happened in the 'nativedrain' thread. (eventLoop) As mentioned, these are both fixed in the prerelease. There is a class provided in recent versions of RXTX that allow you confirm the version being used: gnu.io.RXTXVersion with member methods getVersion() and nativeGetVersion(). This allows you to confirm that you are indeed using the version you think you are. -- Trent Jarvi tjarvi at qbang.org From alexandrepoletto at gmail.com Wed Jan 21 11:48:07 2009 From: alexandrepoletto at gmail.com (Alexandre Poletto) Date: Wed, 21 Jan 2009 16:48:07 -0200 Subject: [Rxtx] work in windows but dont work in linux Message-ID: hi folks, I have an application to communicate with the serial port using rxtx, in the windows os my application works well, but when i try to run in the linux os i open the port (in windows "COM1", in Linux "/dev/ttyS0") send my commandes but i never receive any answer. I'm using ubuntu 8.10 and java 1.5, there is any configuration in that i'm missing? Thanks for the help! ps: Sorry form my bad english :( -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/70baea51/attachment-0015.html From jmudd at dtiweb.net Wed Jan 21 14:08:04 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Wed, 21 Jan 2009 16:08:04 -0500 Subject: [Rxtx] Hot unplugging of a USB device Message-ID: Looking to see if the issues surrounding an uplugging of a USB device have been resolved. I see from the mail list archives and bug reports that others have noted this issue. I have a USB GPS Receiver that is plugged into a Windows (XP) system and am using Netbeans 6.5 and Java jdk 1.6 and RXTX 2.1.7 and 2.2pre1. In the thread that is reading data via listening for a SerialEvent I can capture a Java IOException: No error in readArray. The application is essentially hung at this point. Only a termination of the application will clear it up and not leave the port hung. I had read in the archives that this is because the event loop in the native code portion is continually putting out the exceptions. I had also seen that this might be addressed in future releases. Any help is appreciated. Thanks, Jerry ________________________________ Jerry Mudd Senior Programmer 21795 Shangri-La Drive, Ste C Lexington Park, MD 20653 (301) 737-8893 (301) 737-8897 Fax jmudd at dtiweb.net www.dtiweb.net This message may contain sensitive, proprietary and/or privileged information. Disclosure is not authorized unless provided in writing by Defense Technologies, Inc. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0015.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 6296 bytes Desc: image001.gif Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0015.gif From netbeans at gatworks.com Wed Jan 21 17:33:46 2009 From: netbeans at gatworks.com (U. George) Date: Wed, 21 Jan 2009 19:33:46 -0500 Subject: [Rxtx] Hot unplugging of a USB device In-Reply-To: References: Message-ID: <4977BEEA.4020708@gatworks.com> > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:34 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:34 +1100 Subject: [Rxtx] Part 1 of 2 parts re rxtx 2.2 pre.. and OSX Message-ID: Hi, I have tried out the latest version of rxtx on a mac and can report that running with ImageJ (32 bit ) all seems to be fine. However when I attempt to use it with ImageJ64, I get a crash whenever the serial port is used. The details follow. What I did. Ran our plug-in in ImageJ 64 bit (1.42g) for Measuring, which is using the latest rxtx (the beta 2.2 compiled on 30 December 2008) for MacOSX 10.5.x) I installed this by putting the two files in the directory ~ LIBRARY/JAVA/EXTENSIONS. The Plug-in uses the serial port. The window we put up to show the numbers from the stage appeared, but only with the default "0" (zero) in each row, which is what we put there until we get data back from the port and the device attached. Then it crashed. I should point out that this all works fine using ImageJ (32 bit) 1.42g, on the same platform. So the only difference is the use of ImageJ 64 bit, and I guess the version of rxtx for 64 bit. I hope that cleverer people than me can throw some light onto this little problem. ImageJ64 seems to work ok until rxtx is called, although I haven't tried much so far, just some 3D rendering with 1 Gb of image data, which all went well, apart from the fact that the data was marginal. I am now showing the data supplied by the report to Apple window. This has three tabs, one to write your information in, one called Problem Details, and the third called SYSTEM CONFIG. These are pasted in below. Best wishes Noel Problem Details Process: JavaApplicationStub [463] Path: /Applications/ImageJ/ImageJ64.app/Contents/MacOS/JavaApplicationStub Identifier: gov.nih.info.rsb.ImageJ Version: ??? (10.2) Code Type: X86-64 (Native) Parent Process: launchd [398] Date/Time: 2009-01-19 10:48:09.342 +1100 OS Version: Mac OS X 10.5.6 (9G55) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000000029507c8 Crashed Thread: 16 Application Specific Information: Java information: Exception type: Bus Error (0xa) at pc=0x00000006ff70f418 Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0_07-b06-57 mixed mode macosx-amd64) Current thread (0x00000001020de800): JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] Stack: [0x0000000702851000,0x0000000702951000] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j gnu.io.RXTXPort.readByte()I+0 j gnu.io.RXTXPort$SerialInputStream.read()I+81 j SerialConnection.serialEvent(Lgnu/io/SerialPortEvent;)V+41 j gnu.io.RXTXPort.sendEvent(IZ)Z+382 v ~BufferBlob::StubRoutines (1) j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~BufferBlob::StubRoutines (1) Java Threads: ( => current thread ) =>0x00000001020de800 JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] 0x00000001020e8800 JavaThread "Measure XYZ" [_thread_blocked, id=44384256, stack(0x0000000702954000,0x0000000702a54000)] 0x0000000102001000 JavaThread "DestroyJavaVM" [_thread_blocked, id=25169920, stack(0x0000000101001000,0x0000000101801000)] 0x00000001020da800 JavaThread "SocketListener" [_thread_in_native, id=29671424, stack(0x0000000701b4c000,0x0000000701c4c000)] 0x00000001020b4800 JavaThread "AWT-EventQueue-0" [_thread_in_Java, id=-27992064, stack(0x00000006fe44e000,0x00000006fe54e000)] 0x0000000102096000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=-34344960, stack(0x00000006fde3f000,0x00000006fdf3f000)] 0x0000000102078000 JavaThread "AWT-Shutdown" [_thread_blocked, id=-58392576, stack(0x00000006fc750000,0x00000006fc850000)] 0x0000000102077800 JavaThread "AWT-AppKit" daemon [_thread_in_native, id=1886770976, stack(0x00007fff5f400000,0x00007fff5fc00000)] 0x0000000102044800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=-333877248, stack(0x00000006ec097000,0x00000006ec197000)] 0x0000000102043000 JavaThread "CompilerThread1" daemon [_thread_blocked, id=-334938112, stack(0x00000006ebf94000,0x00000006ec094000)] 0x0000000102041800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=-335998976, stack(0x00000006ebe91000,0x00000006ebf91000)] 0x0000000102041000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=-337059840, stack(0x00000006ebd8e000,0x00000006ebe8e000)] 0x0000000102029800 JavaThread "Finalizer" daemon [_thread_blocked, id=-338214912, stack(0x00000006ebc74000,0x00000006ebd74000)] 0x0000000102028800 JavaThread "Reference Handler" daemon [_thread_blocked, id=-339333120, stack(0x00000006ebb63000,0x00000006ebc63000)] Other Threads: 0x0000000102020800 VMThread [stack: 0x00000006eba60000,0x00000006ebb60000] [id=-340393984] 0x0000000102046000 WatcherThread [stack: 0x00000006ec19a000,0x00000006ec29a000] [id=-332816384] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 76480K, used 14448K [0x0000000105800000, 0x000000010ad50000, 0x00000002f9800000) eden space 65600K, 22% used [0x0000000105800000, 0x000000010661c398, 0x0000000109810000) from space 10880K, 0% used [0x0000000109810000, 0x0000000109810000, 0x000000010a2b0000) to space 10880K, 0% used [0x000000010a2b0000, 0x000000010a2b0000, 0x000000010ad50000) tenured generation total 174784K, used 0K [0x00000002f9800000, 0x00000003042b0000, 0x00000006e1800000) the space 174784K, 0% used [0x00000002f9800000, 0x00000002f9800000, 0x00000002f9800200, 0x00000003042b0000) compacting perm gen total 21248K, used 10319K [0x00000006e1800000, 0x00000006e2cc0000, 0x00000006e6c00000) the space 21248K, 48% used [0x00000006e1800000, 0x00000006e2213d28, 0x00000006e2213e00, 0x00000006e2cc0000) No shared spaces configured. Virtual Machine Arguments: JVM Args: -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher. framework/Resources/LauncherSupport.jar -Xms256m -Xmx24000m -Dcom.apple.macos.useScreenMenuBar=false -Dcom.apple.mrj.application.growbox.intrudes=false -Dcom.apple.mrj.application.live-resize=true -Dcom.apple.hwaccel=false -Dapple.awt.Antialiasing=false -Dcom.apple.smallTabs=true -Dapple.awt.brushMetalLook=false Java Command: Launcher Type: generic Physical Memory: Page Size = 4k, Total = 2048M, Free = 30996M Thread 0: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 com.apple.CoreFoundation 0x00007fff8204dc4f CFRunLoopRunSpecific + 1631 3 com.apple.HIToolbox 0x00007fff839fdda2 RunCurrentEventLoopInMode + 278 4 com.apple.HIToolbox 0x00007fff839fdbd8 ReceiveNextEventCommon + 322 5 com.apple.HIToolbox 0x00007fff839fda83 BlockUntilNextEventMatchingListInMode + 79 6 com.apple.AppKit 0x00007fff8299d3b0 _DPSNextEvent + 603 7 com.apple.AppKit 0x00007fff8299ccf1 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 136 8 com.apple.AppKit 0x00007fff82996a84 -[NSApplication run] + 455 9 libawt.jnilib 0x00000006ec433257 +[AWTStarter startAWT:] + 1343 10 libawt.jnilib 0x00000006ec432c46 -[CPerformer perform] + 112 11 com.apple.Foundation 0x00007fff8153f2b4 __NSThreadPerformPerform + 148 12 com.apple.CoreFoundation 0x00007fff8204e0e8 CFRunLoopRunSpecific + 2808 13 ...ple.JavaApplicationLauncher 0x0000000100005165 startupJava(LauncherArgsStruct*) + 235 14 ...ple.JavaApplicationLauncher 0x000000010000579c launchJavaApplication + 1224 15 JavaApplicationStub 0x0000000100000b9c 0x100000000 + 2972 Thread 1: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x0000000101a93b61 JVM_GetCPFieldModifiers + 128961 5 libjvm.dylib 0x0000000101a93a36 JVM_GetCPFieldModifiers + 128662 6 ...ple.JavaApplicationLauncher 0x000000010000c0ce startJavaApplication + 2886 7 ...ple.JavaApplicationLauncher 0x000000010000506d java_main_stub(void*) + 9 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 2: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libSystem.B.dylib 0x00007fff840db0b0 mach_msg_server + 436 3 libjvm.dylib 0x000000010181176d JNI_CreateJavaVM_Impl + 53277 4 libjvm.dylib 0x0000000101811375 JNI_CreateJavaVM_Impl + 52261 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 3: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x00000001018e452f JVM_Lseek + 235727 5 libjvm.dylib 0x00000001018e42df JVM_Lseek + 235135 6 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 7 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 8 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 4: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x00000001028003ea 0 + 4336911338 11 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 12 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 13 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 14 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 15 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 16 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 17 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 18 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 19 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 20 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 5: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 6: 0 libSystem.B.dylib 0x00007fff8406dd72 semaphore_wait_trap + 10 1 libjvm.dylib 0x0000000101915bdb JVM_IsPrimitiveClass + 12139 2 libjvm.dylib 0x00000001019155b5 JVM_IsPrimitiveClass + 10565 3 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 4 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 7: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 8: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 9: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x0000000101918ec8 JVM_IsPrimitiveClass + 25176 5 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 6 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 7 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 10: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x000000010191abb5 JVM_IsPrimitiveClass + 32581 4 libjvm.dylib 0x000000010191a70a JVM_IsPrimitiveClass + 31386 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 11: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 12: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x0000000102803414 0 + 4336923668 12 ??? 0x00000001028003ea 0 + 4336911338 13 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 14 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 15 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 16 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 17 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 18 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 19 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 20 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 21 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 22 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 13: 0 ??? 0x0000000102817034 0 + 4337004596 1 ??? 0x000000010280304e 0 + 4336922702 2 ??? 0x0000000102803093 0 + 4336922771 3 ??? 0x000000010280356d 0 + 4336924013 4 ??? 0x0000000102803093 0 + 4336922771 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x000000010280356d 0 + 4336924013 8 ??? 0x0000000102803093 0 + 4336922771 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x0000000102802f3a 0 + 4336922426 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102802f3a 0 + 4336922426 14 ??? 0x0000000102802f3a 0 + 4336922426 15 ??? 0x0000000102803162 0 + 4336922978 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102802f3a 0 + 4336922426 19 ??? 0x0000000102802f3a 0 + 4336922426 20 ??? 0x00000001028003ea 0 + 4336911338 21 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 22 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 23 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 24 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 25 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 26 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 27 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 28 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 29 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 30 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 14: 0 libSystem.B.dylib 0x00007fff840f210e accept + 10 1 libnet.jnilib 0x00000006ff6b6b11 Java_java_net_PlainSocketImpl_socketAccept + 277 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x0000000102802f3a 0 + 4336922426 4 ??? 0x0000000102802f3a 0 + 4336922426 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x0000000102803414 0 + 4336923668 8 ??? 0x00000001028003ea 0 + 4336911338 9 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 10 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 11 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 12 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 13 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 14 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 15 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 16 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 17 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 18 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 15: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x000000010280304e 0 + 4336922702 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102803414 0 + 4336923668 14 ??? 0x0000000102803093 0 + 4336922771 15 ??? 0x0000000102803093 0 + 4336922771 16 ??? 0x0000000102803093 0 + 4336922771 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102803414 0 + 4336923668 19 ??? 0x00000001028003ea 0 + 4336911338 20 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 21 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 22 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 23 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 24 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 25 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 26 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 27 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 28 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 29 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 Crashed: 0 librxtxSerial.jnilib 0x00000006ff70f418 read_byte_array + 68 1 librxtxSerial.jnilib 0x00000006ff70f9b3 Java_gnu_io_RXTXPort_readByte + 93 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x000000010280304e 0 + 4336922702 4 ??? 0x000000010280304e 0 + 4336922702 5 ??? 0x0000000102803414 0 + 4336923668 6 ??? 0x00000001028003ea 0 + 4336911338 7 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 8 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 9 libjvm.dylib 0x00000001018e5be8 JVM_Lseek + 241544 10 libjvm.dylib 0x0000000101900b11 JVM_MonitorWait + 17249 11 libjvm.dylib 0x0000000101a1e59e JVM_DisableCompiler + 1166 12 librxtxSerial.jnilib 0x00000006ff70d91e send_event + 132 13 librxtxSerial.jnilib 0x00000006ff70e82b report_serial_events + 92 14 librxtxSerial.jnilib 0x00000006ff7108c9 Java_gnu_io_RXTXPort_eventLoop + 237 15 ??? 0x000000010280e878 0 + 4336969848 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x00000001028003ea 0 + 4336911338 18 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 19 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 20 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 21 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 22 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 23 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 24 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 25 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 26 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 27 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 17: 0 libSystem.B.dylib 0x00007fff84074d02 __semwait_signal + 10 1 libSystem.B.dylib 0x00007fff840dce91 usleep + 57 2 librxtxSerial.jnilib 0x00000006ff70d729 drain_loop + 45 3 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 4 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 crashed with X86 Thread State (64-bit): rax: 0x00000000029507c0 rbx: 0x0000000000000041 rcx: 0x0000000000000065 rdx: 0x0000000000000002 rdi: 0x00000006ff71205e rsi: 0x00000006ff711c67 rbp: 0x0000000702950000 rsp: 0x000000070294fef0 r8: 0x000000000000004d r9: 0x00000006e21d64c0 r10: 0x00000006e21d38e8 r11: 0x00000000000000d2 r12: 0x00000001020de998 r13: 0x00000006e21d93b0 r14: 0x0000000000000032 r15: 0x00000000029507c0 rip: 0x00000006ff70f418 rfl: 0x0000000000010202 cr2: 0x00000000029507c8 Continued in the message part 2 -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:41 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:41 +1100 Subject: [Rxtx] Part 2 re rxtx 2.2 pre... and MacOSX Message-ID: Continued from Part 1. Binary Images: 0x100000000 - 0x100000fff JavaApplicationStub ??? (???) /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationS tub 0x100004000 - 0x100011fff com.apple.JavaApplicationLauncher 12.2.0 (12.2.0) /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/JavaApplicationLauncher 0x10001a000 - 0x100022ffd com.apple.JavaVM 12.2.0 (12.2.0) <2b178e8d4bbcc0aa427c2f3f71bb2fcb> /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM 0x100055000 - 0x10005dff0 libverify.dylib ??? (???) <56eac95084cb86cd1339a721b1353182> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libveri fy.dylib 0x100063000 - 0x10006cffb JavaNativeFoundation ??? (???) <68ca6409dc49542301edda1e0744ac69> /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNative Foundation.framework/Versions/A/JavaNativeFoundation 0x1000a8000 - 0x1000c7fef libjava.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjava .jnilib 0x1000d8000 - 0x1000e5ffb libzip.jnilib ??? (???) <5b6dce7c9a1f25aa5dff1a633c9dc342> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libzip. jnilib 0x101803000 - 0x101eafff3 libjvm.dylib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bundle/Libra ries/libjvm.dylib 0x6ec2c5000 - 0x6ec2c6fff liblauncher.jnilib ??? (???) <567fa54a222b965b2c4aefea21d9800a> /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/Resources/liblauncher.jnilib 0x6ec431000 - 0x6ec5e4fff libawt.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libawt. jnilib 0x6fdc3b000 - 0x6fdc3cfff ATSHI.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/Resources/ATSHI.dylib 0x6fdd6e000 - 0x6fdd6efff libcmm.jnilib ??? (???) <114e1a620a6920d77bf09bd57a7f7d52> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libcmm. jnilib 0x6fdd9e000 - 0x6fde1fff7 libfontmanager.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libfont manager.jnilib 0x6fdf41000 - 0x6fdf8ffff libsuncmm.jnilib ??? (???) <47330f1f17822de3a5cf921e07615cf7> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libsunc mm.jnilib 0x6fdf95000 - 0x6fdfc4ff7 libjpeg.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjpeg .jnilib 0x6ff6ae000 - 0x6ff6baffb libnet.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnet. jnilib 0x6ff6c0000 - 0x6ff6c4fff libnio.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnio. jnilib 0x6ff6d4000 - 0x6ff6e8ff7 libdcpr.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libdcpr .jnilib 0x6ff70c000 - 0x6ff713fff +librxtxSerial.jnilib ??? (???) <5133deacebd01ceab7d528c541241956> /Library/Java/Extensions/librxtxSerial.jnilib 0x6ff734000 - 0x6ff74bfef libJapaneseConverter.dylib ??? (???) <64cca6bb4650a269f49a8427507e4963> /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib 0x70204f000 - 0x702218fef com.apple.RawCamera.bundle 2.0.10 (2.0.10) /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera 0x7fff5fc00000 - 0x7fff5fc2e643 dyld 97.1 (???) /usr/lib/dyld 0x7fff80003000 - 0x7fff80146ffb com.apple.audio.toolbox.AudioToolbox 1.5.2 (1.5.2) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x7fff801d2000 - 0x7fff801d5ffb com.apple.help 1.1 (36) <9000c05ccad96fdcc25bc35264abf587> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.frame work/Versions/A/Help 0x7fff801d6000 - 0x7fff80211fff com.apple.AE 402.2 (402.2) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.f ramework/Versions/A/AE 0x7fff80212000 - 0x7fff80257fef libRIP.A.dylib ??? (???) <8c818d7fd3dc57839ac48caf107ff4c0> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x7fff80258000 - 0x7fff8029bfef com.apple.QD 3.11.54 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/QD.framework/Versions/A/QD 0x7fff8029c000 - 0x7fff802dffef libTIFF.dylib ??? (???) <86be7909f46cc044a887cbb60ab7826d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x7fff802e0000 - 0x7fff803d4fff libobjc.A.dylib ??? (???) <118dc1ae05e685ad64290352fc94f1f0> /usr/lib/libobjc.A.dylib 0x7fff803d5000 - 0x7fff8045dfe7 libsqlite3.0.dylib ??? (???) <3c7ab3523b816dbd3e039ee7e6e2c580> /usr/lib/libsqlite3.0.dylib 0x7fff8045e000 - 0x7fff80466ffa libbsm.dylib ??? (???) <4d838c0d8a74fe61c781a53a8723303d> /usr/lib/libbsm.dylib 0x7fff80467000 - 0x7fff80497fff com.apple.shortcut 1 (1.0) <9822328df9321a661af3afcc841e8f80> /System/Library/PrivateFrameworks/Shortcut.framework/Versions/A/Shortcut 0x7fff80498000 - 0x7fff8049bfff com.apple.securityhi 3.0 (30817) <00ddd6e60692b62b7649573eab8aef5a> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI .framework/Versions/A/SecurityHI 0x7fff8049c000 - 0x7fff8049efff com.apple.print.framework.Print 218.0.2 (220.1) <2b847a0a1cd885f596a4d10409d50ba3> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.fram ework/Versions/A/Print 0x7fff8049f000 - 0x7fff805dbfe9 com.apple.ImageIO.framework 2.0.4 (2.0.4) <47dcdc0b5986b2c157e0b6dae48ce464> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/ImageIO 0x7fff805dc000 - 0x7fff805f9fef com.apple.CoreVideo 1.5.1 (1.5.1) <78253b3fe8d3dcc90f159d7ed866c295> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x7fff805fa000 - 0x7fff8068bfff com.apple.SearchKit 1.2.1 (1.2.1) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Sear chKit.framework/Versions/A/SearchKit 0x7fff8068c000 - 0x7fff80e49fef libBLAS.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libBLAS.dylib 0x7fff80e4a000 - 0x7fff81416fff com.apple.CoreGraphics 1.407.2 (???) <436dbc70f8c9b29b3beb1d2de220acf2> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/CoreGraphics 0x7fff81417000 - 0x7fff8141dfff com.apple.DiskArbitration 2.2.1 (2.2.1) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitrat ion 0x7fff8141e000 - 0x7fff8145bff7 com.apple.SystemConfiguration 1.9.2 (1.9.2) <150119d0cecb0c80f6736b9881c2411e> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemCo nfiguration 0x7fff8145c000 - 0x7fff81523fec com.apple.CFNetwork 422.11 (422.11) <570ca46de3b907cb1c8e33fc62f562b4> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNe twork.framework/Versions/A/CFNetwork 0x7fff81524000 - 0x7fff8152dfff libCGATS.A.dylib ??? (???) <722a0bbd58740d46739008e881010631> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib 0x7fff8152e000 - 0x7fff81533fff com.apple.CommonPanels 1.2.4 (85) <2cec1ecc95cf1ecea8bea030975a46b8> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPane ls.framework/Versions/A/CommonPanels 0x7fff81534000 - 0x7fff817cffe3 com.apple.Foundation 6.5.7 (677.22) <8134977fcc57198a53dc494b60592980> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x7fff817d0000 - 0x7fff817d0ffd com.apple.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x7fff817d1000 - 0x7fff81cf1fc6 libGLProgrammability.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgra mmability.dylib 0x7fff81cf2000 - 0x7fff81cf4fff com.apple.NavigationServices 3.5.2 (163) <7cb7f3fe7f9d56ec89ef28a6d3a1da7d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Navigation Services.framework/Versions/A/NavigationServices 0x7fff81cf5000 - 0x7fff81d32fe7 com.apple.coreui 1.2 (62) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x7fff81d33000 - 0x7fff81d33fff com.apple.Carbon 136 (136) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x7fff81d34000 - 0x7fff81d42fff libCSync.A.dylib ??? (???) <61f6cc104b3e9b77cd583635a3a9a5cf> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x7fff81d43000 - 0x7fff81d45ff9 libRadiance.dylib ??? (???) <6d9f2235e8f70a7aedfc59383a7548d8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x7fff81d46000 - 0x7fff81db5ff9 com.apple.print.framework.PrintCore 5.5.3 (245.3) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/PrintCore.framework/Versions/A/PrintCore 0x7fff81db6000 - 0x7fff81db6ff8 com.apple.ApplicationServices 34 (34) <81cd02cc2ccf4e47e51d03db860da556> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Applicat ionServices 0x7fff81db7000 - 0x7fff81dd8fff libresolv.9.dylib ??? (???) <38318f9fbcfbdb384e0f9b08cc0e757a> /usr/lib/libresolv.9.dylib 0x7fff81dd9000 - 0x7fff81e4ffef libvMisc.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvMisc.dylib 0x7fff81e50000 - 0x7fff81e52ff7 libffi.dylib ??? (???) <920bb19728451f35703bb95dc908c7ca> /usr/lib/libffi.dylib 0x7fff81e53000 - 0x7fff81eeefe7 com.apple.ink.framework 101.3 (86) <60c6579faf114ea9677fd9ae25389ed2> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framew ork/Versions/A/Ink 0x7fff81eef000 - 0x7fff81f0dfff libPng.dylib ??? (???) <4017eab74319a648dfd73b7d503e557d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x7fff81f0e000 - 0x7fff81f24ff9 com.apple.ImageCapture 5.0.1 (5.0.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCaptu re.framework/Versions/A/ImageCapture 0x7fff81f25000 - 0x7fff81f3dfff com.apple.DictionaryServices 1.0.0 (1.0.0) <78ea11e9a92120f76d69efa24b8d1f95> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Dict ionaryServices.framework/Versions/A/DictionaryServices 0x7fff81f3e000 - 0x7fff81f42fff libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib 0x7fff81f43000 - 0x7fff81fe3fe3 com.apple.ApplicationServices.ATS 3.4 (???) <47cf09bf78935889f17f1b6b09badf0d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/ATS 0x7fff81fe4000 - 0x7fff8211bfff com.apple.CoreFoundation 6.5.5 (476.17) <51930d43c7c2d8fb24148cbfc05bba0f> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundatio n 0x7fff8211c000 - 0x7fff82126fff com.apple.speech.recognition.framework 3.7.24 (3.7.24) <2399374b096b284345daba82e2cb833d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechReco gnition.framework/Versions/A/SpeechRecognition 0x7fff82127000 - 0x7fff82159ff7 libauto.dylib ??? (???) /usr/lib/libauto.dylib 0x7fff8215a000 - 0x7fff821cefe7 libstdc++.6.dylib ??? (???) <565ee6f798f7fef6f804c60682787280> /usr/lib/libstdc++.6.dylib 0x7fff821cf000 - 0x7fff8228dfff edu.mit.Kerberos 6.0.12 (6.0.12) /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x7fff8228e000 - 0x7fff8228effb com.apple.installserver.framework 1.0 (8) /System/Library/PrivateFrameworks/InstallServer.framework/Versions/A/Install Server 0x7fff8228f000 - 0x7fff82293fff libGIF.dylib ??? (???) <66436b84211fe0e723051eab15af0aca> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x7fff82294000 - 0x7fff8258ffe3 com.apple.CoreServices.CarbonCore 786.10 (786.10) <2ac701edf3ca98a86ae9d5f733200b40> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Carb onCore.framework/Versions/A/CarbonCore 0x7fff82590000 - 0x7fff825aafff libvDSP.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvDSP.dylib 0x7fff825ab000 - 0x7fff827b1ff3 com.apple.security 5.0.4 (34102) <47c559b17c1f51998e7a981d0fbec4c8> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x7fff827b2000 - 0x7fff827d9fff libxslt.1.dylib ??? (???) /usr/lib/libxslt.1.dylib 0x7fff827da000 - 0x7fff82948fff libicucore.A.dylib ??? (???) <374ddaf141bf88dba00ab9058f2dbad6> /usr/lib/libicucore.A.dylib 0x7fff82949000 - 0x7fff8295dff7 libGL.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x7fff8295e000 - 0x7fff83286fff com.apple.AppKit 6.5.6 (949.43) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x7fff83287000 - 0x7fff83667fef com.apple.QuartzCore 1.5.7 (1.5.7) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x7fff83668000 - 0x7fff836b8fe7 com.apple.Metadata 10.5.2 (398.25) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Meta data.framework/Versions/A/Metadata 0x7fff836b9000 - 0x7fff836baff3 com.apple.audio.units.AudioUnit 1.5 (1.5) /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x7fff836bb000 - 0x7fff83710fe3 com.apple.HIServices 1.7.0 (???) <6bef766448d67adb91901b432629ea0f> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/HIServices.framework/Versions/A/HIServices 0x7fff83711000 - 0x7fff83711ffd com.apple.Accelerate.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/vecLib 0x7fff83712000 - 0x7fff837a7ffb com.apple.LaunchServices 290.3 (290.3) <56544e16c5192d2ce72df772901fcaef> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Laun chServices.framework/Versions/A/LaunchServices 0x7fff837a8000 - 0x7fff8382ffef com.apple.audio.CoreAudio 3.1.1 (3.1.1) <9c1714647fd7515c900362ad2ac76874> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x7fff83830000 - 0x7fff83893fef libGLU.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dyli b 0x7fff83894000 - 0x7fff838a2ff9 com.apple.helpdata 1.0.1 (14.2) /System/Library/PrivateFrameworks/HelpData.framework/Versions/A/HelpData 0x7fff838a3000 - 0x7fff838afff1 libgcc_s.1.dylib ??? (???) <23fa31a628c1ea8a62ac529fa333b6e1> /usr/lib/libgcc_s.1.dylib 0x7fff838b0000 - 0x7fff838d2fff libJPEG.dylib ??? (???) <4257ab268996bbeb93b47946df181cdc> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x7fff838d3000 - 0x7fff838d3ffd com.apple.Accelerate 1.4.2 (Accelerate 1.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x7fff838d4000 - 0x7fff838d4ff8 com.apple.Cocoa 6.5 (???) <8c59f679ffbd9178134df1d83dedde28> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa 0x7fff838d5000 - 0x7fff839cafff libxml2.2.dylib ??? (???) <8226d1180354f493954c5fa1fc0e1154> /usr/lib/libxml2.2.dylib 0x7fff839cb000 - 0x7fff839dafe7 com.apple.opengl 1.5.9 (1.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x7fff839db000 - 0x7fff83cc2feb com.apple.HIToolbox 1.5.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. framework/Versions/A/HIToolbox 0x7fff83cc3000 - 0x7fff83d03fef com.apple.framework.IOKit 1.5.1 (???) <17e6707127a60c5e2d7a9bd2b7bf2db0> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x7fff83d04000 - 0x7fff83dc8fe2 com.apple.vImage 3.0 (3.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage .framework/Versions/A/vImage 0x7fff83dc9000 - 0x7fff83df3fff libcups.2.dylib ??? (???) /usr/lib/libcups.2.dylib 0x7fff83df4000 - 0x7fff83df4ffa com.apple.CoreServices 32 (32) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x7fff83df5000 - 0x7fff83ed6fff libcrypto.0.9.7.dylib ??? (???) <66f1f8773bd9fdfdcfd09e2b4b010636> /usr/lib/libcrypto.0.9.7.dylib 0x7fff83ed7000 - 0x7fff83f87fef com.apple.CoreServices.OSServices 226.5 (226.5) <1c38f727b3ad3293272db7323b37c735> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSSe rvices.framework/Versions/A/OSServices 0x7fff83f88000 - 0x7fff83fa2fff com.apple.openscripting 1.2.8 (???) <0674c4e3353c677c9f58df3297ae559b> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScript ing.framework/Versions/A/OpenScripting 0x7fff83fa3000 - 0x7fff83fdfff7 libGLImage.dylib ??? (???) <02258bcdbe8defdb254acc077a81dd9b> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage. dylib 0x7fff83fe0000 - 0x7fff83ff1fff com.apple.speech.synthesis.framework 3.7.1 (3.7.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x7fff83ff2000 - 0x7fff8406cff3 com.apple.CoreText 2.0.3 (???) <827bbfef670df72316719c25bfb39915> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreText.framework/Versions/A/CoreText 0x7fff8406d000 - 0x7fff841f8ffb libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0x7fff841f9000 - 0x7fff8420affd libz.1.dylib ??? (???) /usr/lib/libz.1.dylib 0x7fff8420b000 - 0x7fff842befef com.apple.DesktopServices 1.4.7 (1.4.7) /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/D esktopServicesPriv 0x7fff842bf000 - 0x7fff84677fff libLAPACK.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libLAPACK.dylib 0x7fff84678000 - 0x7fff84743fef com.apple.ColorSync 4.5.1 (4.5.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ColorSync.framework/Versions/A/ColorSync 0x7fff84744000 - 0x7fff84847feb com.apple.CoreData 100.1 (186) <074abc7f43f81f7885e4d0674a8be4bc> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x7fffffe00000 - 0x7fffffe01780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0xfffffffffffec000 - 0xfffffffffffeffff libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib SYSTEM CONFIG Model: MacPro3,1, BootROM MP31.006C.B05, 8 processors, Quad-Core Intel Xeon, 2.8 GHz, 32 GB Graphics: kHW_ATIrv630Item, ATI Radeon HD 2600, spdisplays_pcie_device, 256 MB Memory Module: DIMM Riser B/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Bluetooth: Version 2.1.3f8, 2 service, 1 devices, 1 incoming serial ports Network Service: Ethernet 2, Ethernet, en1 PCI Card: ATI Radeon HD 2600, display, Slot-1 Serial ATA Device: WDC WD3200AAJS-41VWA0, 298.09 GB Parallel ATA Device: PIONEER DVD-RW DVR-112D USB Device: Keyboard Hub, (null) mA USB Device: Apple Optical USB Mouse, (null) mA USB Device: Apple Keyboard, (null) mA USB Device: hub_device, (null) mA USB Device: Apple Cinema HD Display, (null) mA USB Device: Keyspan USA-28Xb, (null) mA USB Device: Bluetooth USB Host Controller, (null) mA FireWire Device: built-in_hub, unknown_value, unknown_speed FireWire Device: My Book, WD, 800mbit_speed FireWire Device: unknown_device, unknown_value, unknown_speed -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From jaakko.sipari at gmail.com Thu Jan 22 03:00:03 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 22 Jan 2009 12:00:03 +0200 Subject: [Rxtx] RXTX compilation with GCJ possible? Message-ID: <901f25b80901220200s53792317o374b80cbb6066a52@mail.gmail.com> Hi! Does anyone have experience on using RXTX in a GCJ compiled Java application? I'm interested whether this is possible in Windows and/or in Linux platforms. And of course what does it take to get it work, or does it just work out of the box. Ultimately my aim here would be to move to a more time deterministic system by utilizing GCJ, jRate & Javolution and possibly run the RXTX (and other important) threads at a priority higher than the garbage collector. This of course would require some modification for the RXTX threads to run in a Javolution pool context or non allocating real time contexts so they wouldn't produce any garbage, but that's something to hack on later. For now I'd just like to know if there are any obstacles on the road to compiling & running RXTX with GCJ. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/5592681a/attachment-0015.html From jmudd at dtiweb.net Thu Jan 22 06:21:03 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Thu, 22 Jan 2009 08:21:03 -0500 Subject: [Rxtx] Hot unplugging of a USB device References: <4977BEEA.4020708@gatworks.com> Message-ID: U. George, Thanks for the information. How did you resolve your USB/GPS device on Linux? My application has to run on both Linux and Windows eventually. Thanks, Jerry -----Original Message----- From: U. George [mailto:netbeans at gatworks.com] Sent: Wednesday, January 21, 2009 7:34 PM To: Jerry Mudd Cc: rxtx at qbang.org Subject: Re: [Rxtx] Hot unplugging of a USB device > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From m.kirkland at comcast.net Thu Jan 22 09:21:01 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Thu, 22 Jan 2009 08:21:01 -0800 Subject: [Rxtx] Serial port control lines change with call to getPortIdentifiers() on Linux Message-ID: <94443DEFFD574B6CA8DDB2B201D9E007@bengal.net> Hi All ! I have noticed an issue with RXTX on Ubuntu Linux 8.10 that has prevented me from being able to use RXTX on Linux. I have noticed this issue on both the rxtx 2.1.7 and the new rxtx2.2pre1. When I execute the following line to get the ports on a system - java.util.Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); Both DTR and RTS become active on ttyS0 and only ttyS0, not ttyS1 (I only have 2 ports). I see this prior to opening any ports or making any other calls to RXTX. I have stepped it though with the debugger and I am sure this is the trigger. My application uses these control lines to perform functions other then the standard flow control so it is critical that I be able to control them exactly. I would also think that folks using RXTX for more standard serial IO would also have issues with devices starting to talk before a listener was ready. I checked Windows XP and I do not see this issue (but I only have a com1 on the Windows computer). I also noticed that the DTR line blips when setting up a port on 2.2.pre1 like it does on 2.1.7r2. This it the same issue that the folks at http://www.codeskin.com/ patched. I see this issue on both Linux and Windows XP. Any help or clues would be greatly appreciated. If I can provide any additional info or do any testing I would be glad to help out to get version 2.2 in top shape for release. BTW I have written a simple dynamic loader to load the RXTX jar and native code that is drive by the os.name and os.arch system properties. I would be more then happy to contribute this to the project if folks though it would be useful. Its more convenient then having to manage copying the files around to various JVM's. TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/eab26bae/attachment-0014.html From josefk_5 at yahoo.com Fri Jan 23 09:44:06 2009 From: josefk_5 at yahoo.com (Josef Kahsay) Date: Fri, 23 Jan 2009 08:44:06 -0800 (PST) Subject: [Rxtx] Help on Accessing RS232 Message-ID: <509617.88308.qm@web38205.mail.mud.yahoo.com> Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS From m.kirkland at comcast.net Sat Jan 24 01:28:52 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Sat, 24 Jan 2009 00:28:52 -0800 Subject: [Rxtx] Help on Accessing RS232 In-Reply-To: <509617.88308.qm@web38205.mail.mud.yahoo.com> References: <509617.88308.qm@web38205.mail.mud.yahoo.com> Message-ID: <665887C02E1446708CE392FE0BD73D79@bengal.net> It seems to me that you are having a classic java classpath issue. Java classpath issues can be annoying to solve sometimes. As some random guesses I would suggest you look at the following. 1 - You might not be running the JVM from the location that you think you are (gets me all the time). I which Windows had a which command. 2 - You don't mention what development environment you are using like Eclipse etc., and if you are trying to run the demo from inside the development environment. If so, do whatever is appropriate for the development environment to control the classpath. In Eclipse this would involve adding a "User Library" to point to the jar and native code. 3 - Once you get the classpath ok, the next thing you might run into is not being able to load the native library. 4 - I have found that on XP I can place the RXTX jar and native library in the same directory as my application's jar file (and a class-path entry in the application's jar file manifest) and it all works. 5 - If you need more control of managing different versions of RXTX for different OS platforms, I have a dynamic RXTX loader I can send you (but I recommend getting the simple case working first). Let me know if this helps. Mike -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Josef Kahsay Sent: Friday, January 23, 2009 8:44 AM To: rxtx at qbang.org Subject: [Rxtx] Help on Accessing RS232 Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jacomoman at hotmail.com Mon Jan 26 12:12:27 2009 From: jacomoman at hotmail.com (Joseph Schmoley) Date: Mon, 26 Jan 2009 11:12:27 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: Message-ID: Hi All, First, let me thank you all for your effort on this excellent project. I've been using the Win32 binaries in the 2.1-7r2 package without any problems on WinXP Pro (32-bit). I then tried the .jnilib of the same version on my Mac OSX 10.5 64-bit darwin and got the familiar UnsatisfiedLinkError problem. I read up on all the mailing list archive messages and found this one (http://mailman.qbang.org/pipermail/rxtx/2008-May/2436699.html) suggesting that perhaps rxtx-devel from CVS would have a fix. So I got latest rxtx-devel + commapi-0-0-1 as suggested by the CVS page at rxtx.org. I even set my CFLAGS and LDFLAGS to include "-arch x86_64 -arch ppc64", but as it turned out, the latest configure script didn't need it. In any case, I configured and built rxtx-devel with no errors (that I could see) and transferred the resulting i386-apple-darwin9.6.0/librxtxSerial.jnilib to where my java.library.path is pointing to and ran my test class. Whereas before I was getting UnsatisfiedLinkError, I now simply get this: Invalid memory access of location 22d927c8 rip=22356420 Invalid memory access of location 22d9292c rip=22357540 [error occurred during error reporting (null), id 0xa] ./run-class.sh: line 10: 15647 Segmentation fault java -Djava.library.path=./lib/native -Dapp.logging.file.path=./log/runtime.log -classpath .:${MYCP} ${CLASSNAME} "${CMD}" run-class.sh is simply a script I've got to run my test class and all that class does is invoke the RXTX API, first one being: CommPortIdentifier.getPortIdentifiers(). Has anyone had any luck with getting latest CVS sources to work on Mac OS X 10.5 64-bit? Any help/pointers would be greatly appreciated. Thank you in advance. -Jac I've attached my configure and make output as txt files. Here's all my build/machine environment info, as per the troubleshooting wiki page: Mac OS X 10.5.6 (9G55) ----------------------------------------------- /usr/bin/java -version java version "1.6.0_07" Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153) Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode) ----------------------------------------------- Darwin my-macbook.local 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 ----------------------------------------------- autoconf (GNU Autoconf) 2.61 Copyright (C) 2006 Free Software Foundation, Inc. This is free software. You may redistribute copies of it under the terms of the GNU General Public License . There is NO WARRANTY, to the extent permitted by law. Written by David J. MacKenzie and Akim Demaille. ----------------------------------------------- automake (GNU automake) 1.10 Written by Tom Tromey and Alexandre Duret-Lutz . Copyright 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ----------------------------------------------- $ libtool -V Apple Computer, Inc. version cctools-698.1 ----------------------------------------------- GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program built for powerpc-apple-darwin9.0 ----------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: my-configure.out.txt Type: application/octet-stream Size: 6934 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090126/89d9c7f6/attachment-0020.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: my-make.out.txt Type: application/octet-stream Size: 7737 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090126/89d9c7f6/attachment-0021.obj From kintel at sim.no Mon Jan 26 16:16:19 2009 From: kintel at sim.no (Marius Kintel) Date: Tue, 27 Jan 2009 00:16:19 +0100 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: Message-ID: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Hi Jac, I've had the same issue, and I suggested a patch to partially fix it a while back: http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html I don't know the status of this in the current incarnation of the rxtx code and I have reverted to Java-1.5 since then.. ~/= Marius -- We are Elektropeople for a better living. From tjarvi at qbang.org Tue Jan 27 08:08:54 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 27 Jan 2009 08:08:54 -0700 (MST) Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: On Tue, 27 Jan 2009, Marius Kintel wrote: > Hi Jac, > > I've had the same issue, and I suggested a patch to partially fix it a > while back: > http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html > > I don't know the status of this in the current incarnation of the rxtx > code and I have reverted to Java-1.5 since then.. > > ~/= Marius > > -- > We are Elektropeople for a better living. > Hmm. That did not get in. I can add it and put a new prerelease out this week. The eis must be a regression. I was sure we fixed that. -- Trent Jarvi tjarvi at qbang.org From jacomoman at hotmail.com Tue Jan 27 08:48:16 2009 From: jacomoman at hotmail.com (Joseph Schmoley) Date: Tue, 27 Jan 2009 07:48:16 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: That would be excellent Trent. I've got a project partially on hold because of this. It runs great on Win32 (XP/Vista), it just has to do the same on Mac 64-bit and Linux 32-bit. I look forward to this pre-release. Again, thanks a bunch to you and all the other code contributors for this excellent project. I wish I could donate something to you guys. I couldn't find a donation link anywhere. RxTx has been a great help with my project. -Jac From: Trent Jarvi Sent: Tuesday, January 27, 2009 7:08 AM To: Marius Kintel Cc: Joseph Schmoley ; rxtx at qbang.org Subject: Re: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit On Tue, 27 Jan 2009, Marius Kintel wrote: > Hi Jac, > > I've had the same issue, and I suggested a patch to partially fix it a > while back: > http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html > > I don't know the status of this in the current incarnation of the rxtx > code and I have reverted to Java-1.5 since then.. > > ~/= Marius > > -- > We are Elektropeople for a better living. > Hmm. That did not get in. I can add it and put a new prerelease out this week. The eis must be a regression. I was sure we fixed that. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090127/bbd287bb/attachment-0009.html From bschlining at gmail.com Tue Jan 27 09:38:26 2009 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 27 Jan 2009 08:38:26 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: > That would be excellent Trent. I've got a project partially on hold > because of this. It runs great on Win32 (XP/Vista), it just has to do the > same on Mac 64-bit and Linux 32-bit. I look forward to this pre-release. > I'm in the same spot too. Looking forward to the pre-release! -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090127/2275013b/attachment-0009.html From andrew.paverd at rorotika.com Wed Jan 28 03:14:58 2009 From: andrew.paverd at rorotika.com (Andrew Paverd) Date: Wed, 28 Jan 2009 12:14:58 +0200 Subject: [Rxtx] RXTX not working on Solaris Message-ID: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Hi all, I am attempting to use RXTX on a Sun SPARC server running Solaris. I have tried the binaries from both the latest release (2.1-7) and the pre-release (2.2pre1). The 2.1-7 driver gives the following error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: fatal: libgcc_s.so.1: open failed: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)" I'm not sure what this "libgcc_s.so.1" file does in terms of RXTX but its absence is preventing the application from running. With the 2.2pre1 binary, the application loads without any issue but does not detect any comm-ports. I know that there are multiple ports available because when using the Sun javax.comm library for Solaris SPARC, the ports are all correctly discovered and the application can read from and write to them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in the 2.2 release. Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if so, how did you do it (which versions did you use etc.)? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090128/a97b220d/attachment-0009.html From tjarvi at qbang.org Wed Jan 28 17:01:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 28 Jan 2009 17:01:50 -0700 (MST) Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: On Wed, 28 Jan 2009, Andrew Paverd wrote: > > Hi all, > > ? > > I am attempting to use RXTX on a Sun SPARC server running Solaris. I have > tried the binaries from both the latest release (2.1-7) and the pre-release > (2.2pre1). > > ? > > The 2.1-7 driver gives the following error: > > ? > > ?Exception in thread "main" java.lang.UnsatisfiedLinkError: > /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: > fatal: libgcc_s.so.1: open failed: No such file or directory > > ??????? at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > ??????? at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) > > ??????? at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) > > ??????? at java.lang.Runtime.loadLibrary0(Runtime.java:823) > > ??????? at java.lang.System.loadLibrary(System.java:1030) > > ??????? at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)? > > ? > > I?m not sure what this ?libgcc_s.so.1? file does in terms of RXTX but its > absence is preventing the application from running. > > ? > > With the 2.2pre1 binary, the application loads without any issue but does > not detect any comm-ports. I know that there are multiple ports available > because when using the Sun javax.comm library for Solaris SPARC, the ports > are all correctly discovered and the application can read from and write to > them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in > the 2.2 release. > > ? > > Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if > so, how did you do it (which versions did you use etc.)? > > ? Hi Andrew ld.so/libgcc_s.so are part of GNU gcc/ld. They are available for solaris. I'm not sure how to link them without requiring them. It is also possible to compile rxtx with Sun's compiler if you have it. Perhaps someone here knows how to get rxtx compiled on Solaris using gcc without requiring those libs by everyone? -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Jan 28 17:39:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 28 Jan 2009 17:39:08 -0700 (MST) Subject: [Rxtx] Problem on 'Trouble Shooting' wiki page. Message-ID: It has been pointed out that the rxtx wiki page says usermod -G may be used to update the group a user is in. http://rxtx.qbang.org/wiki/index.php/Trouble_shooting The corrected text now says to use usermod -aG to add the user to a group in addition to their current group(s). The previous -G version would replace the users current groups with the new group. Replacing group information can cause significant problems for end users. If you have information based upon the wiki, please update your content. Thanks, -- Trent Jarvi tjarvi at qbang.org From andrew.paverd at rorotika.com Thu Jan 29 02:15:35 2009 From: andrew.paverd at rorotika.com (Andrew Paverd) Date: Thu, 29 Jan 2009 11:15:35 +0200 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Thanks for the advice Trent - I was originally using the precompiled librxtxSerial.so. I've subsequently compiled rxtx for Solaris (using gcc) and after copying the libgcc_s.so file to my .../jre/lib/sparc directory, the library loads. However, it does not detect any ports. When I call the getComPortIdentifiers() nothing is returned and I can't connect to any port. Sun's javax.comm package detects and can connect to all the ports. This is the same as when I tried the 2.2pre1 library. Are there any extra steps that must be taken to detect ports on Solaris? (user is member of uucp group) Thanks, Andrew From tristan.dyer at cgi.com Thu Jan 29 05:57:25 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 29 Jan 2009 07:57:25 -0500 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D030BE152@MTL-MSG-02.cgiclients.com> Andrew, I had the same problem, but before I got too far the scope of my project changed, and I don't have to support Solaris anymore.. I was getting a weird error, file does not exist but should, or something like that. The project ended before I figured out why. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Andrew Paverd Sent: January 29, 2009 5:16 AM To: 'Trent Jarvi' Cc: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working on Solaris Thanks for the advice Trent - I was originally using the precompiled librxtxSerial.so. I've subsequently compiled rxtx for Solaris (using gcc) and after copying the libgcc_s.so file to my .../jre/lib/sparc directory, the library loads. However, it does not detect any ports. When I call the getComPortIdentifiers() nothing is returned and I can't connect to any port. Sun's javax.comm package detects and can connect to all the ports. This is the same as when I tried the 2.2pre1 library. Are there any extra steps that must be taken to detect ports on Solaris? (user is member of uucp group) Thanks, Andrew _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Martin.Oberhuber at windriver.com Thu Jan 29 06:15:01 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:15:01 +0100 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2326@ism-mail03.corp.ad.wrs.com> Hi Andrew & Paverd, the trick of compiling with gcc on Solaris such that the libgcc_s.so library is not needed at runtime is that gcc itself must be configured and compiled with special options: cd gcc-src ./configure --disable-shared make Using that specially compiled gcc, you can then build the RXTX library: setenv PATH $HOME/my-gcc/bin:$PATH cd rxtx mkdir build-solaris && cd build-solaris ../configure --disable-lockfiles make For more details, see the original bug and its attachments: http://bugzilla.qbang.org/show_bug.cgi?id=73 An rxtx-2.1-7r2 build for Solaris without libgcc_s dependency is available from the Eclipse packages at http://rxtx.qbang.org/eclipse/downloads/ Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Andrew Paverd Sent: Mittwoch, 28. J?nner 2009 11:15 To: rxtx at qbang.org Subject: [Rxtx] RXTX not working on Solaris Hi all, I am attempting to use RXTX on a Sun SPARC server running Solaris. I have tried the binaries from both the latest release (2.1-7) and the pre-release (2.2pre1). The 2.1-7 driver gives the following error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: fatal: libgcc_s.so.1: open failed: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)" I'm not sure what this "libgcc_s.so.1" file does in terms of RXTX but its absence is preventing the application from running. With the 2.2pre1 binary, the application loads without any issue but does not detect any comm-ports. I know that there are multiple ports available because when using the Sun javax.comm library for Solaris SPARC, the ports are all correctly discovered and the application can read from and write to them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in the 2.2 release. Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if so, how did you do it (which versions did you use etc.)? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090129/d6d73f3e/attachment-0008.html From Martin.Oberhuber at windriver.com Thu Jan 29 06:16:38 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:16:38 +0100 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E232A@ism-mail03.corp.ad.wrs.com> Hi Andrew, one thing I did notice on Solaris was that after closing a port, the Solaris Kernel seems to have some timeout before it can be re-opened. So, when you try it again, make sure that no other application hogs the port or has been hogging it shortly before. It may make sense to try a few times. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Andrew Paverd > Sent: Donnerstag, 29. J?nner 2009 10:16 > To: 'Trent Jarvi' > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX not working on Solaris > > Thanks for the advice Trent - I was originally using the > precompiled librxtxSerial.so. I've subsequently compiled rxtx > for Solaris (using gcc) and after copying the libgcc_s.so > file to my .../jre/lib/sparc directory, the library loads. > > However, it does not detect any ports. When I call the > getComPortIdentifiers() nothing is returned and I can't > connect to any port. Sun's javax.comm package detects and can > connect to all the ports. This is the same as when I tried > the 2.2pre1 library. > > Are there any extra steps that must be taken to detect ports > on Solaris? (user is member of uucp group) > > Thanks, > > > Andrew > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From Martin.Oberhuber at windriver.com Thu Jan 29 06:24:05 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:24:05 +0100 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2335@ism-mail03.corp.ad.wrs.com> Hi Greg, sorry for the late response (just catching up on E-Mails). I do not plan to create any Eclipse bundles before rxtx-2.2 is released. Creating the packages is a bit of an effort, which I'd rather postpone until the release, and then do it only once. In the meantime, if you need it for testing, I think it should be easy to take the existing Eclipse bundles/fragments and simply replace any new DLL's / so's in them, plus use WinZIP to replace the .class files in the Java bundle. For Eclipse, it will still look like rxtx-2.1-7 but in reality it will be your own latest build. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Trent Jarvi > Sent: Sonntag, 04. J?nner 2009 20:42 > To: Greg Johnson > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] [Announce] RXTX 2.2pre1 is available. > > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse > packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be > a popular > spam abuse page. I'll put a license and download link on there. All > other pages are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > > > Hi Trent, > > The download link on rxtx.org > (http://users.frii.com/jarvi/rxtx/) loops back > > to rxtx.org, and the wiki doesn't seem to have a link (top > level at least) to > > download. I think Martin had been generating > (fantastically useful) Eclipse > > bundles, as well - are these available for 2.2pre1 also? > > > > Many thanks to everyone for their work - rxtx is an > essential part of our > > product, and we have been keenly awaiting this release. > > > > Regards, > > greg > > > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > > > >> > >> The binaries, source and pending wiki move are now announced on > >> http://www.rxtx.org. After this has baked, we can put > the web install in. > >> > >> Changes in rxtx 2.2 (If I missed something let me know): > >> ... snip ... > >> > >> -- > >> Trent Jarvi > >> tjarvi at qbang.org_______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > -- > > Greg Johnson, PhD > > Director of Engineering > > http://www.rbr-global.com > > greg.johnson at rbr-global.com > > +1.613.233.1621 (GMT-5) office > > > > > > See us at: Ocean Business 2009, Southampton, England, March > 31 - April 1, > > 2009 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From Martin.Oberhuber at windriver.com Thu Jan 29 06:32:57 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:32:57 +0100 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> Hi Tristan, > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); I think that this code is wrong. User code must not call the RXTXCommDriver constructor, since you cannot initialize it properly. What you can do to announce previously unknown port names is this: System.setProperty("gnu.io.rxtx.SerialPorts","/dev/term/a"); before you first access any RXTX function. For details, see the code in RXTXCommDriver#registerSpecifiedPorts() > What is the output of System.getProperty("os.name") on OpenSolaris? I didn't see any response of yours to this question from Trent. What does OpenSolaris output? Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Trent Jarvi > Sent: Mittwoch, 31. Dezember 2008 20:04 > To: Dyer, Tristan > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX for OpenSolaris 2008.11 > > > > On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > > > > Hi, > > > > I have tried building the rxtx library for OpenSolaris 2008.11. > > > > It seemed to build fine without errors, however code such as > > > > ????? java.util.Enumeration portList > > ???????? = CommPortIdentifier.getPortIdentifiers(); > > ????? boolean found = false; > > ????? while (portList.hasMoreElements()) { > > ???????? portId = (CommPortIdentifier) portList.nextElement(); > > ???????? System.out.println(" " + portId.getName()); > > ???????? if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > > ?????????? ???? ?? System.out.println("found"); > > ?????????????? found = true; > > ?????????????? break; > > ??????????? } > > ???????? } > > ????? } > > Will output nothing. > > > > Or rather it seems as if there are no ports found by RXTX. > This code works > > on Ubuntu8.04 and winXP. > > > > If I Add the port manually and then try and open the port > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > > ????? try{ > > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > > ????? } > > ????? catch(Exception e){ > > ??? ??? ? System.out.println("NoSuchPortException"); > > ??? ??? ? //ignore > > ????? } > > ????? try { > > ??????? ???????? System.out.println("opening port"); > > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > > WAIT_TO_OPEN); > > ??????????? connected = true; > > ??????????? System.out.println("Connected to port " + > portId.getName()); > > ???????? } catch (PortInUseException p) { > > ??????????? if (DEBUG) { > > ?????????????? System.err.println(p); > > ??????????? } > > ??????????? port = null; > > ??????????? portId = null; > > ??????????? System.out.println("PortInUseException"); > > ??????????? p.printStackTrace(); > > ???????? } > > > > I will get the following, but not the NoSuchPortException. > > > > java.lang.reflect.InvocationTargetException > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Caused by: java.lang.NullPointerException > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:296) > > > > ??????? ... 7 more > > > > > > As well as > > > > java.lang.NullPointerException > > ??????? at > gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > > ??????? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > > ??????? at > > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:255) > > > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > > > Did I build it wrong? Or is there a problem with > OpenSolaris that will > > prevent this from working? Or am I missing something > incredibly simple? > > > > As well OpenSolaris is running inside a VM with COM1 mapped to > > COM1(VirtualBox) which I believe maps it to /dev/term/a > > > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > > > > > Hi Tristan? > > What is the output of System.getProperty("os.name") on > OpenSolaris? We > have logic like the following in RXTX to handle platform specific > information: > > if ( osName.equals("Solaris") || osName.equals("SunOS")) > > Which may not be getting hit. The result if you will never > call private > void checkSolaris(String PortName, int PortType). > > It could also result in Solaris specific settings not being > set in the > Makefile. > > > The os.name is displayed when you run the configure script. > > -- > Trent Jarvi > tjarvi at qbang.org > From Martin.Oberhuber at windriver.com Thu Jan 29 06:38:20 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:38:20 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] how do you dynamically reload native libraries? In-Reply-To: References: Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2341@ism-mail03.corp.ad.wrs.com> Hi Douglas, Eclipse / OSGi may be doing what you want. It does say that multiple versions of a lib can co-exist at the same time, when the MANIFEST.MF doesn't specify a lib as a singleton. I'm not sure though if or how that would work with native libs. Eclipse bundles for RXTX-2.1-7r2 are available on http://rxtx.qbang.org/eclipse/downloads/ You could build RXTX-2.2pre and then manually create those Eclipse bundles just by adding the MANIFEST.MF to the JAR with the version number exchanged. Then you should be able to try it out. If you do, let me know how it goes... Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Samstag, 27. Dezember 2008 15:00 > To: rxtx at qbang.org; lyon at docjava.com > Subject: [Suspected Spam][Blocked Sender][Rxtx] how do you > dynamically reload native libraries? > > Hi All, > I am trying to test multiple versions of the RXTX native libraries > in a single JVM. > > Each RXTX library instance can share a single virtual machine, but > must have an isolated context class loader. > A context class loader maps a thread to specific classes and > resources. > When the thread dies, the classes and resources are freed. > > Is there some way to have multiple context class loaders that can > load different native method > library implementations? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Thu Jan 29 07:50:05 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 29 Jan 2009 09:50:05 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D030BE22B@MTL-MSG-02.cgiclients.com> Sorry, I had sent it to Trent alone. It outputs "SunOS" Also I had only added that line as a test to see if explicitly adding the port would make a difference, it didn't. My project scope has been reduced so I don't need to support solaris anymore, but I will return to the problem when things slow down. I do remember that the error that was being reported by the native code was "2" which I believe maps to "ENOENT No such file or directory A file name is specified and the file should exist but doesn't, or one of the directories in a path name does not exist." I didn't get much farther. Thanks, -- Tristan Dyer -----Original Message----- From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] Sent: January 29, 2009 9:33 AM To: Trent Jarvi; Dyer, Tristan Cc: rxtx at qbang.org Subject: RE: [Rxtx] RXTX for OpenSolaris 2008.11 Hi Tristan, > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); I think that this code is wrong. User code must not call the RXTXCommDriver constructor, since you cannot initialize it properly. What you can do to announce previously unknown port names is this: System.setProperty("gnu.io.rxtx.SerialPorts","/dev/term/a"); before you first access any RXTX function. For details, see the code in RXTXCommDriver#registerSpecifiedPorts() > What is the output of System.getProperty("os.name") on OpenSolaris? I didn't see any response of yours to this question from Trent. What does OpenSolaris output? Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Mittwoch, 31. Dezember 2008 20:04 > To: Dyer, Tristan > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX for OpenSolaris 2008.11 > > > > On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > > > > Hi, > > > > I have tried building the rxtx library for OpenSolaris 2008.11. > > > > It seemed to build fine without errors, however code such as > > > > ????? java.util.Enumeration portList > > ???????? = CommPortIdentifier.getPortIdentifiers(); > > ????? boolean found = false; > > ????? while (portList.hasMoreElements()) { > > ???????? portId = (CommPortIdentifier) portList.nextElement(); > > ???????? System.out.println(" " + portId.getName()); > > ???????? if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > > ?????????? ???? ?? System.out.println("found"); > > ?????????????? found = true; > > ?????????????? break; > > ??????????? } > > ???????? } > > ????? } > > Will output nothing. > > > > Or rather it seems as if there are no ports found by RXTX. > This code works > > on Ubuntu8.04 and winXP. > > > > If I Add the port manually and then try and open the port > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > > ????? try{ > > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > > ????? } > > ????? catch(Exception e){ > > ??? ??? ? System.out.println("NoSuchPortException"); > > ??? ??? ? //ignore > > ????? } > > ????? try { > > ??????? ???????? System.out.println("opening port"); > > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > > WAIT_TO_OPEN); > > ??????????? connected = true; > > ??????????? System.out.println("Connected to port " + > portId.getName()); > > ???????? } catch (PortInUseException p) { > > ??????????? if (DEBUG) { > > ?????????????? System.err.println(p); > > ??????????? } > > ??????????? port = null; > > ??????????? portId = null; > > ??????????? System.out.println("PortInUseException"); > > ??????????? p.printStackTrace(); > > ???????? } > > > > I will get the following, but not the NoSuchPortException. > > > > java.lang.reflect.InvocationTargetException > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Caused by: java.lang.NullPointerException > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:296) > > > > ??????? ... 7 more > > > > > > As well as > > > > java.lang.NullPointerException > > ??????? at > gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > > ??????? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > > ??????? at > > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:255) > > > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > > > Did I build it wrong? Or is there a problem with > OpenSolaris that will > > prevent this from working? Or am I missing something > incredibly simple? > > > > As well OpenSolaris is running inside a VM with COM1 mapped to > > COM1(VirtualBox) which I believe maps it to /dev/term/a > > > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > > > > > Hi Tristan > > What is the output of System.getProperty("os.name") on OpenSolaris? > We have logic like the following in RXTX to handle platform specific > information: > > if ( osName.equals("Solaris") || osName.equals("SunOS")) > > Which may not be getting hit. The result if you will never call > private void checkSolaris(String PortName, int PortType). > > It could also result in Solaris specific settings not being set in the > Makefile. > > > The os.name is displayed when you run the configure script. > > -- > Trent Jarvi > tjarvi at qbang.org > From hho at bibliotheca.dk Thu Jan 29 08:00:49 2009 From: hho at bibliotheca.dk (Hans Hvelplund Odborg) Date: Thu, 29 Jan 2009 16:00:49 +0100 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: I know that there arent any guarantees, but could someone involved with the development of RxTx please guesstimate when 2.2 final will be released? I'm not familiar with the pre-release history of 2.1-7 but I read that there was 20 pre-relases of 2.1-7 so I guess (based on current pre-release rate) that 2.2 may easily be more than 6 months away? Thanks Med venlig hilsen / Best regards / Med v?nliga h?lsningar Hans Hvelplund Odborg BIBLIOTHECA A/S Vallensb?kvej 22A, 2. TH ? 2605 Br?ndby ? Denmark Mob.: +45 30235940 Tel.: +45 70271008 Fax: +45 70271009 hho at bibliotheca.dk www.bibliotheca.dk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: 4. januar 2009 20:15 To: rxtx at qbang.org Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Jan 29 08:33:33 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 29 Jan 2009 08:33:33 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: Projects tend to evolve from an adhoc release process to predictable releases when enough projects demand it (and help make it happen). "Its ready when Its ready" is a typical answer prior to the above. I lik$ to say "The beatings will continue until moral improves." I expect moral to improve in the next six months at most. This release i$ resolving 3 larger issues. 1) syncing of some large efforts to the same source code. 2) incorperating all community patches 3) building the binaries correctly. This does not include fixing everyones bugs. But it does include making sure the fixes get in if they are provided. Given the above, I don't expect this to be as drawn out as 2.1-7pre*. We may have several stable releases during the same period. On Thu, 29 Jan 2009, Hans Hvelplund Odborg wrote: > I know that there arent any guarantees, but could someone involved with the > development of RxTx please guesstimate when 2.2 final will be released? > > I'm not familiar with the pre-release history of 2.1-7 but I read that there > was 20 pre-relases of 2.1-7 so I guess (based on current pre-release rate) > that 2.2 may easily be more than 6 months away? > > Thanks > > Med venlig hilsen / Best regards / Med v?nliga h?lsningar > Hans Hvelplund Odborg > > BIBLIOTHECA A/S > Vallensb?kvej 22A, 2. TH ? 2605 Br?ndby ? Denmark > Mob.: +45 30235940 > Tel.: +45 70271008 > Fax: +45 70271009 > hho at bibliotheca.dk > www.bibliotheca.dk > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: 4. januar 2009 20:15 > To: rxtx at qbang.org > Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. > > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org. After this has baked, we can put the web install > in. > > Changes in rxtx 2.2 (If I missed something let me know): > > threshold fix > Alexandre Rusev > http://bugzilla.qbang.org/show_bug.cgi?id=85 > > RXTX close deadlocks in REXTXPort.finalize > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=53 > > Add ACM serial devices to all known ports. > Duncan Pierce > http://bugzilla.qbang.org/show_bug.cgi?id=51 > > Concurrency fixes for SMP/multicore systems > U. George > http://bugzilla.qbang.org/show_bug.cgi?id=100 > > Fixes for MAC systems with no drivers installed. > 1.5 stop bit fix > > Enable universal library builds for Mac OS X > Andre-John Mas ajmas at sympatico.ca > > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > Do not remove and ignore interrupts. > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=45 > > find ports which were added after program startup on Mac > OS X. > Martin Oberhuber > http://bugzilla.qbang.org/show_bug.cgi?id=48 > > Clean up CommPort Ownership code, avoid possible deadlocks, > fix lost commport ownership events. > Martin Oberhuber > http://bugzilla.qbang.org/show_bug.cgi?id=83 > > rxtx does not compile against JDK-1.6 > Neboj?a > http://bugzilla.qbang.org/show_bug.cgi?id=84 > > configure script failed at line UTS_RELEASE > megov > http://bugzilla.qbang.org/show_bug.cgi?id=80 > > code cleanup patch (extra ';' creates bug for if statements > + new String() calls removed) > Xavier Le Vourch > http://bugzilla.qbang.org/show_bug.cgi?id=77 > > Wont compile on linux ppc with glibc 2.5 - no sys/io.h > Brian Johnson > http://bugzilla.qbang.org/show_bug.cgi?id=72 > > rxtx overwrites System properties > Andrew Gillett > Nektarios K. Papadopoulos > Neboj?a > http://bugzilla.qbang.org/show_bug.cgi?id=64 > > Solaris ACM port support > Dave Cleal > http://bugzilla.qbang.org/show_bug.cgi?id=59 > > Setting of non-standard baud rate fails. > Andrew Prunicki > http://bugzilla.qbang.org/show_bug.cgi?id=58 > > RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=50 > > JavaDoc fixes > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > From mmornati at byte-code.com Fri Jan 30 02:32:44 2009 From: mmornati at byte-code.com (Marco Mornati) Date: Fri, 30 Jan 2009 10:32:44 +0100 Subject: [Rxtx] Linux Library Message-ID: <1233307964.4046.19.camel@localhost.localdomain> Hello, I made a little Applet added to my web application to support BarCode printer (on serial port). All is autoconfigured during applet init: dll/so are copied on /tmp folder on local computer and with System.load(/tmp/library.so/dll) I'm adding the library to classpath. On windows all works correctly and I'm able to print (jar is signed... without signing it there's no way to communicate with serial port). I've just a little problem on linux. It seams that library is not added to classpath, because when I try to connect with com port, applet says that is impossible to find .so. Any idea on what could be the problem? Just for information I post here my code: Container content = getContentPane(); content.setBackground(Color.white); content.setLayout(new FlowLayout()); String libraryFile = ""; String libraryName = ""; if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")) { libraryName = DLL_SERIAL_NAME; libraryFile = System.getProperty("java.io.tmpdir") + DLL_SERIAL_NAME; } else if (System.getProperty("os.name").toUpperCase().contains("LINUX")) { if (System.getProperty("os.arch").contains("i386")) { libraryName = SO_SERIAL_NAME_32; } else { libraryName = SO_SERIAL_NAME_64; } char fileSeparator = System.getProperty("file.separator").charAt(0); libraryFile = System.getProperty("java.io.tmpdir") + fileSeparator + SO_SERIAL_NAME; } System.out.println("Library File: " + libraryFile); /** * Copying DLL to java bin dir (if it's not already present) */ if (!verifyLibraryExistence(libraryFile)) { System.out.println("Library file does not exist"); copyResourceFromJar(libraryFile, libraryName); } try { System.load(libraryFile); } catch (Exception e) { System.out.println("Cannot load " + libraryFile + " you have to install it manually!!"); } try { content.add(new JLabel("Initializing Applet!")); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); content.add(new JLabel("List Porte: " + portList)); if (portList == null) { content.add(new JLabel("No Serial Port Found!!")); } while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL)) { System.out.println("Porta Trovata: " + portId.getName()); content.add(new JLabel("Porta Trovata: " + portId.getName())); } break; } } catch (Exception e) { content.add(new JLabel("Exception: " + e)); e.printStackTrace(); } Thanks a lot Bye Marco -- Dott. Ing. Mornati Marco Byte-Code s.r.l via Antonio Cechov, 1 San Giuliano Milanese (MI) E-Mail: mmornati at byte-code.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090130/c176573f/attachment-0007.bin From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0033.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0033.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0031.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0031.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0031.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0031.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0030.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0028.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0028.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0028.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0028.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0028.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0025.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0025.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0025.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment-0024.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0024.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment-0024.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment-0024.html From tjarvi at qbang.org Wed Jan 14 18:56:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 14 Jan 2009 18:56:50 -0700 (MST) Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Message-ID: On Wed, 14 Jan 2009, Jaakko Sipari wrote: > Hi (again)! > > Could someone clarify what these methods actually do and are they even > implemented? Do I get into trouble with buffer values of 0 (if I want to > handle the buffers myself)? > rxtx does not have buffers. It was not clear to me at the time why there would be a buffer when java already provides buffered input and output streams that can sit on top of rxtx. One reason I can see for implementing buffers in rxtx is to get data off the port so select() can block. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Wed Jan 14 23:23:08 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 15 Jan 2009 08:23:08 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> Message-ID: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Here's the same message for the list also. Forgot to do "Reply to all" ---------- Forwarded message ---------- From: Jaakko Sipari Date: Thu, Jan 15, 2009 at 8:22 AM Subject: Re: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize To: Trent Jarvi On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! >> >> Could someone clarify what these methods actually do and are they even >> implemented? Do I get into trouble with buffer values of 0 (if I want to >> handle the buffers myself)? >> >> > rxtx does not have buffers. It was not clear to me at the time why there > would be a buffer when java already provides buffered input and output > streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data off > the port so select() can block. > So basically those methods have currently no effect at all? - Jaakko -- Jaakko Sipari tel. +358451238191 eMail. jaakko.sipari at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090115/8b4c47c0/attachment-0023.html From tjarvi at qbang.org Thu Jan 15 18:37:12 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 15 Jan 2009 18:37:12 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: On Thu, 15 Jan 2009, Jaakko Sipari wrote: > Here's the same message for the list also. Forgot to do "Reply to all" > > ---------- Forwarded message ---------- > From: Jaakko Sipari > Date: Thu, Jan 15, 2009 at 8:22 AM > Subject: Re: [Rxtx] The functionality behind setInputBufferSize & > setOutputBufferSize > To: Trent Jarvi > > > On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! > > Could someone clarify what these methods actually do > and are they even > implemented? Do I get into trouble with buffer > values of 0 (if I want to > handle the buffers myself)? > > > rxtx does not have buffers. ?It was not clear to me at the time why > there would be a buffer when java already provides buffered input and > output streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data > off the port so select() can block. > > > So basically those methods have currently no effect at all? > Correct. You can use BufferedInputStream and BufferedOutputStream from the Java API once you get the Input/OutputStream from rxtx. But changing the input and output buffer size in rxtx is not going to change behavior. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Fri Jan 16 01:22:37 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Fri, 16 Jan 2009 10:22:37 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> > So basically those methods have currently no effect at all? >> >> > Correct. You can use BufferedInputStream and BufferedOutputStream from the > Java API once you get the Input/OutputStream from rxtx. But changing the > input and output buffer size in rxtx is not going to change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > I assume there still is some kind of buffer in rxtx (or the serial port driver) in case of processing delays. I mean, if the serial port gives data faster than can be read from the Java program using rxtx it isn't just thrown away, right? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090116/3bd9a52e/attachment-0022.html From tjarvi at qbang.org Fri Jan 16 05:17:24 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 16 Jan 2009 05:17:24 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> Message-ID: On Fri, 16 Jan 2009, Jaakko Sipari wrote: > > So basically those methods have currently no effect > at all? > > > Correct. ?You can use BufferedInputStream and BufferedOutputStream > from the Java API once you get the Input/OutputStream from rxtx. ?But > changing the input and output buffer size in rxtx is not going to > change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > > > > I assume there still is some kind of buffer in rxtx (or the serial port > driver) in case of processing delays. I mean, if the serial port gives data > faster than can be read from the Java program using rxtx it isn't just > thrown away, right? > The UART can usually hold a few bytes. The kernel driver can buffer the input. In practice, it works. With Sun commapi, the typical application has 4 buffers between the user and the incomming data. With rxtx, it is 3. BufferedInputStream -> commapi/rxtx -> kernel driver -> UART If you really do run into overflows on the UART, then hardware flow control is what you should be using and tinkering with rxtx to avoid it is not a very sound approach. -- Trent Jarvi tjarvi at qbang.org From llowrey at nuclearwinter.com Sun Jan 18 12:49:39 2009 From: llowrey at nuclearwinter.com (Larkin Lowrey) Date: Sun, 18 Jan 2009 13:49:39 -0600 Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain Message-ID: <497387D3.9040201@nuclearwinter.com> After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when running code that uses RXTXComm. The crashes only occur when using 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. As far as I can tell, the crash happens immediately on start. I can't see any evidence of much, if anything, happening before the crash. The code used to work and only stopped working after the "upgrade" to FC10. I have tried RXTX v2.1 and 2.2pre1. Any ideas? Here's the error: # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode linux-amd64) # Problematic frame: # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 --Larkin From tjarvi at qbang.org Mon Jan 19 17:48:34 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 19 Jan 2009 17:48:34 -0700 (MST) Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain In-Reply-To: <497387D3.9040201@nuclearwinter.com> References: <497387D3.9040201@nuclearwinter.com> Message-ID: On Sun, 18 Jan 2009, Larkin Lowrey wrote: > After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when > running code that uses RXTXComm. The crashes only occur when using > 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. > > As far as I can tell, the crash happens immediately on start. I can't > see any evidence of much, if anything, happening before the crash. > > The code used to work and only stopped working after the "upgrade" to > FC10. I have tried RXTX v2.1 and 2.2pre1. > > Any ideas? > > Here's the error: > > # > # An unexpected error has been detected by Java Runtime Environment: > # > # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 > # > # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode > linux-amd64) > # Problematic frame: > # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 > > > --Larkin Hi Larkin, I can think of 2 segv's in rxtx that may apply. Both are fixed in rxtx 2.2pre.. The first was that pointers required by nativeDrain needed to be stored in something larger than a 32 bit integer in java. This resulted in a crash like you see the first time the 'nativedrain' thread tried to use the pointer. The second was a concurrency issue George resolved with synchronization. The crash was usually during close but happened in the 'nativedrain' thread. (eventLoop) As mentioned, these are both fixed in the prerelease. There is a class provided in recent versions of RXTX that allow you confirm the version being used: gnu.io.RXTXVersion with member methods getVersion() and nativeGetVersion(). This allows you to confirm that you are indeed using the version you think you are. -- Trent Jarvi tjarvi at qbang.org From alexandrepoletto at gmail.com Wed Jan 21 11:48:07 2009 From: alexandrepoletto at gmail.com (Alexandre Poletto) Date: Wed, 21 Jan 2009 16:48:07 -0200 Subject: [Rxtx] work in windows but dont work in linux Message-ID: hi folks, I have an application to communicate with the serial port using rxtx, in the windows os my application works well, but when i try to run in the linux os i open the port (in windows "COM1", in Linux "/dev/ttyS0") send my commandes but i never receive any answer. I'm using ubuntu 8.10 and java 1.5, there is any configuration in that i'm missing? Thanks for the help! ps: Sorry form my bad english :( -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/70baea51/attachment-0016.html From jmudd at dtiweb.net Wed Jan 21 14:08:04 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Wed, 21 Jan 2009 16:08:04 -0500 Subject: [Rxtx] Hot unplugging of a USB device Message-ID: Looking to see if the issues surrounding an uplugging of a USB device have been resolved. I see from the mail list archives and bug reports that others have noted this issue. I have a USB GPS Receiver that is plugged into a Windows (XP) system and am using Netbeans 6.5 and Java jdk 1.6 and RXTX 2.1.7 and 2.2pre1. In the thread that is reading data via listening for a SerialEvent I can capture a Java IOException: No error in readArray. The application is essentially hung at this point. Only a termination of the application will clear it up and not leave the port hung. I had read in the archives that this is because the event loop in the native code portion is continually putting out the exceptions. I had also seen that this might be addressed in future releases. Any help is appreciated. Thanks, Jerry ________________________________ Jerry Mudd Senior Programmer 21795 Shangri-La Drive, Ste C Lexington Park, MD 20653 (301) 737-8893 (301) 737-8897 Fax jmudd at dtiweb.net www.dtiweb.net This message may contain sensitive, proprietary and/or privileged information. Disclosure is not authorized unless provided in writing by Defense Technologies, Inc. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0016.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 6296 bytes Desc: image001.gif Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0016.gif From netbeans at gatworks.com Wed Jan 21 17:33:46 2009 From: netbeans at gatworks.com (U. George) Date: Wed, 21 Jan 2009 19:33:46 -0500 Subject: [Rxtx] Hot unplugging of a USB device In-Reply-To: References: Message-ID: <4977BEEA.4020708@gatworks.com> > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:34 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:34 +1100 Subject: [Rxtx] Part 1 of 2 parts re rxtx 2.2 pre.. and OSX Message-ID: Hi, I have tried out the latest version of rxtx on a mac and can report that running with ImageJ (32 bit ) all seems to be fine. However when I attempt to use it with ImageJ64, I get a crash whenever the serial port is used. The details follow. What I did. Ran our plug-in in ImageJ 64 bit (1.42g) for Measuring, which is using the latest rxtx (the beta 2.2 compiled on 30 December 2008) for MacOSX 10.5.x) I installed this by putting the two files in the directory ~ LIBRARY/JAVA/EXTENSIONS. The Plug-in uses the serial port. The window we put up to show the numbers from the stage appeared, but only with the default "0" (zero) in each row, which is what we put there until we get data back from the port and the device attached. Then it crashed. I should point out that this all works fine using ImageJ (32 bit) 1.42g, on the same platform. So the only difference is the use of ImageJ 64 bit, and I guess the version of rxtx for 64 bit. I hope that cleverer people than me can throw some light onto this little problem. ImageJ64 seems to work ok until rxtx is called, although I haven't tried much so far, just some 3D rendering with 1 Gb of image data, which all went well, apart from the fact that the data was marginal. I am now showing the data supplied by the report to Apple window. This has three tabs, one to write your information in, one called Problem Details, and the third called SYSTEM CONFIG. These are pasted in below. Best wishes Noel Problem Details Process: JavaApplicationStub [463] Path: /Applications/ImageJ/ImageJ64.app/Contents/MacOS/JavaApplicationStub Identifier: gov.nih.info.rsb.ImageJ Version: ??? (10.2) Code Type: X86-64 (Native) Parent Process: launchd [398] Date/Time: 2009-01-19 10:48:09.342 +1100 OS Version: Mac OS X 10.5.6 (9G55) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000000029507c8 Crashed Thread: 16 Application Specific Information: Java information: Exception type: Bus Error (0xa) at pc=0x00000006ff70f418 Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0_07-b06-57 mixed mode macosx-amd64) Current thread (0x00000001020de800): JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] Stack: [0x0000000702851000,0x0000000702951000] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j gnu.io.RXTXPort.readByte()I+0 j gnu.io.RXTXPort$SerialInputStream.read()I+81 j SerialConnection.serialEvent(Lgnu/io/SerialPortEvent;)V+41 j gnu.io.RXTXPort.sendEvent(IZ)Z+382 v ~BufferBlob::StubRoutines (1) j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~BufferBlob::StubRoutines (1) Java Threads: ( => current thread ) =>0x00000001020de800 JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] 0x00000001020e8800 JavaThread "Measure XYZ" [_thread_blocked, id=44384256, stack(0x0000000702954000,0x0000000702a54000)] 0x0000000102001000 JavaThread "DestroyJavaVM" [_thread_blocked, id=25169920, stack(0x0000000101001000,0x0000000101801000)] 0x00000001020da800 JavaThread "SocketListener" [_thread_in_native, id=29671424, stack(0x0000000701b4c000,0x0000000701c4c000)] 0x00000001020b4800 JavaThread "AWT-EventQueue-0" [_thread_in_Java, id=-27992064, stack(0x00000006fe44e000,0x00000006fe54e000)] 0x0000000102096000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=-34344960, stack(0x00000006fde3f000,0x00000006fdf3f000)] 0x0000000102078000 JavaThread "AWT-Shutdown" [_thread_blocked, id=-58392576, stack(0x00000006fc750000,0x00000006fc850000)] 0x0000000102077800 JavaThread "AWT-AppKit" daemon [_thread_in_native, id=1886770976, stack(0x00007fff5f400000,0x00007fff5fc00000)] 0x0000000102044800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=-333877248, stack(0x00000006ec097000,0x00000006ec197000)] 0x0000000102043000 JavaThread "CompilerThread1" daemon [_thread_blocked, id=-334938112, stack(0x00000006ebf94000,0x00000006ec094000)] 0x0000000102041800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=-335998976, stack(0x00000006ebe91000,0x00000006ebf91000)] 0x0000000102041000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=-337059840, stack(0x00000006ebd8e000,0x00000006ebe8e000)] 0x0000000102029800 JavaThread "Finalizer" daemon [_thread_blocked, id=-338214912, stack(0x00000006ebc74000,0x00000006ebd74000)] 0x0000000102028800 JavaThread "Reference Handler" daemon [_thread_blocked, id=-339333120, stack(0x00000006ebb63000,0x00000006ebc63000)] Other Threads: 0x0000000102020800 VMThread [stack: 0x00000006eba60000,0x00000006ebb60000] [id=-340393984] 0x0000000102046000 WatcherThread [stack: 0x00000006ec19a000,0x00000006ec29a000] [id=-332816384] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 76480K, used 14448K [0x0000000105800000, 0x000000010ad50000, 0x00000002f9800000) eden space 65600K, 22% used [0x0000000105800000, 0x000000010661c398, 0x0000000109810000) from space 10880K, 0% used [0x0000000109810000, 0x0000000109810000, 0x000000010a2b0000) to space 10880K, 0% used [0x000000010a2b0000, 0x000000010a2b0000, 0x000000010ad50000) tenured generation total 174784K, used 0K [0x00000002f9800000, 0x00000003042b0000, 0x00000006e1800000) the space 174784K, 0% used [0x00000002f9800000, 0x00000002f9800000, 0x00000002f9800200, 0x00000003042b0000) compacting perm gen total 21248K, used 10319K [0x00000006e1800000, 0x00000006e2cc0000, 0x00000006e6c00000) the space 21248K, 48% used [0x00000006e1800000, 0x00000006e2213d28, 0x00000006e2213e00, 0x00000006e2cc0000) No shared spaces configured. Virtual Machine Arguments: JVM Args: -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher. framework/Resources/LauncherSupport.jar -Xms256m -Xmx24000m -Dcom.apple.macos.useScreenMenuBar=false -Dcom.apple.mrj.application.growbox.intrudes=false -Dcom.apple.mrj.application.live-resize=true -Dcom.apple.hwaccel=false -Dapple.awt.Antialiasing=false -Dcom.apple.smallTabs=true -Dapple.awt.brushMetalLook=false Java Command: Launcher Type: generic Physical Memory: Page Size = 4k, Total = 2048M, Free = 30996M Thread 0: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 com.apple.CoreFoundation 0x00007fff8204dc4f CFRunLoopRunSpecific + 1631 3 com.apple.HIToolbox 0x00007fff839fdda2 RunCurrentEventLoopInMode + 278 4 com.apple.HIToolbox 0x00007fff839fdbd8 ReceiveNextEventCommon + 322 5 com.apple.HIToolbox 0x00007fff839fda83 BlockUntilNextEventMatchingListInMode + 79 6 com.apple.AppKit 0x00007fff8299d3b0 _DPSNextEvent + 603 7 com.apple.AppKit 0x00007fff8299ccf1 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 136 8 com.apple.AppKit 0x00007fff82996a84 -[NSApplication run] + 455 9 libawt.jnilib 0x00000006ec433257 +[AWTStarter startAWT:] + 1343 10 libawt.jnilib 0x00000006ec432c46 -[CPerformer perform] + 112 11 com.apple.Foundation 0x00007fff8153f2b4 __NSThreadPerformPerform + 148 12 com.apple.CoreFoundation 0x00007fff8204e0e8 CFRunLoopRunSpecific + 2808 13 ...ple.JavaApplicationLauncher 0x0000000100005165 startupJava(LauncherArgsStruct*) + 235 14 ...ple.JavaApplicationLauncher 0x000000010000579c launchJavaApplication + 1224 15 JavaApplicationStub 0x0000000100000b9c 0x100000000 + 2972 Thread 1: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x0000000101a93b61 JVM_GetCPFieldModifiers + 128961 5 libjvm.dylib 0x0000000101a93a36 JVM_GetCPFieldModifiers + 128662 6 ...ple.JavaApplicationLauncher 0x000000010000c0ce startJavaApplication + 2886 7 ...ple.JavaApplicationLauncher 0x000000010000506d java_main_stub(void*) + 9 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 2: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libSystem.B.dylib 0x00007fff840db0b0 mach_msg_server + 436 3 libjvm.dylib 0x000000010181176d JNI_CreateJavaVM_Impl + 53277 4 libjvm.dylib 0x0000000101811375 JNI_CreateJavaVM_Impl + 52261 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 3: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x00000001018e452f JVM_Lseek + 235727 5 libjvm.dylib 0x00000001018e42df JVM_Lseek + 235135 6 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 7 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 8 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 4: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x00000001028003ea 0 + 4336911338 11 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 12 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 13 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 14 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 15 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 16 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 17 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 18 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 19 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 20 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 5: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 6: 0 libSystem.B.dylib 0x00007fff8406dd72 semaphore_wait_trap + 10 1 libjvm.dylib 0x0000000101915bdb JVM_IsPrimitiveClass + 12139 2 libjvm.dylib 0x00000001019155b5 JVM_IsPrimitiveClass + 10565 3 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 4 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 7: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 8: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 9: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x0000000101918ec8 JVM_IsPrimitiveClass + 25176 5 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 6 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 7 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 10: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x000000010191abb5 JVM_IsPrimitiveClass + 32581 4 libjvm.dylib 0x000000010191a70a JVM_IsPrimitiveClass + 31386 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 11: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 12: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x0000000102803414 0 + 4336923668 12 ??? 0x00000001028003ea 0 + 4336911338 13 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 14 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 15 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 16 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 17 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 18 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 19 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 20 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 21 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 22 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 13: 0 ??? 0x0000000102817034 0 + 4337004596 1 ??? 0x000000010280304e 0 + 4336922702 2 ??? 0x0000000102803093 0 + 4336922771 3 ??? 0x000000010280356d 0 + 4336924013 4 ??? 0x0000000102803093 0 + 4336922771 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x000000010280356d 0 + 4336924013 8 ??? 0x0000000102803093 0 + 4336922771 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x0000000102802f3a 0 + 4336922426 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102802f3a 0 + 4336922426 14 ??? 0x0000000102802f3a 0 + 4336922426 15 ??? 0x0000000102803162 0 + 4336922978 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102802f3a 0 + 4336922426 19 ??? 0x0000000102802f3a 0 + 4336922426 20 ??? 0x00000001028003ea 0 + 4336911338 21 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 22 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 23 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 24 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 25 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 26 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 27 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 28 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 29 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 30 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 14: 0 libSystem.B.dylib 0x00007fff840f210e accept + 10 1 libnet.jnilib 0x00000006ff6b6b11 Java_java_net_PlainSocketImpl_socketAccept + 277 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x0000000102802f3a 0 + 4336922426 4 ??? 0x0000000102802f3a 0 + 4336922426 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x0000000102803414 0 + 4336923668 8 ??? 0x00000001028003ea 0 + 4336911338 9 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 10 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 11 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 12 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 13 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 14 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 15 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 16 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 17 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 18 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 15: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x000000010280304e 0 + 4336922702 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102803414 0 + 4336923668 14 ??? 0x0000000102803093 0 + 4336922771 15 ??? 0x0000000102803093 0 + 4336922771 16 ??? 0x0000000102803093 0 + 4336922771 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102803414 0 + 4336923668 19 ??? 0x00000001028003ea 0 + 4336911338 20 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 21 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 22 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 23 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 24 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 25 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 26 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 27 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 28 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 29 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 Crashed: 0 librxtxSerial.jnilib 0x00000006ff70f418 read_byte_array + 68 1 librxtxSerial.jnilib 0x00000006ff70f9b3 Java_gnu_io_RXTXPort_readByte + 93 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x000000010280304e 0 + 4336922702 4 ??? 0x000000010280304e 0 + 4336922702 5 ??? 0x0000000102803414 0 + 4336923668 6 ??? 0x00000001028003ea 0 + 4336911338 7 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 8 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 9 libjvm.dylib 0x00000001018e5be8 JVM_Lseek + 241544 10 libjvm.dylib 0x0000000101900b11 JVM_MonitorWait + 17249 11 libjvm.dylib 0x0000000101a1e59e JVM_DisableCompiler + 1166 12 librxtxSerial.jnilib 0x00000006ff70d91e send_event + 132 13 librxtxSerial.jnilib 0x00000006ff70e82b report_serial_events + 92 14 librxtxSerial.jnilib 0x00000006ff7108c9 Java_gnu_io_RXTXPort_eventLoop + 237 15 ??? 0x000000010280e878 0 + 4336969848 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x00000001028003ea 0 + 4336911338 18 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 19 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 20 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 21 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 22 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 23 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 24 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 25 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 26 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 27 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 17: 0 libSystem.B.dylib 0x00007fff84074d02 __semwait_signal + 10 1 libSystem.B.dylib 0x00007fff840dce91 usleep + 57 2 librxtxSerial.jnilib 0x00000006ff70d729 drain_loop + 45 3 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 4 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 crashed with X86 Thread State (64-bit): rax: 0x00000000029507c0 rbx: 0x0000000000000041 rcx: 0x0000000000000065 rdx: 0x0000000000000002 rdi: 0x00000006ff71205e rsi: 0x00000006ff711c67 rbp: 0x0000000702950000 rsp: 0x000000070294fef0 r8: 0x000000000000004d r9: 0x00000006e21d64c0 r10: 0x00000006e21d38e8 r11: 0x00000000000000d2 r12: 0x00000001020de998 r13: 0x00000006e21d93b0 r14: 0x0000000000000032 r15: 0x00000000029507c0 rip: 0x00000006ff70f418 rfl: 0x0000000000010202 cr2: 0x00000000029507c8 Continued in the message part 2 -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:41 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:41 +1100 Subject: [Rxtx] Part 2 re rxtx 2.2 pre... and MacOSX Message-ID: Continued from Part 1. Binary Images: 0x100000000 - 0x100000fff JavaApplicationStub ??? (???) /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationS tub 0x100004000 - 0x100011fff com.apple.JavaApplicationLauncher 12.2.0 (12.2.0) /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/JavaApplicationLauncher 0x10001a000 - 0x100022ffd com.apple.JavaVM 12.2.0 (12.2.0) <2b178e8d4bbcc0aa427c2f3f71bb2fcb> /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM 0x100055000 - 0x10005dff0 libverify.dylib ??? (???) <56eac95084cb86cd1339a721b1353182> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libveri fy.dylib 0x100063000 - 0x10006cffb JavaNativeFoundation ??? (???) <68ca6409dc49542301edda1e0744ac69> /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNative Foundation.framework/Versions/A/JavaNativeFoundation 0x1000a8000 - 0x1000c7fef libjava.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjava .jnilib 0x1000d8000 - 0x1000e5ffb libzip.jnilib ??? (???) <5b6dce7c9a1f25aa5dff1a633c9dc342> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libzip. jnilib 0x101803000 - 0x101eafff3 libjvm.dylib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bundle/Libra ries/libjvm.dylib 0x6ec2c5000 - 0x6ec2c6fff liblauncher.jnilib ??? (???) <567fa54a222b965b2c4aefea21d9800a> /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/Resources/liblauncher.jnilib 0x6ec431000 - 0x6ec5e4fff libawt.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libawt. jnilib 0x6fdc3b000 - 0x6fdc3cfff ATSHI.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/Resources/ATSHI.dylib 0x6fdd6e000 - 0x6fdd6efff libcmm.jnilib ??? (???) <114e1a620a6920d77bf09bd57a7f7d52> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libcmm. jnilib 0x6fdd9e000 - 0x6fde1fff7 libfontmanager.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libfont manager.jnilib 0x6fdf41000 - 0x6fdf8ffff libsuncmm.jnilib ??? (???) <47330f1f17822de3a5cf921e07615cf7> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libsunc mm.jnilib 0x6fdf95000 - 0x6fdfc4ff7 libjpeg.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjpeg .jnilib 0x6ff6ae000 - 0x6ff6baffb libnet.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnet. jnilib 0x6ff6c0000 - 0x6ff6c4fff libnio.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnio. jnilib 0x6ff6d4000 - 0x6ff6e8ff7 libdcpr.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libdcpr .jnilib 0x6ff70c000 - 0x6ff713fff +librxtxSerial.jnilib ??? (???) <5133deacebd01ceab7d528c541241956> /Library/Java/Extensions/librxtxSerial.jnilib 0x6ff734000 - 0x6ff74bfef libJapaneseConverter.dylib ??? (???) <64cca6bb4650a269f49a8427507e4963> /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib 0x70204f000 - 0x702218fef com.apple.RawCamera.bundle 2.0.10 (2.0.10) /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera 0x7fff5fc00000 - 0x7fff5fc2e643 dyld 97.1 (???) /usr/lib/dyld 0x7fff80003000 - 0x7fff80146ffb com.apple.audio.toolbox.AudioToolbox 1.5.2 (1.5.2) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x7fff801d2000 - 0x7fff801d5ffb com.apple.help 1.1 (36) <9000c05ccad96fdcc25bc35264abf587> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.frame work/Versions/A/Help 0x7fff801d6000 - 0x7fff80211fff com.apple.AE 402.2 (402.2) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.f ramework/Versions/A/AE 0x7fff80212000 - 0x7fff80257fef libRIP.A.dylib ??? (???) <8c818d7fd3dc57839ac48caf107ff4c0> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x7fff80258000 - 0x7fff8029bfef com.apple.QD 3.11.54 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/QD.framework/Versions/A/QD 0x7fff8029c000 - 0x7fff802dffef libTIFF.dylib ??? (???) <86be7909f46cc044a887cbb60ab7826d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x7fff802e0000 - 0x7fff803d4fff libobjc.A.dylib ??? (???) <118dc1ae05e685ad64290352fc94f1f0> /usr/lib/libobjc.A.dylib 0x7fff803d5000 - 0x7fff8045dfe7 libsqlite3.0.dylib ??? (???) <3c7ab3523b816dbd3e039ee7e6e2c580> /usr/lib/libsqlite3.0.dylib 0x7fff8045e000 - 0x7fff80466ffa libbsm.dylib ??? (???) <4d838c0d8a74fe61c781a53a8723303d> /usr/lib/libbsm.dylib 0x7fff80467000 - 0x7fff80497fff com.apple.shortcut 1 (1.0) <9822328df9321a661af3afcc841e8f80> /System/Library/PrivateFrameworks/Shortcut.framework/Versions/A/Shortcut 0x7fff80498000 - 0x7fff8049bfff com.apple.securityhi 3.0 (30817) <00ddd6e60692b62b7649573eab8aef5a> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI .framework/Versions/A/SecurityHI 0x7fff8049c000 - 0x7fff8049efff com.apple.print.framework.Print 218.0.2 (220.1) <2b847a0a1cd885f596a4d10409d50ba3> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.fram ework/Versions/A/Print 0x7fff8049f000 - 0x7fff805dbfe9 com.apple.ImageIO.framework 2.0.4 (2.0.4) <47dcdc0b5986b2c157e0b6dae48ce464> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/ImageIO 0x7fff805dc000 - 0x7fff805f9fef com.apple.CoreVideo 1.5.1 (1.5.1) <78253b3fe8d3dcc90f159d7ed866c295> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x7fff805fa000 - 0x7fff8068bfff com.apple.SearchKit 1.2.1 (1.2.1) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Sear chKit.framework/Versions/A/SearchKit 0x7fff8068c000 - 0x7fff80e49fef libBLAS.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libBLAS.dylib 0x7fff80e4a000 - 0x7fff81416fff com.apple.CoreGraphics 1.407.2 (???) <436dbc70f8c9b29b3beb1d2de220acf2> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/CoreGraphics 0x7fff81417000 - 0x7fff8141dfff com.apple.DiskArbitration 2.2.1 (2.2.1) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitrat ion 0x7fff8141e000 - 0x7fff8145bff7 com.apple.SystemConfiguration 1.9.2 (1.9.2) <150119d0cecb0c80f6736b9881c2411e> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemCo nfiguration 0x7fff8145c000 - 0x7fff81523fec com.apple.CFNetwork 422.11 (422.11) <570ca46de3b907cb1c8e33fc62f562b4> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNe twork.framework/Versions/A/CFNetwork 0x7fff81524000 - 0x7fff8152dfff libCGATS.A.dylib ??? (???) <722a0bbd58740d46739008e881010631> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib 0x7fff8152e000 - 0x7fff81533fff com.apple.CommonPanels 1.2.4 (85) <2cec1ecc95cf1ecea8bea030975a46b8> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPane ls.framework/Versions/A/CommonPanels 0x7fff81534000 - 0x7fff817cffe3 com.apple.Foundation 6.5.7 (677.22) <8134977fcc57198a53dc494b60592980> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x7fff817d0000 - 0x7fff817d0ffd com.apple.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x7fff817d1000 - 0x7fff81cf1fc6 libGLProgrammability.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgra mmability.dylib 0x7fff81cf2000 - 0x7fff81cf4fff com.apple.NavigationServices 3.5.2 (163) <7cb7f3fe7f9d56ec89ef28a6d3a1da7d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Navigation Services.framework/Versions/A/NavigationServices 0x7fff81cf5000 - 0x7fff81d32fe7 com.apple.coreui 1.2 (62) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x7fff81d33000 - 0x7fff81d33fff com.apple.Carbon 136 (136) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x7fff81d34000 - 0x7fff81d42fff libCSync.A.dylib ??? (???) <61f6cc104b3e9b77cd583635a3a9a5cf> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x7fff81d43000 - 0x7fff81d45ff9 libRadiance.dylib ??? (???) <6d9f2235e8f70a7aedfc59383a7548d8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x7fff81d46000 - 0x7fff81db5ff9 com.apple.print.framework.PrintCore 5.5.3 (245.3) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/PrintCore.framework/Versions/A/PrintCore 0x7fff81db6000 - 0x7fff81db6ff8 com.apple.ApplicationServices 34 (34) <81cd02cc2ccf4e47e51d03db860da556> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Applicat ionServices 0x7fff81db7000 - 0x7fff81dd8fff libresolv.9.dylib ??? (???) <38318f9fbcfbdb384e0f9b08cc0e757a> /usr/lib/libresolv.9.dylib 0x7fff81dd9000 - 0x7fff81e4ffef libvMisc.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvMisc.dylib 0x7fff81e50000 - 0x7fff81e52ff7 libffi.dylib ??? (???) <920bb19728451f35703bb95dc908c7ca> /usr/lib/libffi.dylib 0x7fff81e53000 - 0x7fff81eeefe7 com.apple.ink.framework 101.3 (86) <60c6579faf114ea9677fd9ae25389ed2> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framew ork/Versions/A/Ink 0x7fff81eef000 - 0x7fff81f0dfff libPng.dylib ??? (???) <4017eab74319a648dfd73b7d503e557d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x7fff81f0e000 - 0x7fff81f24ff9 com.apple.ImageCapture 5.0.1 (5.0.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCaptu re.framework/Versions/A/ImageCapture 0x7fff81f25000 - 0x7fff81f3dfff com.apple.DictionaryServices 1.0.0 (1.0.0) <78ea11e9a92120f76d69efa24b8d1f95> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Dict ionaryServices.framework/Versions/A/DictionaryServices 0x7fff81f3e000 - 0x7fff81f42fff libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib 0x7fff81f43000 - 0x7fff81fe3fe3 com.apple.ApplicationServices.ATS 3.4 (???) <47cf09bf78935889f17f1b6b09badf0d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/ATS 0x7fff81fe4000 - 0x7fff8211bfff com.apple.CoreFoundation 6.5.5 (476.17) <51930d43c7c2d8fb24148cbfc05bba0f> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundatio n 0x7fff8211c000 - 0x7fff82126fff com.apple.speech.recognition.framework 3.7.24 (3.7.24) <2399374b096b284345daba82e2cb833d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechReco gnition.framework/Versions/A/SpeechRecognition 0x7fff82127000 - 0x7fff82159ff7 libauto.dylib ??? (???) /usr/lib/libauto.dylib 0x7fff8215a000 - 0x7fff821cefe7 libstdc++.6.dylib ??? (???) <565ee6f798f7fef6f804c60682787280> /usr/lib/libstdc++.6.dylib 0x7fff821cf000 - 0x7fff8228dfff edu.mit.Kerberos 6.0.12 (6.0.12) /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x7fff8228e000 - 0x7fff8228effb com.apple.installserver.framework 1.0 (8) /System/Library/PrivateFrameworks/InstallServer.framework/Versions/A/Install Server 0x7fff8228f000 - 0x7fff82293fff libGIF.dylib ??? (???) <66436b84211fe0e723051eab15af0aca> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x7fff82294000 - 0x7fff8258ffe3 com.apple.CoreServices.CarbonCore 786.10 (786.10) <2ac701edf3ca98a86ae9d5f733200b40> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Carb onCore.framework/Versions/A/CarbonCore 0x7fff82590000 - 0x7fff825aafff libvDSP.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvDSP.dylib 0x7fff825ab000 - 0x7fff827b1ff3 com.apple.security 5.0.4 (34102) <47c559b17c1f51998e7a981d0fbec4c8> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x7fff827b2000 - 0x7fff827d9fff libxslt.1.dylib ??? (???) /usr/lib/libxslt.1.dylib 0x7fff827da000 - 0x7fff82948fff libicucore.A.dylib ??? (???) <374ddaf141bf88dba00ab9058f2dbad6> /usr/lib/libicucore.A.dylib 0x7fff82949000 - 0x7fff8295dff7 libGL.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x7fff8295e000 - 0x7fff83286fff com.apple.AppKit 6.5.6 (949.43) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x7fff83287000 - 0x7fff83667fef com.apple.QuartzCore 1.5.7 (1.5.7) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x7fff83668000 - 0x7fff836b8fe7 com.apple.Metadata 10.5.2 (398.25) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Meta data.framework/Versions/A/Metadata 0x7fff836b9000 - 0x7fff836baff3 com.apple.audio.units.AudioUnit 1.5 (1.5) /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x7fff836bb000 - 0x7fff83710fe3 com.apple.HIServices 1.7.0 (???) <6bef766448d67adb91901b432629ea0f> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/HIServices.framework/Versions/A/HIServices 0x7fff83711000 - 0x7fff83711ffd com.apple.Accelerate.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/vecLib 0x7fff83712000 - 0x7fff837a7ffb com.apple.LaunchServices 290.3 (290.3) <56544e16c5192d2ce72df772901fcaef> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Laun chServices.framework/Versions/A/LaunchServices 0x7fff837a8000 - 0x7fff8382ffef com.apple.audio.CoreAudio 3.1.1 (3.1.1) <9c1714647fd7515c900362ad2ac76874> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x7fff83830000 - 0x7fff83893fef libGLU.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dyli b 0x7fff83894000 - 0x7fff838a2ff9 com.apple.helpdata 1.0.1 (14.2) /System/Library/PrivateFrameworks/HelpData.framework/Versions/A/HelpData 0x7fff838a3000 - 0x7fff838afff1 libgcc_s.1.dylib ??? (???) <23fa31a628c1ea8a62ac529fa333b6e1> /usr/lib/libgcc_s.1.dylib 0x7fff838b0000 - 0x7fff838d2fff libJPEG.dylib ??? (???) <4257ab268996bbeb93b47946df181cdc> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x7fff838d3000 - 0x7fff838d3ffd com.apple.Accelerate 1.4.2 (Accelerate 1.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x7fff838d4000 - 0x7fff838d4ff8 com.apple.Cocoa 6.5 (???) <8c59f679ffbd9178134df1d83dedde28> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa 0x7fff838d5000 - 0x7fff839cafff libxml2.2.dylib ??? (???) <8226d1180354f493954c5fa1fc0e1154> /usr/lib/libxml2.2.dylib 0x7fff839cb000 - 0x7fff839dafe7 com.apple.opengl 1.5.9 (1.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x7fff839db000 - 0x7fff83cc2feb com.apple.HIToolbox 1.5.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. framework/Versions/A/HIToolbox 0x7fff83cc3000 - 0x7fff83d03fef com.apple.framework.IOKit 1.5.1 (???) <17e6707127a60c5e2d7a9bd2b7bf2db0> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x7fff83d04000 - 0x7fff83dc8fe2 com.apple.vImage 3.0 (3.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage .framework/Versions/A/vImage 0x7fff83dc9000 - 0x7fff83df3fff libcups.2.dylib ??? (???) /usr/lib/libcups.2.dylib 0x7fff83df4000 - 0x7fff83df4ffa com.apple.CoreServices 32 (32) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x7fff83df5000 - 0x7fff83ed6fff libcrypto.0.9.7.dylib ??? (???) <66f1f8773bd9fdfdcfd09e2b4b010636> /usr/lib/libcrypto.0.9.7.dylib 0x7fff83ed7000 - 0x7fff83f87fef com.apple.CoreServices.OSServices 226.5 (226.5) <1c38f727b3ad3293272db7323b37c735> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSSe rvices.framework/Versions/A/OSServices 0x7fff83f88000 - 0x7fff83fa2fff com.apple.openscripting 1.2.8 (???) <0674c4e3353c677c9f58df3297ae559b> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScript ing.framework/Versions/A/OpenScripting 0x7fff83fa3000 - 0x7fff83fdfff7 libGLImage.dylib ??? (???) <02258bcdbe8defdb254acc077a81dd9b> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage. dylib 0x7fff83fe0000 - 0x7fff83ff1fff com.apple.speech.synthesis.framework 3.7.1 (3.7.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x7fff83ff2000 - 0x7fff8406cff3 com.apple.CoreText 2.0.3 (???) <827bbfef670df72316719c25bfb39915> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreText.framework/Versions/A/CoreText 0x7fff8406d000 - 0x7fff841f8ffb libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0x7fff841f9000 - 0x7fff8420affd libz.1.dylib ??? (???) /usr/lib/libz.1.dylib 0x7fff8420b000 - 0x7fff842befef com.apple.DesktopServices 1.4.7 (1.4.7) /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/D esktopServicesPriv 0x7fff842bf000 - 0x7fff84677fff libLAPACK.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libLAPACK.dylib 0x7fff84678000 - 0x7fff84743fef com.apple.ColorSync 4.5.1 (4.5.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ColorSync.framework/Versions/A/ColorSync 0x7fff84744000 - 0x7fff84847feb com.apple.CoreData 100.1 (186) <074abc7f43f81f7885e4d0674a8be4bc> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x7fffffe00000 - 0x7fffffe01780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0xfffffffffffec000 - 0xfffffffffffeffff libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib SYSTEM CONFIG Model: MacPro3,1, BootROM MP31.006C.B05, 8 processors, Quad-Core Intel Xeon, 2.8 GHz, 32 GB Graphics: kHW_ATIrv630Item, ATI Radeon HD 2600, spdisplays_pcie_device, 256 MB Memory Module: DIMM Riser B/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Bluetooth: Version 2.1.3f8, 2 service, 1 devices, 1 incoming serial ports Network Service: Ethernet 2, Ethernet, en1 PCI Card: ATI Radeon HD 2600, display, Slot-1 Serial ATA Device: WDC WD3200AAJS-41VWA0, 298.09 GB Parallel ATA Device: PIONEER DVD-RW DVR-112D USB Device: Keyboard Hub, (null) mA USB Device: Apple Optical USB Mouse, (null) mA USB Device: Apple Keyboard, (null) mA USB Device: hub_device, (null) mA USB Device: Apple Cinema HD Display, (null) mA USB Device: Keyspan USA-28Xb, (null) mA USB Device: Bluetooth USB Host Controller, (null) mA FireWire Device: built-in_hub, unknown_value, unknown_speed FireWire Device: My Book, WD, 800mbit_speed FireWire Device: unknown_device, unknown_value, unknown_speed -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From jaakko.sipari at gmail.com Thu Jan 22 03:00:03 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 22 Jan 2009 12:00:03 +0200 Subject: [Rxtx] RXTX compilation with GCJ possible? Message-ID: <901f25b80901220200s53792317o374b80cbb6066a52@mail.gmail.com> Hi! Does anyone have experience on using RXTX in a GCJ compiled Java application? I'm interested whether this is possible in Windows and/or in Linux platforms. And of course what does it take to get it work, or does it just work out of the box. Ultimately my aim here would be to move to a more time deterministic system by utilizing GCJ, jRate & Javolution and possibly run the RXTX (and other important) threads at a priority higher than the garbage collector. This of course would require some modification for the RXTX threads to run in a Javolution pool context or non allocating real time contexts so they wouldn't produce any garbage, but that's something to hack on later. For now I'd just like to know if there are any obstacles on the road to compiling & running RXTX with GCJ. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/5592681a/attachment-0016.html From jmudd at dtiweb.net Thu Jan 22 06:21:03 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Thu, 22 Jan 2009 08:21:03 -0500 Subject: [Rxtx] Hot unplugging of a USB device References: <4977BEEA.4020708@gatworks.com> Message-ID: U. George, Thanks for the information. How did you resolve your USB/GPS device on Linux? My application has to run on both Linux and Windows eventually. Thanks, Jerry -----Original Message----- From: U. George [mailto:netbeans at gatworks.com] Sent: Wednesday, January 21, 2009 7:34 PM To: Jerry Mudd Cc: rxtx at qbang.org Subject: Re: [Rxtx] Hot unplugging of a USB device > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From m.kirkland at comcast.net Thu Jan 22 09:21:01 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Thu, 22 Jan 2009 08:21:01 -0800 Subject: [Rxtx] Serial port control lines change with call to getPortIdentifiers() on Linux Message-ID: <94443DEFFD574B6CA8DDB2B201D9E007@bengal.net> Hi All ! I have noticed an issue with RXTX on Ubuntu Linux 8.10 that has prevented me from being able to use RXTX on Linux. I have noticed this issue on both the rxtx 2.1.7 and the new rxtx2.2pre1. When I execute the following line to get the ports on a system - java.util.Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); Both DTR and RTS become active on ttyS0 and only ttyS0, not ttyS1 (I only have 2 ports). I see this prior to opening any ports or making any other calls to RXTX. I have stepped it though with the debugger and I am sure this is the trigger. My application uses these control lines to perform functions other then the standard flow control so it is critical that I be able to control them exactly. I would also think that folks using RXTX for more standard serial IO would also have issues with devices starting to talk before a listener was ready. I checked Windows XP and I do not see this issue (but I only have a com1 on the Windows computer). I also noticed that the DTR line blips when setting up a port on 2.2.pre1 like it does on 2.1.7r2. This it the same issue that the folks at http://www.codeskin.com/ patched. I see this issue on both Linux and Windows XP. Any help or clues would be greatly appreciated. If I can provide any additional info or do any testing I would be glad to help out to get version 2.2 in top shape for release. BTW I have written a simple dynamic loader to load the RXTX jar and native code that is drive by the os.name and os.arch system properties. I would be more then happy to contribute this to the project if folks though it would be useful. Its more convenient then having to manage copying the files around to various JVM's. TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/eab26bae/attachment-0015.html From josefk_5 at yahoo.com Fri Jan 23 09:44:06 2009 From: josefk_5 at yahoo.com (Josef Kahsay) Date: Fri, 23 Jan 2009 08:44:06 -0800 (PST) Subject: [Rxtx] Help on Accessing RS232 Message-ID: <509617.88308.qm@web38205.mail.mud.yahoo.com> Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS From m.kirkland at comcast.net Sat Jan 24 01:28:52 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Sat, 24 Jan 2009 00:28:52 -0800 Subject: [Rxtx] Help on Accessing RS232 In-Reply-To: <509617.88308.qm@web38205.mail.mud.yahoo.com> References: <509617.88308.qm@web38205.mail.mud.yahoo.com> Message-ID: <665887C02E1446708CE392FE0BD73D79@bengal.net> It seems to me that you are having a classic java classpath issue. Java classpath issues can be annoying to solve sometimes. As some random guesses I would suggest you look at the following. 1 - You might not be running the JVM from the location that you think you are (gets me all the time). I which Windows had a which command. 2 - You don't mention what development environment you are using like Eclipse etc., and if you are trying to run the demo from inside the development environment. If so, do whatever is appropriate for the development environment to control the classpath. In Eclipse this would involve adding a "User Library" to point to the jar and native code. 3 - Once you get the classpath ok, the next thing you might run into is not being able to load the native library. 4 - I have found that on XP I can place the RXTX jar and native library in the same directory as my application's jar file (and a class-path entry in the application's jar file manifest) and it all works. 5 - If you need more control of managing different versions of RXTX for different OS platforms, I have a dynamic RXTX loader I can send you (but I recommend getting the simple case working first). Let me know if this helps. Mike -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Josef Kahsay Sent: Friday, January 23, 2009 8:44 AM To: rxtx at qbang.org Subject: [Rxtx] Help on Accessing RS232 Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jacomoman at hotmail.com Mon Jan 26 12:12:27 2009 From: jacomoman at hotmail.com (Joseph Schmoley) Date: Mon, 26 Jan 2009 11:12:27 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: Message-ID: Hi All, First, let me thank you all for your effort on this excellent project. I've been using the Win32 binaries in the 2.1-7r2 package without any problems on WinXP Pro (32-bit). I then tried the .jnilib of the same version on my Mac OSX 10.5 64-bit darwin and got the familiar UnsatisfiedLinkError problem. I read up on all the mailing list archive messages and found this one (http://mailman.qbang.org/pipermail/rxtx/2008-May/2436699.html) suggesting that perhaps rxtx-devel from CVS would have a fix. So I got latest rxtx-devel + commapi-0-0-1 as suggested by the CVS page at rxtx.org. I even set my CFLAGS and LDFLAGS to include "-arch x86_64 -arch ppc64", but as it turned out, the latest configure script didn't need it. In any case, I configured and built rxtx-devel with no errors (that I could see) and transferred the resulting i386-apple-darwin9.6.0/librxtxSerial.jnilib to where my java.library.path is pointing to and ran my test class. Whereas before I was getting UnsatisfiedLinkError, I now simply get this: Invalid memory access of location 22d927c8 rip=22356420 Invalid memory access of location 22d9292c rip=22357540 [error occurred during error reporting (null), id 0xa] ./run-class.sh: line 10: 15647 Segmentation fault java -Djava.library.path=./lib/native -Dapp.logging.file.path=./log/runtime.log -classpath .:${MYCP} ${CLASSNAME} "${CMD}" run-class.sh is simply a script I've got to run my test class and all that class does is invoke the RXTX API, first one being: CommPortIdentifier.getPortIdentifiers(). Has anyone had any luck with getting latest CVS sources to work on Mac OS X 10.5 64-bit? Any help/pointers would be greatly appreciated. Thank you in advance. -Jac I've attached my configure and make output as txt files. Here's all my build/machine environment info, as per the troubleshooting wiki page: Mac OS X 10.5.6 (9G55) ----------------------------------------------- /usr/bin/java -version java version "1.6.0_07" Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153) Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode) ----------------------------------------------- Darwin my-macbook.local 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 ----------------------------------------------- autoconf (GNU Autoconf) 2.61 Copyright (C) 2006 Free Software Foundation, Inc. This is free software. You may redistribute copies of it under the terms of the GNU General Public License . There is NO WARRANTY, to the extent permitted by law. Written by David J. MacKenzie and Akim Demaille. ----------------------------------------------- automake (GNU automake) 1.10 Written by Tom Tromey and Alexandre Duret-Lutz . Copyright 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ----------------------------------------------- $ libtool -V Apple Computer, Inc. version cctools-698.1 ----------------------------------------------- GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program built for powerpc-apple-darwin9.0 ----------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: my-configure.out.txt Type: application/octet-stream Size: 6934 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090126/89d9c7f6/attachment-0022.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: my-make.out.txt Type: application/octet-stream Size: 7737 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090126/89d9c7f6/attachment-0023.obj From kintel at sim.no Mon Jan 26 16:16:19 2009 From: kintel at sim.no (Marius Kintel) Date: Tue, 27 Jan 2009 00:16:19 +0100 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: Message-ID: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Hi Jac, I've had the same issue, and I suggested a patch to partially fix it a while back: http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html I don't know the status of this in the current incarnation of the rxtx code and I have reverted to Java-1.5 since then.. ~/= Marius -- We are Elektropeople for a better living. From tjarvi at qbang.org Tue Jan 27 08:08:54 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 27 Jan 2009 08:08:54 -0700 (MST) Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: On Tue, 27 Jan 2009, Marius Kintel wrote: > Hi Jac, > > I've had the same issue, and I suggested a patch to partially fix it a > while back: > http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html > > I don't know the status of this in the current incarnation of the rxtx > code and I have reverted to Java-1.5 since then.. > > ~/= Marius > > -- > We are Elektropeople for a better living. > Hmm. That did not get in. I can add it and put a new prerelease out this week. The eis must be a regression. I was sure we fixed that. -- Trent Jarvi tjarvi at qbang.org From jacomoman at hotmail.com Tue Jan 27 08:48:16 2009 From: jacomoman at hotmail.com (Joseph Schmoley) Date: Tue, 27 Jan 2009 07:48:16 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: That would be excellent Trent. I've got a project partially on hold because of this. It runs great on Win32 (XP/Vista), it just has to do the same on Mac 64-bit and Linux 32-bit. I look forward to this pre-release. Again, thanks a bunch to you and all the other code contributors for this excellent project. I wish I could donate something to you guys. I couldn't find a donation link anywhere. RxTx has been a great help with my project. -Jac From: Trent Jarvi Sent: Tuesday, January 27, 2009 7:08 AM To: Marius Kintel Cc: Joseph Schmoley ; rxtx at qbang.org Subject: Re: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit On Tue, 27 Jan 2009, Marius Kintel wrote: > Hi Jac, > > I've had the same issue, and I suggested a patch to partially fix it a > while back: > http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html > > I don't know the status of this in the current incarnation of the rxtx > code and I have reverted to Java-1.5 since then.. > > ~/= Marius > > -- > We are Elektropeople for a better living. > Hmm. That did not get in. I can add it and put a new prerelease out this week. The eis must be a regression. I was sure we fixed that. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090127/bbd287bb/attachment-0010.html From bschlining at gmail.com Tue Jan 27 09:38:26 2009 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 27 Jan 2009 08:38:26 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: > That would be excellent Trent. I've got a project partially on hold > because of this. It runs great on Win32 (XP/Vista), it just has to do the > same on Mac 64-bit and Linux 32-bit. I look forward to this pre-release. > I'm in the same spot too. Looking forward to the pre-release! -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090127/2275013b/attachment-0010.html From andrew.paverd at rorotika.com Wed Jan 28 03:14:58 2009 From: andrew.paverd at rorotika.com (Andrew Paverd) Date: Wed, 28 Jan 2009 12:14:58 +0200 Subject: [Rxtx] RXTX not working on Solaris Message-ID: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Hi all, I am attempting to use RXTX on a Sun SPARC server running Solaris. I have tried the binaries from both the latest release (2.1-7) and the pre-release (2.2pre1). The 2.1-7 driver gives the following error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: fatal: libgcc_s.so.1: open failed: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)" I'm not sure what this "libgcc_s.so.1" file does in terms of RXTX but its absence is preventing the application from running. With the 2.2pre1 binary, the application loads without any issue but does not detect any comm-ports. I know that there are multiple ports available because when using the Sun javax.comm library for Solaris SPARC, the ports are all correctly discovered and the application can read from and write to them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in the 2.2 release. Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if so, how did you do it (which versions did you use etc.)? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090128/a97b220d/attachment-0010.html From tjarvi at qbang.org Wed Jan 28 17:01:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 28 Jan 2009 17:01:50 -0700 (MST) Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: On Wed, 28 Jan 2009, Andrew Paverd wrote: > > Hi all, > > ? > > I am attempting to use RXTX on a Sun SPARC server running Solaris. I have > tried the binaries from both the latest release (2.1-7) and the pre-release > (2.2pre1). > > ? > > The 2.1-7 driver gives the following error: > > ? > > ?Exception in thread "main" java.lang.UnsatisfiedLinkError: > /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: > fatal: libgcc_s.so.1: open failed: No such file or directory > > ??????? at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > ??????? at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) > > ??????? at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) > > ??????? at java.lang.Runtime.loadLibrary0(Runtime.java:823) > > ??????? at java.lang.System.loadLibrary(System.java:1030) > > ??????? at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)? > > ? > > I?m not sure what this ?libgcc_s.so.1? file does in terms of RXTX but its > absence is preventing the application from running. > > ? > > With the 2.2pre1 binary, the application loads without any issue but does > not detect any comm-ports. I know that there are multiple ports available > because when using the Sun javax.comm library for Solaris SPARC, the ports > are all correctly discovered and the application can read from and write to > them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in > the 2.2 release. > > ? > > Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if > so, how did you do it (which versions did you use etc.)? > > ? Hi Andrew ld.so/libgcc_s.so are part of GNU gcc/ld. They are available for solaris. I'm not sure how to link them without requiring them. It is also possible to compile rxtx with Sun's compiler if you have it. Perhaps someone here knows how to get rxtx compiled on Solaris using gcc without requiring those libs by everyone? -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Jan 28 17:39:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 28 Jan 2009 17:39:08 -0700 (MST) Subject: [Rxtx] Problem on 'Trouble Shooting' wiki page. Message-ID: It has been pointed out that the rxtx wiki page says usermod -G may be used to update the group a user is in. http://rxtx.qbang.org/wiki/index.php/Trouble_shooting The corrected text now says to use usermod -aG to add the user to a group in addition to their current group(s). The previous -G version would replace the users current groups with the new group. Replacing group information can cause significant problems for end users. If you have information based upon the wiki, please update your content. Thanks, -- Trent Jarvi tjarvi at qbang.org From andrew.paverd at rorotika.com Thu Jan 29 02:15:35 2009 From: andrew.paverd at rorotika.com (Andrew Paverd) Date: Thu, 29 Jan 2009 11:15:35 +0200 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Thanks for the advice Trent - I was originally using the precompiled librxtxSerial.so. I've subsequently compiled rxtx for Solaris (using gcc) and after copying the libgcc_s.so file to my .../jre/lib/sparc directory, the library loads. However, it does not detect any ports. When I call the getComPortIdentifiers() nothing is returned and I can't connect to any port. Sun's javax.comm package detects and can connect to all the ports. This is the same as when I tried the 2.2pre1 library. Are there any extra steps that must be taken to detect ports on Solaris? (user is member of uucp group) Thanks, Andrew From tristan.dyer at cgi.com Thu Jan 29 05:57:25 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 29 Jan 2009 07:57:25 -0500 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D030BE152@MTL-MSG-02.cgiclients.com> Andrew, I had the same problem, but before I got too far the scope of my project changed, and I don't have to support Solaris anymore.. I was getting a weird error, file does not exist but should, or something like that. The project ended before I figured out why. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Andrew Paverd Sent: January 29, 2009 5:16 AM To: 'Trent Jarvi' Cc: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working on Solaris Thanks for the advice Trent - I was originally using the precompiled librxtxSerial.so. I've subsequently compiled rxtx for Solaris (using gcc) and after copying the libgcc_s.so file to my .../jre/lib/sparc directory, the library loads. However, it does not detect any ports. When I call the getComPortIdentifiers() nothing is returned and I can't connect to any port. Sun's javax.comm package detects and can connect to all the ports. This is the same as when I tried the 2.2pre1 library. Are there any extra steps that must be taken to detect ports on Solaris? (user is member of uucp group) Thanks, Andrew _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Martin.Oberhuber at windriver.com Thu Jan 29 06:15:01 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:15:01 +0100 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2326@ism-mail03.corp.ad.wrs.com> Hi Andrew & Paverd, the trick of compiling with gcc on Solaris such that the libgcc_s.so library is not needed at runtime is that gcc itself must be configured and compiled with special options: cd gcc-src ./configure --disable-shared make Using that specially compiled gcc, you can then build the RXTX library: setenv PATH $HOME/my-gcc/bin:$PATH cd rxtx mkdir build-solaris && cd build-solaris ../configure --disable-lockfiles make For more details, see the original bug and its attachments: http://bugzilla.qbang.org/show_bug.cgi?id=73 An rxtx-2.1-7r2 build for Solaris without libgcc_s dependency is available from the Eclipse packages at http://rxtx.qbang.org/eclipse/downloads/ Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Andrew Paverd Sent: Mittwoch, 28. J?nner 2009 11:15 To: rxtx at qbang.org Subject: [Rxtx] RXTX not working on Solaris Hi all, I am attempting to use RXTX on a Sun SPARC server running Solaris. I have tried the binaries from both the latest release (2.1-7) and the pre-release (2.2pre1). The 2.1-7 driver gives the following error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: fatal: libgcc_s.so.1: open failed: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)" I'm not sure what this "libgcc_s.so.1" file does in terms of RXTX but its absence is preventing the application from running. With the 2.2pre1 binary, the application loads without any issue but does not detect any comm-ports. I know that there are multiple ports available because when using the Sun javax.comm library for Solaris SPARC, the ports are all correctly discovered and the application can read from and write to them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in the 2.2 release. Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if so, how did you do it (which versions did you use etc.)? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090129/d6d73f3e/attachment-0009.html From Martin.Oberhuber at windriver.com Thu Jan 29 06:16:38 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:16:38 +0100 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E232A@ism-mail03.corp.ad.wrs.com> Hi Andrew, one thing I did notice on Solaris was that after closing a port, the Solaris Kernel seems to have some timeout before it can be re-opened. So, when you try it again, make sure that no other application hogs the port or has been hogging it shortly before. It may make sense to try a few times. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Andrew Paverd > Sent: Donnerstag, 29. J?nner 2009 10:16 > To: 'Trent Jarvi' > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX not working on Solaris > > Thanks for the advice Trent - I was originally using the > precompiled librxtxSerial.so. I've subsequently compiled rxtx > for Solaris (using gcc) and after copying the libgcc_s.so > file to my .../jre/lib/sparc directory, the library loads. > > However, it does not detect any ports. When I call the > getComPortIdentifiers() nothing is returned and I can't > connect to any port. Sun's javax.comm package detects and can > connect to all the ports. This is the same as when I tried > the 2.2pre1 library. > > Are there any extra steps that must be taken to detect ports > on Solaris? (user is member of uucp group) > > Thanks, > > > Andrew > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From Martin.Oberhuber at windriver.com Thu Jan 29 06:24:05 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:24:05 +0100 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2335@ism-mail03.corp.ad.wrs.com> Hi Greg, sorry for the late response (just catching up on E-Mails). I do not plan to create any Eclipse bundles before rxtx-2.2 is released. Creating the packages is a bit of an effort, which I'd rather postpone until the release, and then do it only once. In the meantime, if you need it for testing, I think it should be easy to take the existing Eclipse bundles/fragments and simply replace any new DLL's / so's in them, plus use WinZIP to replace the .class files in the Java bundle. For Eclipse, it will still look like rxtx-2.1-7 but in reality it will be your own latest build. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Trent Jarvi > Sent: Sonntag, 04. J?nner 2009 20:42 > To: Greg Johnson > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] [Announce] RXTX 2.2pre1 is available. > > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse > packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be > a popular > spam abuse page. I'll put a license and download link on there. All > other pages are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > > > Hi Trent, > > The download link on rxtx.org > (http://users.frii.com/jarvi/rxtx/) loops back > > to rxtx.org, and the wiki doesn't seem to have a link (top > level at least) to > > download. I think Martin had been generating > (fantastically useful) Eclipse > > bundles, as well - are these available for 2.2pre1 also? > > > > Many thanks to everyone for their work - rxtx is an > essential part of our > > product, and we have been keenly awaiting this release. > > > > Regards, > > greg > > > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > > > >> > >> The binaries, source and pending wiki move are now announced on > >> http://www.rxtx.org. After this has baked, we can put > the web install in. > >> > >> Changes in rxtx 2.2 (If I missed something let me know): > >> ... snip ... > >> > >> -- > >> Trent Jarvi > >> tjarvi at qbang.org_______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > -- > > Greg Johnson, PhD > > Director of Engineering > > http://www.rbr-global.com > > greg.johnson at rbr-global.com > > +1.613.233.1621 (GMT-5) office > > > > > > See us at: Ocean Business 2009, Southampton, England, March > 31 - April 1, > > 2009 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From Martin.Oberhuber at windriver.com Thu Jan 29 06:32:57 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:32:57 +0100 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> Hi Tristan, > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); I think that this code is wrong. User code must not call the RXTXCommDriver constructor, since you cannot initialize it properly. What you can do to announce previously unknown port names is this: System.setProperty("gnu.io.rxtx.SerialPorts","/dev/term/a"); before you first access any RXTX function. For details, see the code in RXTXCommDriver#registerSpecifiedPorts() > What is the output of System.getProperty("os.name") on OpenSolaris? I didn't see any response of yours to this question from Trent. What does OpenSolaris output? Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Trent Jarvi > Sent: Mittwoch, 31. Dezember 2008 20:04 > To: Dyer, Tristan > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX for OpenSolaris 2008.11 > > > > On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > > > > Hi, > > > > I have tried building the rxtx library for OpenSolaris 2008.11. > > > > It seemed to build fine without errors, however code such as > > > > ????? java.util.Enumeration portList > > ???????? = CommPortIdentifier.getPortIdentifiers(); > > ????? boolean found = false; > > ????? while (portList.hasMoreElements()) { > > ???????? portId = (CommPortIdentifier) portList.nextElement(); > > ???????? System.out.println(" " + portId.getName()); > > ???????? if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > > ?????????? ???? ?? System.out.println("found"); > > ?????????????? found = true; > > ?????????????? break; > > ??????????? } > > ???????? } > > ????? } > > Will output nothing. > > > > Or rather it seems as if there are no ports found by RXTX. > This code works > > on Ubuntu8.04 and winXP. > > > > If I Add the port manually and then try and open the port > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > > ????? try{ > > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > > ????? } > > ????? catch(Exception e){ > > ??? ??? ? System.out.println("NoSuchPortException"); > > ??? ??? ? //ignore > > ????? } > > ????? try { > > ??????? ???????? System.out.println("opening port"); > > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > > WAIT_TO_OPEN); > > ??????????? connected = true; > > ??????????? System.out.println("Connected to port " + > portId.getName()); > > ???????? } catch (PortInUseException p) { > > ??????????? if (DEBUG) { > > ?????????????? System.err.println(p); > > ??????????? } > > ??????????? port = null; > > ??????????? portId = null; > > ??????????? System.out.println("PortInUseException"); > > ??????????? p.printStackTrace(); > > ???????? } > > > > I will get the following, but not the NoSuchPortException. > > > > java.lang.reflect.InvocationTargetException > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Caused by: java.lang.NullPointerException > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:296) > > > > ??????? ... 7 more > > > > > > As well as > > > > java.lang.NullPointerException > > ??????? at > gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > > ??????? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > > ??????? at > > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:255) > > > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > > > Did I build it wrong? Or is there a problem with > OpenSolaris that will > > prevent this from working? Or am I missing something > incredibly simple? > > > > As well OpenSolaris is running inside a VM with COM1 mapped to > > COM1(VirtualBox) which I believe maps it to /dev/term/a > > > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > > > > > Hi Tristan? > > What is the output of System.getProperty("os.name") on > OpenSolaris? We > have logic like the following in RXTX to handle platform specific > information: > > if ( osName.equals("Solaris") || osName.equals("SunOS")) > > Which may not be getting hit. The result if you will never > call private > void checkSolaris(String PortName, int PortType). > > It could also result in Solaris specific settings not being > set in the > Makefile. > > > The os.name is displayed when you run the configure script. > > -- > Trent Jarvi > tjarvi at qbang.org > From Martin.Oberhuber at windriver.com Thu Jan 29 06:38:20 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:38:20 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] how do you dynamically reload native libraries? In-Reply-To: References: Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2341@ism-mail03.corp.ad.wrs.com> Hi Douglas, Eclipse / OSGi may be doing what you want. It does say that multiple versions of a lib can co-exist at the same time, when the MANIFEST.MF doesn't specify a lib as a singleton. I'm not sure though if or how that would work with native libs. Eclipse bundles for RXTX-2.1-7r2 are available on http://rxtx.qbang.org/eclipse/downloads/ You could build RXTX-2.2pre and then manually create those Eclipse bundles just by adding the MANIFEST.MF to the JAR with the version number exchanged. Then you should be able to try it out. If you do, let me know how it goes... Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Samstag, 27. Dezember 2008 15:00 > To: rxtx at qbang.org; lyon at docjava.com > Subject: [Suspected Spam][Blocked Sender][Rxtx] how do you > dynamically reload native libraries? > > Hi All, > I am trying to test multiple versions of the RXTX native libraries > in a single JVM. > > Each RXTX library instance can share a single virtual machine, but > must have an isolated context class loader. > A context class loader maps a thread to specific classes and > resources. > When the thread dies, the classes and resources are freed. > > Is there some way to have multiple context class loaders that can > load different native method > library implementations? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Thu Jan 29 07:50:05 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 29 Jan 2009 09:50:05 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D030BE22B@MTL-MSG-02.cgiclients.com> Sorry, I had sent it to Trent alone. It outputs "SunOS" Also I had only added that line as a test to see if explicitly adding the port would make a difference, it didn't. My project scope has been reduced so I don't need to support solaris anymore, but I will return to the problem when things slow down. I do remember that the error that was being reported by the native code was "2" which I believe maps to "ENOENT No such file or directory A file name is specified and the file should exist but doesn't, or one of the directories in a path name does not exist." I didn't get much farther. Thanks, -- Tristan Dyer -----Original Message----- From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] Sent: January 29, 2009 9:33 AM To: Trent Jarvi; Dyer, Tristan Cc: rxtx at qbang.org Subject: RE: [Rxtx] RXTX for OpenSolaris 2008.11 Hi Tristan, > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); I think that this code is wrong. User code must not call the RXTXCommDriver constructor, since you cannot initialize it properly. What you can do to announce previously unknown port names is this: System.setProperty("gnu.io.rxtx.SerialPorts","/dev/term/a"); before you first access any RXTX function. For details, see the code in RXTXCommDriver#registerSpecifiedPorts() > What is the output of System.getProperty("os.name") on OpenSolaris? I didn't see any response of yours to this question from Trent. What does OpenSolaris output? Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Mittwoch, 31. Dezember 2008 20:04 > To: Dyer, Tristan > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX for OpenSolaris 2008.11 > > > > On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > > > > Hi, > > > > I have tried building the rxtx library for OpenSolaris 2008.11. > > > > It seemed to build fine without errors, however code such as > > > > ????? java.util.Enumeration portList > > ???????? = CommPortIdentifier.getPortIdentifiers(); > > ????? boolean found = false; > > ????? while (portList.hasMoreElements()) { > > ???????? portId = (CommPortIdentifier) portList.nextElement(); > > ???????? System.out.println(" " + portId.getName()); > > ???????? if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > > ?????????? ???? ?? System.out.println("found"); > > ?????????????? found = true; > > ?????????????? break; > > ??????????? } > > ???????? } > > ????? } > > Will output nothing. > > > > Or rather it seems as if there are no ports found by RXTX. > This code works > > on Ubuntu8.04 and winXP. > > > > If I Add the port manually and then try and open the port > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > > ????? try{ > > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > > ????? } > > ????? catch(Exception e){ > > ??? ??? ? System.out.println("NoSuchPortException"); > > ??? ??? ? //ignore > > ????? } > > ????? try { > > ??????? ???????? System.out.println("opening port"); > > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > > WAIT_TO_OPEN); > > ??????????? connected = true; > > ??????????? System.out.println("Connected to port " + > portId.getName()); > > ???????? } catch (PortInUseException p) { > > ??????????? if (DEBUG) { > > ?????????????? System.err.println(p); > > ??????????? } > > ??????????? port = null; > > ??????????? portId = null; > > ??????????? System.out.println("PortInUseException"); > > ??????????? p.printStackTrace(); > > ???????? } > > > > I will get the following, but not the NoSuchPortException. > > > > java.lang.reflect.InvocationTargetException > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Caused by: java.lang.NullPointerException > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:296) > > > > ??????? ... 7 more > > > > > > As well as > > > > java.lang.NullPointerException > > ??????? at > gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > > ??????? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > > ??????? at > > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:255) > > > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > > > Did I build it wrong? Or is there a problem with > OpenSolaris that will > > prevent this from working? Or am I missing something > incredibly simple? > > > > As well OpenSolaris is running inside a VM with COM1 mapped to > > COM1(VirtualBox) which I believe maps it to /dev/term/a > > > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > > > > > Hi Tristan > > What is the output of System.getProperty("os.name") on OpenSolaris? > We have logic like the following in RXTX to handle platform specific > information: > > if ( osName.equals("Solaris") || osName.equals("SunOS")) > > Which may not be getting hit. The result if you will never call > private void checkSolaris(String PortName, int PortType). > > It could also result in Solaris specific settings not being set in the > Makefile. > > > The os.name is displayed when you run the configure script. > > -- > Trent Jarvi > tjarvi at qbang.org > From hho at bibliotheca.dk Thu Jan 29 08:00:49 2009 From: hho at bibliotheca.dk (Hans Hvelplund Odborg) Date: Thu, 29 Jan 2009 16:00:49 +0100 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: I know that there arent any guarantees, but could someone involved with the development of RxTx please guesstimate when 2.2 final will be released? I'm not familiar with the pre-release history of 2.1-7 but I read that there was 20 pre-relases of 2.1-7 so I guess (based on current pre-release rate) that 2.2 may easily be more than 6 months away? Thanks Med venlig hilsen / Best regards / Med v?nliga h?lsningar Hans Hvelplund Odborg BIBLIOTHECA A/S Vallensb?kvej 22A, 2. TH ? 2605 Br?ndby ? Denmark Mob.: +45 30235940 Tel.: +45 70271008 Fax: +45 70271009 hho at bibliotheca.dk www.bibliotheca.dk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: 4. januar 2009 20:15 To: rxtx at qbang.org Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Jan 29 08:33:33 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 29 Jan 2009 08:33:33 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: Projects tend to evolve from an adhoc release process to predictable releases when enough projects demand it (and help make it happen). "Its ready when Its ready" is a typical answer prior to the above. I lik$ to say "The beatings will continue until moral improves." I expect moral to improve in the next six months at most. This release i$ resolving 3 larger issues. 1) syncing of some large efforts to the same source code. 2) incorperating all community patches 3) building the binaries correctly. This does not include fixing everyones bugs. But it does include making sure the fixes get in if they are provided. Given the above, I don't expect this to be as drawn out as 2.1-7pre*. We may have several stable releases during the same period. On Thu, 29 Jan 2009, Hans Hvelplund Odborg wrote: > I know that there arent any guarantees, but could someone involved with the > development of RxTx please guesstimate when 2.2 final will be released? > > I'm not familiar with the pre-release history of 2.1-7 but I read that there > was 20 pre-relases of 2.1-7 so I guess (based on current pre-release rate) > that 2.2 may easily be more than 6 months away? > > Thanks > > Med venlig hilsen / Best regards / Med v?nliga h?lsningar > Hans Hvelplund Odborg > > BIBLIOTHECA A/S > Vallensb?kvej 22A, 2. TH ? 2605 Br?ndby ? Denmark > Mob.: +45 30235940 > Tel.: +45 70271008 > Fax: +45 70271009 > hho at bibliotheca.dk > www.bibliotheca.dk > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: 4. januar 2009 20:15 > To: rxtx at qbang.org > Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. > > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org. After this has baked, we can put the web install > in. > > Changes in rxtx 2.2 (If I missed something let me know): > > threshold fix > Alexandre Rusev > http://bugzilla.qbang.org/show_bug.cgi?id=85 > > RXTX close deadlocks in REXTXPort.finalize > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=53 > > Add ACM serial devices to all known ports. > Duncan Pierce > http://bugzilla.qbang.org/show_bug.cgi?id=51 > > Concurrency fixes for SMP/multicore systems > U. George > http://bugzilla.qbang.org/show_bug.cgi?id=100 > > Fixes for MAC systems with no drivers installed. > 1.5 stop bit fix > > Enable universal library builds for Mac OS X > Andre-John Mas ajmas at sympatico.ca > > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > Do not remove and ignore interrupts. > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=45 > > find ports which were added after program startup on Mac > OS X. > Martin Oberhuber > http://bugzilla.qbang.org/show_bug.cgi?id=48 > > Clean up CommPort Ownership code, avoid possible deadlocks, > fix lost commport ownership events. > Martin Oberhuber > http://bugzilla.qbang.org/show_bug.cgi?id=83 > > rxtx does not compile against JDK-1.6 > Neboj?a > http://bugzilla.qbang.org/show_bug.cgi?id=84 > > configure script failed at line UTS_RELEASE > megov > http://bugzilla.qbang.org/show_bug.cgi?id=80 > > code cleanup patch (extra ';' creates bug for if statements > + new String() calls removed) > Xavier Le Vourch > http://bugzilla.qbang.org/show_bug.cgi?id=77 > > Wont compile on linux ppc with glibc 2.5 - no sys/io.h > Brian Johnson > http://bugzilla.qbang.org/show_bug.cgi?id=72 > > rxtx overwrites System properties > Andrew Gillett > Nektarios K. Papadopoulos > Neboj?a > http://bugzilla.qbang.org/show_bug.cgi?id=64 > > Solaris ACM port support > Dave Cleal > http://bugzilla.qbang.org/show_bug.cgi?id=59 > > Setting of non-standard baud rate fails. > Andrew Prunicki > http://bugzilla.qbang.org/show_bug.cgi?id=58 > > RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=50 > > JavaDoc fixes > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > From mmornati at byte-code.com Fri Jan 30 02:32:44 2009 From: mmornati at byte-code.com (Marco Mornati) Date: Fri, 30 Jan 2009 10:32:44 +0100 Subject: [Rxtx] Linux Library Message-ID: <1233307964.4046.19.camel@localhost.localdomain> Hello, I made a little Applet added to my web application to support BarCode printer (on serial port). All is autoconfigured during applet init: dll/so are copied on /tmp folder on local computer and with System.load(/tmp/library.so/dll) I'm adding the library to classpath. On windows all works correctly and I'm able to print (jar is signed... without signing it there's no way to communicate with serial port). I've just a little problem on linux. It seams that library is not added to classpath, because when I try to connect with com port, applet says that is impossible to find .so. Any idea on what could be the problem? Just for information I post here my code: Container content = getContentPane(); content.setBackground(Color.white); content.setLayout(new FlowLayout()); String libraryFile = ""; String libraryName = ""; if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")) { libraryName = DLL_SERIAL_NAME; libraryFile = System.getProperty("java.io.tmpdir") + DLL_SERIAL_NAME; } else if (System.getProperty("os.name").toUpperCase().contains("LINUX")) { if (System.getProperty("os.arch").contains("i386")) { libraryName = SO_SERIAL_NAME_32; } else { libraryName = SO_SERIAL_NAME_64; } char fileSeparator = System.getProperty("file.separator").charAt(0); libraryFile = System.getProperty("java.io.tmpdir") + fileSeparator + SO_SERIAL_NAME; } System.out.println("Library File: " + libraryFile); /** * Copying DLL to java bin dir (if it's not already present) */ if (!verifyLibraryExistence(libraryFile)) { System.out.println("Library file does not exist"); copyResourceFromJar(libraryFile, libraryName); } try { System.load(libraryFile); } catch (Exception e) { System.out.println("Cannot load " + libraryFile + " you have to install it manually!!"); } try { content.add(new JLabel("Initializing Applet!")); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); content.add(new JLabel("List Porte: " + portList)); if (portList == null) { content.add(new JLabel("No Serial Port Found!!")); } while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL)) { System.out.println("Porta Trovata: " + portId.getName()); content.add(new JLabel("Porta Trovata: " + portId.getName())); } break; } } catch (Exception e) { content.add(new JLabel("Exception: " + e)); e.printStackTrace(); } Thanks a lot Bye Marco -- Dott. Ing. Mornati Marco Byte-Code s.r.l via Antonio Cechov, 1 San Giuliano Milanese (MI) E-Mail: mmornati at byte-code.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090130/c176573f/attachment-0008.bin From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0034.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0034.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0032.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0032.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the classes and is able to run the native code associated with it -- in the mailing list archives somewhere, there was discussion about using it also through Java Web Start. I think there are directions on the Wiki as well. The only thing I can say about it is that you should try to isolate the part that does the serial stuff and test it heavily to avoid bad interactions with your applet. Best, Johnny From mailing.list at supernovasoftware.com Tue Jan 6 15:38:13 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 16:38:13 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963D502.8060705@trustcommerce.com> References: <4963C18D.9010603@supernovasoftware.com> <4963D502.8060705@trustcommerce.com> Message-ID: <4963DD55.70202@supernovasoftware.com> Anyone here willing to provide some assistance? As a consultant if necessary. Johnny Luong wrote: > Jason Long wrote: > >> I have to integrate a type of measuring device directly into my web >> based inventory system. >> It currently runs remotely on JBoss and JDK 1.6. >> >> I need to be able for the user to attach the exported measurement data >> directly to places in my application. >> >> The following are the manufacturer directions. >> >> 1. set the hosts computer's serial port to 2400 baud, 8-N-1 >> 2. connect device to host computer with a DB-9 connector >> 3. the host computer should send the ASCII character "1" (31h) or "2" >> (32h) to the device to begin data transmission. >> 4. after receiving this signal the device will transmit the data and >> the string "ENDENDEND". >> >> That is it. Sounds very simple to me. Is this actually going to be a >> headache? >> > > It can be. > > >> *Does this look like something that I would use RxTx for?* >> > > You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/ae3d7460/attachment-0032.html From opensource at cloudhopper.net Tue Jan 6 16:12:42 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Tue, 6 Jan 2009 15:12:42 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> Message-ID: <1104033022.3081231283562380.JavaMail.root@zimbra-01.cloudhopper.lan> Tim, I had the exact same issue as well a few months ago. Mine was a little more strange in that the event firing did work, then stopped working suddenly. I moved the same code over to a different server and it worked again. I could never get the events to fire properly on the previous server. BTW - same OS, same Dell hardware model. I'm not sure what changed. Minicom always worked on that same port when RXTX would fail. I ended up giving up with events as I didn't have enough time to dig into the RXTX source code. I moved to just grabbing the Outputstream directly and using my own thread to read bytes from the serial connection. That setup has worked beautifully for me as a workaround. If you need help with sample code, I can probably grab some from my wrapper library. Otherwise, just treat the serial connection like a socket. The read() method via RXTX blocks until bytes are available. Joe Lauer Cloudhopper www.cloudhopper.net joe.lauer at cloudhopper.net ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Tuesday, January 6, 2009 1:21:42 PM GMT -08:00 US/Canada Pacific Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 16:42:25 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 17:42:25 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4963EC61.1040508@supernovasoftware.com> The user would not have to do the setup. I would even consider installing JBoss on the laptop that will be kept in the users truck. However the less I have to install on that machine the better. There is already a piece of software that extracts the data from the device, but is has very poor organization and requires a lot of information to be input to keep track of the material type and other data to be input by the user which I already have in my system. It is also written in FoxPro. Yuck. It would only be used in a warehouse type atmosphere where the material only needs to be measured when is is loaded to be sold. The steps are as follows. 1. Truck comes into the facility to pick up material.(My software will be controlling this entire process) 2. Material is measured and a list of 100-300 measurements must be uploaded into my system and attached to this truck. 3. The truck proceed to the checkout and all paperwork is generated and ready to go. The device allows no labeling of the data. It has 25 jobs and the user selects the job and then that is what data is sent when I ask the device for data. What I need is an easy way for the user to attach to a specific place in my application. For example given a list of trucks choose the proper one and say request data from device. The data would then be uploaded add attached there. The application is entirely web based, runs in Firefox, and the back end is based on JBoss. Current solution is to use the FoxPro application to dump the data an the use a web browser upload to attach the data. This is prone to error and require the user to select the correct file, ect. I am hoping to simplify this in some way. *What about exposing the serial port as some kind of virtual network interface so that a remove machine could contact and pull the data? This might be better as my remote server could actually request the data across the internet and attach it all by itself.* Joe Lauer wrote: > Hey Jason, > > I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. > > Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly > > I'd be glad to discuss further if interested. > > Joe Lauer > Cloudhopper > www.cloudhopper.net > joe.lauer at cloudhopper.net > > > ----- Original Message ----- > From: "Jason Long" > To: "Johnny Luong" > Cc: rxtx at qbang.org > Sent: Tuesday, January 6, 2009 2:38:13 PM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Using RxTx from and applet > > > Anyone here willing to provide some assistance? As a consultant if necessary. > > Johnny Luong wrote: > > Jason Long wrote: > > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit the data and > the string "ENDENDEND". > > That is it. Sounds very simple to me. Is this actually going to be a > headache? It can be. > > *Does this look like something that I would use RxTx for?* You can use RxTx via an applet as long as the JRE knows about the > classes and is able to run the native code associated with it -- in the > mailing list archives somewhere, there was discussion about using it > also through Java Web Start. I think there are directions on the Wiki > as well. The only thing I can say about it is that you should try to > isolate the part that does the serial stuff and test it heavily to avoid > bad interactions with your applet. > > Best, > Johnny > _______________________________________________ > Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/6bf47211/attachment-0032.html From tjarvi at qbang.org Tue Jan 6 18:49:00 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 18:49:00 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: On Tue, 6 Jan 2009, Tim Alberts wrote: > Hello again everyone, happy New Year. > > I saw that Trent released 2.2pre...and figured it was time for me to make the > leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully > coming soon, web install capabilities. In making this leap, everything I've > read says that the conversion is as simple as changing imports from > javax.comm.* to gnu.io.* which is what I did. > > The result is one major problem in that I am not receiving anything from the > input stream. I use event based communications and noticed it fires about > 150-200 times per second. This is confusing because it happens regardless if > the device I'm trying to talk to is not transmitting at all, or transmitting > about 20 characters once per second. It seems that under the hood, the Sun > javax.comm and RXTX gnu.io are completely different. I have repeated this > with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) > and Sun Java 1.5.0_16. > > Additionally, it appears that the hardware handshaking is handled different > between javax.comm and gnu.io. I'll have to dig out the port analyzer to be > precise on this. The device I talk to (an RF modem) can use a simple 3 wire > TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, > CD. With the gnu.io package, if I don't use hardware handshaking (flow > control == none), the device does not appear to get enabled. I'm guessing > the DTR from the DTE (computer) is defaulting the wrong way? If I enable > CTS/RTS, the modem appears to be enabled, it transmits and receives with the > exception of the above problem, the application never gets data from gnu.io. > If anyone knows what the differences or subtleties I should be aware of in > handling these serial port lines with the gnu.io package, your help is > appreciated. > > On the plus side, gnu.io seems to have found (almost) all of my serial ports > and serial devices. I can also see that I am transmitting data (on the port > I've tested with). > > So my first question is, is there any documentation that details the > differences between Sun javax.comm and RXTX gnu.io? > > Second question, is the gnu.io in event mode supposed to fire 150-200 > SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of > a problem? > > Any help anyone can offer beyond these questions would be outstanding. Thank > you. > > Hi Tim, I'm not aware of any documentation that details the differences between Sun javax.comm and RXTX gnu.io. Starting a page on the wiki sounds reasonable. In most cases, a noticable difference between the APIs should be a bug in one of them. Default behavior that isn't documented, I'd rather just document as being different if specifying what the user wants solves the problem. I've never actually used Sun's API. I did try to follow what the javadocs described. RXTX actually predates CommAPI slightly so they do indeed have very different histories and implementations. The intent is to send DATA_AVAILABLE when new data is available. It appears you have revealed a bug thats been there a long time. I'll have to dig into this again. I know on Unix like systems, the event loop underneath kicks lose while data is available. Perhaps what Sun did was read the data into their buffer as soon as the data became available which prevented sending more events. I've avoided using buffering in RXTX as there are already buffers available in the JRE that have been used more than RXTX. With DTR, I know we have tried to avoid asserting pins on open when possible. For some equipment, you have to restart it if the pins are asserted. Does setDTR() resolve the problem? I'll try to take a look at the events. In my use, I've always read all data available when the event occurs. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 6 19:31:16 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 6 Jan 2009 19:31:16 -0700 (MST) Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: On Tue, 6 Jan 2009, Johannes Meyer wrote: > Hello, > > I'm implementing a software for a thin client with Linux and Java. > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > "/dev/tts/X". > > RXTX doesn't find these ports. What can I do? > I'm using RXTX 2.1-7. > > Kind regards an sorry for my englisch, > Odd. Is this a kernel.org serial driver? You can override how rxtx enumerates to get the device working: http://rxtx.qbang.org/wiki/index.php/Trouble_shooting#How_does_rxtx_detect_ports.3F__Can_I_override_it.3F If you want to modify rxtx, I'd look at RXTXCommDriver.java and the code that does Solaris enumeration. You can post them to the wiki or bugzilla or here if you think others would use them. -- Trent Jarvi tjarvi at qbang.org From zamek at vili.pmmf.hu Wed Jan 7 01:11:51 2009 From: zamek at vili.pmmf.hu (zamek) Date: Wed, 7 Jan 2009 09:11:51 +0100 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <200901070911.51255.zamek@vili.pmmf.hu> hi, On Wednesday 07 January 2009 03.31.16 Trent Jarvi wrote: > On Tue, 6 Jan 2009, Johannes Meyer wrote: > > Hello, > > > > I'm implementing a software for a thin client with Linux and Java. > > The problem is, that the serial ports aren't under "/dev/ttySX" but unter > > "/dev/tts/X". > > > > RXTX doesn't find these ports. What can I do? > > I'm using RXTX 2.1-7. > > > > Kind regards an sorry for my englisch, I usually make a soft link to device named /dev/ttyXXX. In Linux after cca. 2.6.20+ using udev to manage device subsystem. Here is a sample from my experience in file /etc/udev/rules.d/55-rfcomm.rules KERNEL=="rfcomm[0-9]*", NAME="%k", SYMLINK+="tty%k" There is a documentation to writing udev rules: http://www.reactivated.net/writing_udev_rules.html -- ?thx, ?---------------------------------- ?Zoltan Zidarics programmer ?PTE-PMMFK H-7621 Pecs, Boszorkany u. 2. Hungary ?E-Mail: zamek at vili.pmmf.hu ?---------------------------------- From mailing.list at supernovasoftware.com Wed Jan 7 09:28:48 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 10:28:48 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <21922-63246@sneakemail.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> Message-ID: <4964D840.6020101@supernovasoftware.com> I am not sure I am going to fight the applet as I have no experience with them what so ever. I am leaning towards exposing the device on the network by installing a stripped down JBoss or something simpler. *Can anyone recommend the easiest way to expose a serial port as a web service or networked device? Or tell me why this is a bad idea?* iqzw2r602 at sneakemail.com wrote: > I wrote Webstart capabilities for RXTX. I submitted a patch that Trent > is about to integrate; I guess it can't be long any more now that > 2.2pre is out there. > > I'm not entirely sure if this would work from within an applet (the > sandbox rules are quite strict on them if I remember correctly), but > turning an applet into an application that is webstartable is very > easy, and gives the user a similar experience. > > If your need is really urgent I can provide you with my locally > patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). > > Cheers, > > Uwe > > > On Wed, Jan 7, 2009 at 10:42 AM, Jason Long > mailing.list-at-supernovasoftware.com > |rxtx.org > mailing list| <... > wrote: > > The user would not have to do the setup. I would even consider > installing JBoss on the laptop that will be kept in the users > truck. However the less I have to install on that machine the better. > > There is already a piece of software that extracts the data from > the device, but is has very poor organization and requires a lot > of information to be input to keep track of the material type and > other data to be input by the user which I already have in my > system. It is also written in FoxPro. Yuck. > > It would only be used in a warehouse type atmosphere where the > material only needs to be measured when is is loaded to be sold. > > The steps are as follows. > > 1. Truck comes into the facility to pick up material.(My software > will be controlling this entire process) > 2. Material is measured and a list of 100-300 measurements must > be uploaded into my system and attached to this truck. > 3. The truck proceed to the checkout and all paperwork is > generated and ready to go. > > The device allows no labeling of the data. It has 25 jobs and the > user selects the job and then that is what data is sent when I ask > the device for data. > > What I need is an easy way for the user to attach to a specific > place in my application. For example given a list of trucks > choose the proper one and say request data from device. The data > would then be uploaded add attached there. > > The application is entirely web based, runs in Firefox, and the > back end is based on JBoss. > > Current solution is to use the FoxPro application to dump the data > an the use a web browser upload to attach the data. This is prone > to error and require the user to select the correct file, ect. I > am hoping to simplify this in some way. > > *What about exposing the serial port as some kind of virtual > network interface so that a remove machine could contact and pull > the data? This might be better as my remote server could actually > request the data across the internet and attach it all by itself.* > > Joe Lauer wrote: >> Hey Jason, >> >> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >> >> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >> >> I'd be glad to discuss further if interested. >> >> Joe Lauer >> Cloudhopper >> www.cloudhopper.net >> joe.lauer at cloudhopper.net >> ----- Original Message ----- From: "Jason Long" >> >> To: "Johnny Luong" >> >> Cc: rxtx at qbang.org >> Sent: Tuesday, January 6, 2009 2:38:13 PM >> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >> and applet Anyone here willing to provide some assistance? As a >> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >> have to integrate a type of measuring device directly into my web >> based inventory system. It currently runs remotely on JBoss and >> JDK 1.6. I need to be able for the user to attach the exported >> measurement data directly to places in my application. The >> following are the manufacturer directions. 1. set the hosts >> computer's serial port to 2400 baud, 8-N-1 2. connect device to >> host computer with a DB-9 connector 3. the host computer should >> send the ASCII character "1" (31h) or "2" (32h) to the device to >> begin data transmission. 4. after receiving this signal the >> device will transmit the data and the string "ENDENDEND". That is >> it. Sounds very simple to me. Is this actually going to be a >> headache? It can be. *Does this look like something that I would >> use RxTx for?* You can use RxTx via an applet as long as the JRE >> knows about the classes and is able to run the native code >> associated with it -- in the mailing list archives somewhere, >> there was discussion about using it also through Java Web Start. >> I think there are directions on the Wiki as well. The only thing >> I can say about it is that you should try to isolate the part >> that does the serial stuff and test it heavily to avoid bad >> interactions with your applet. Best, Johnny >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> _______________________________________________ Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090107/93a3ef3e/attachment-0031.html From jredman at ergotech.com Wed Jan 7 11:59:26 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 11:59:26 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964D840.6020101@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> Message-ID: <4964FB8E.6060401@ergotech.com> Jason, There are a host of ways to do this and it depends on your needs and existing system. Seems that polling the serial device from a Servlet or EJB and updating one of your existing web pages would be one way to do this. You may have to figure out how to update the web page if the data from the serial device is asynchronous. You might want to consider a script to update the html page. With a script or an applet you could dynamically poll the device, but I don't know if you need to do this. You might want to start by making sure that you can build code to talk to the serial device. Once you have an understanding of the device, you might get some architectural inspiration. RXTX may not be the best list if you decide to go with web services. Jim Jason Long wrote: > I am not sure I am going to fight the applet as I have no experience > with them what so ever. I am leaning towards exposing the device on the > network by installing a stripped down JBoss or something simpler. > > *Can anyone recommend the easiest way to expose a serial port as a web > service or networked device? Or tell me why this is a bad idea?* > > iqzw2r602 at sneakemail.com wrote: >> I wrote Webstart capabilities for RXTX. I submitted a patch that Trent >> is about to integrate; I guess it can't be long any more now that >> 2.2pre is out there. >> >> I'm not entirely sure if this would work from within an applet (the >> sandbox rules are quite strict on them if I remember correctly), but >> turning an applet into an application that is webstartable is very >> easy, and gives the user a similar experience. >> >> If your need is really urgent I can provide you with my locally >> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >> >> Cheers, >> >> Uwe >> >> >> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >> mailing.list-at-supernovasoftware.com >> |rxtx.org >> mailing list| <... > wrote: >> >> The user would not have to do the setup. I would even consider >> installing JBoss on the laptop that will be kept in the users >> truck. However the less I have to install on that machine the better. >> >> There is already a piece of software that extracts the data from >> the device, but is has very poor organization and requires a lot >> of information to be input to keep track of the material type and >> other data to be input by the user which I already have in my >> system. It is also written in FoxPro. Yuck. >> >> It would only be used in a warehouse type atmosphere where the >> material only needs to be measured when is is loaded to be sold. >> >> The steps are as follows. >> >> 1. Truck comes into the facility to pick up material.(My software >> will be controlling this entire process) >> 2. Material is measured and a list of 100-300 measurements must >> be uploaded into my system and attached to this truck. >> 3. The truck proceed to the checkout and all paperwork is >> generated and ready to go. >> >> The device allows no labeling of the data. It has 25 jobs and the >> user selects the job and then that is what data is sent when I ask >> the device for data. >> >> What I need is an easy way for the user to attach to a specific >> place in my application. For example given a list of trucks >> choose the proper one and say request data from device. The data >> would then be uploaded add attached there. >> >> The application is entirely web based, runs in Firefox, and the >> back end is based on JBoss. >> >> Current solution is to use the FoxPro application to dump the data >> an the use a web browser upload to attach the data. This is prone >> to error and require the user to select the correct file, ect. I >> am hoping to simplify this in some way. >> >> *What about exposing the serial port as some kind of virtual >> network interface so that a remove machine could contact and pull >> the data? This might be better as my remote server could actually >> request the data across the internet and attach it all by itself.* >> >> Joe Lauer wrote: >>> Hey Jason, >>> >>> I'm a consultant who has completed several projects with RXTX (worked around headaches and all). I have not yet worked on a project that launches it via an applet, although depending on your situation, I might recommend a potential alternative. The user could install a downloadable application they run on their desktop as a daemon. The daemon would handle all device communicaton and use webservices back/forth to your webapp. That may provide for a better way to detect errors or walk the user thru connecting their device. >>> >>> Sounds like an interesting project. The serial comm protocol actually looks simple -- its just the other parts that will involve effort -- to make it user friendly >>> >>> I'd be glad to discuss further if interested. >>> >>> Joe Lauer >>> Cloudhopper >>> www.cloudhopper.net >>> joe.lauer at cloudhopper.net >>> ----- Original Message ----- From: "Jason Long" >>> >>> To: "Johnny Luong" >>> >>> Cc: rxtx at qbang.org >>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>> and applet Anyone here willing to provide some assistance? As a >>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>> have to integrate a type of measuring device directly into my web >>> based inventory system. It currently runs remotely on JBoss and >>> JDK 1.6. I need to be able for the user to attach the exported >>> measurement data directly to places in my application. The >>> following are the manufacturer directions. 1. set the hosts >>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>> host computer with a DB-9 connector 3. the host computer should >>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>> begin data transmission. 4. after receiving this signal the >>> device will transmit the data and the string "ENDENDEND". That is >>> it. Sounds very simple to me. Is this actually going to be a >>> headache? It can be. *Does this look like something that I would >>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>> knows about the classes and is able to run the native code >>> associated with it -- in the mailing list archives somewhere, >>> there was discussion about using it also through Java Web Start. >>> I think there are directions on the Wiki as well. The only thing >>> I can say about it is that you should try to isolate the part >>> that does the serial stuff and test it heavily to avoid bad >>> interactions with your applet. Best, Johnny >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From mailing.list at supernovasoftware.com Wed Jan 7 12:21:38 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Wed, 07 Jan 2009 13:21:38 -0600 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4964FB8E.6060401@ergotech.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> Message-ID: <496500C2.4040407@supernovasoftware.com> The device does not need to be polled. The user will plug in the device and initiate the transfer manually. Jim Redman wrote: > Jason, > > There are a host of ways to do this and it depends on your needs and > existing system. > > Seems that polling the serial device from a Servlet or EJB and > updating one of your existing web pages would be one way to do this. > You may have to figure out how to update the web page if the data from > the serial device is asynchronous. You might want to consider a > script to update the html page. > > With a script or an applet you could dynamically poll the device, but > I don't know if you need to do this. > > You might want to start by making sure that you can build code to talk > to the serial device. Once you have an understanding of the device, > you might get some architectural inspiration. RXTX may not be the > best list if you decide to go with web services. > > Jim > > Jason Long wrote: >> I am not sure I am going to fight the applet as I have no experience >> with them what so ever. I am leaning towards exposing the device on >> the network by installing a stripped down JBoss or something simpler. >> >> *Can anyone recommend the easiest way to expose a serial port as a >> web service or networked device? Or tell me why this is a bad idea?* >> >> iqzw2r602 at sneakemail.com wrote: >>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>> Trent is about to integrate; I guess it can't be long any more now >>> that 2.2pre is out there. >>> >>> I'm not entirely sure if this would work from within an applet (the >>> sandbox rules are quite strict on them if I remember correctly), but >>> turning an applet into an application that is webstartable is very >>> easy, and gives the user a similar experience. >>> >>> If your need is really urgent I can provide you with my locally >>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>> >>> Cheers, >>> >>> Uwe >>> >>> >>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>> mailing.list-at-supernovasoftware.com >>> |rxtx.org >>> mailing list| <... > wrote: >>> >>> The user would not have to do the setup. I would even consider >>> installing JBoss on the laptop that will be kept in the users >>> truck. However the less I have to install on that machine the >>> better. >>> >>> There is already a piece of software that extracts the data from >>> the device, but is has very poor organization and requires a lot >>> of information to be input to keep track of the material type and >>> other data to be input by the user which I already have in my >>> system. It is also written in FoxPro. Yuck. >>> >>> It would only be used in a warehouse type atmosphere where the >>> material only needs to be measured when is is loaded to be sold. >>> >>> The steps are as follows. >>> >>> 1. Truck comes into the facility to pick up material.(My software >>> will be controlling this entire process) >>> 2. Material is measured and a list of 100-300 measurements must >>> be uploaded into my system and attached to this truck. >>> 3. The truck proceed to the checkout and all paperwork is >>> generated and ready to go. >>> >>> The device allows no labeling of the data. It has 25 jobs and the >>> user selects the job and then that is what data is sent when I ask >>> the device for data. >>> >>> What I need is an easy way for the user to attach to a specific >>> place in my application. For example given a list of trucks >>> choose the proper one and say request data from device. The data >>> would then be uploaded add attached there. >>> >>> The application is entirely web based, runs in Firefox, and the >>> back end is based on JBoss. >>> >>> Current solution is to use the FoxPro application to dump the data >>> an the use a web browser upload to attach the data. This is prone >>> to error and require the user to select the correct file, ect. I >>> am hoping to simplify this in some way. >>> >>> *What about exposing the serial port as some kind of virtual >>> network interface so that a remove machine could contact and pull >>> the data? This might be better as my remote server could actually >>> request the data across the internet and attach it all by itself.* >>> >>> Joe Lauer wrote: >>>> Hey Jason, >>>> >>>> I'm a consultant who has completed several projects with RXTX >>>> (worked around headaches and all). I have not yet worked on a >>>> project that launches it via an applet, although depending on your >>>> situation, I might recommend a potential alternative. The user >>>> could install a downloadable application they run on their desktop >>>> as a daemon. The daemon would handle all device communicaton and >>>> use webservices back/forth to your webapp. That may provide for a >>>> better way to detect errors or walk the user thru connecting their >>>> device. >>>> >>>> Sounds like an interesting project. The serial comm protocol >>>> actually looks simple -- its just the other parts that will involve >>>> effort -- to make it user friendly >>>> >>>> I'd be glad to discuss further if interested. >>>> >>>> Joe Lauer >>>> Cloudhopper >>>> www.cloudhopper.net >>>> joe.lauer at cloudhopper.net >>>> ----- Original Message ----- From: "Jason Long" >>>> >>>> To: "Johnny Luong" >>>> >>>> Cc: rxtx at qbang.org >>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>> and applet Anyone here willing to provide some assistance? As a >>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>> have to integrate a type of measuring device directly into my web >>>> based inventory system. It currently runs remotely on JBoss and >>>> JDK 1.6. I need to be able for the user to attach the exported >>>> measurement data directly to places in my application. The >>>> following are the manufacturer directions. 1. set the hosts >>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>> host computer with a DB-9 connector 3. the host computer should >>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>> begin data transmission. 4. after receiving this signal the >>>> device will transmit the data and the string "ENDENDEND". That is >>>> it. Sounds very simple to me. Is this actually going to be a >>>> headache? It can be. *Does this look like something that I would >>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>> knows about the classes and is able to run the native code >>>> associated with it -- in the mailing list archives somewhere, >>>> there was discussion about using it also through Java Web Start. >>>> I think there are directions on the Wiki as well. The only thing >>>> I can say about it is that you should try to isolate the part >>>> that does the serial stuff and test it heavily to avoid bad >>>> interactions with your applet. Best, Johnny >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> _______________________________________________ Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Wed Jan 7 12:55:27 2009 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 07 Jan 2009 14:55:27 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL From tristan.dyer at cgi.com Wed Jan 7 13:16:00 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Wed, 7 Jan 2009 15:16:00 -0500 Subject: [Rxtx] serial ports in applets In-Reply-To: References: Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F875AD@MTL-MSG-02.cgiclients.com> Or if you own the environment you can always fiddle with the java.policy file. Cheers, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Dr. Douglas Lyon Sent: January 7, 2009 3:55 PM To: rxtx at qbang.org Subject: [Rxtx] serial ports in applets Hi All, The basic question about using serial ports in Applets... A java.awt.Applet is just a subclass of the java.awt.Panel, and is otherwise unremarkable except that it can share the visual space with the browser frame. As far as I know, only the Applet can do this. The Applet that is signed can play outside of the sandbox, just as the webstart application can. In fact, a webstart application can easily launch an applet, but you really want to get the browser to launch a signed applet if your goal is to share the browsers Frame. - DL _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jredman at ergotech.com Wed Jan 7 13:52:30 2009 From: jredman at ergotech.com (Jim Redman) Date: Wed, 07 Jan 2009 13:52:30 -0700 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <496500C2.4040407@supernovasoftware.com> References: <2074170407.3111231284121240.JavaMail.root@zimbra-01.cloudhopper.lan> <4963EC61.1040508@supernovasoftware.com> <21922-63246@sneakemail.com> <4964D840.6020101@supernovasoftware.com> <4964FB8E.6060401@ergotech.com> <496500C2.4040407@supernovasoftware.com> Message-ID: <4965160E.70002@ergotech.com> Jason, This is getting a little way from an RXTX problem but.. I'd like to help but I'm confused. You have a serial device (maybe knowing what it is would help). You have (presumably) a server with JBoss. This is all good, but now I'm confused about what the user is going to plug the device into, the server?, a laptop/tablet that they're carrying that could run an Applet? Are you running lots of copies of JBoss on portable systems (or thinking about doing that)? I'm actually quite sympathetic. It sounds as though it should be easy, but it's not. We run into this quite often with Barcode/RFID readers. We provide web-based manufacturing/factory automation solutions. The logic of an application runs on a "server" in a small application/web server. The user interface is usually an Applet in a browser. So the user has a system and they can see the screen (because they are running in a web browser) and can't understand why you just can't hook up a serial reader and have it show up on the web browser display. It's not easy to explain the sandbox to the user and the why that's not allowed. For barcode readers you can cheat with a keyboard wedge so that the output of the barcode appears to be keyboard input. That doesn't help you. For serial readers we always need to run an application, web services or other, that will read the barcode/rfid and then send the value to the server which will then send it to the browser. Or we just run the Applets as application (just add a "main" that creates a frame for the Applet) and then we can read the serial port directly. We've also run multiple "servers", small embedded systems, at each point that needs serial access, which works if the device is fixed, something like a conveyor application. Jim Jason Long wrote: > The device does not need to be polled. The user will plug in the device > and initiate the transfer manually. > > Jim Redman wrote: >> Jason, >> >> There are a host of ways to do this and it depends on your needs and >> existing system. >> >> Seems that polling the serial device from a Servlet or EJB and >> updating one of your existing web pages would be one way to do this. >> You may have to figure out how to update the web page if the data from >> the serial device is asynchronous. You might want to consider a >> script to update the html page. >> >> With a script or an applet you could dynamically poll the device, but >> I don't know if you need to do this. >> >> You might want to start by making sure that you can build code to talk >> to the serial device. Once you have an understanding of the device, >> you might get some architectural inspiration. RXTX may not be the >> best list if you decide to go with web services. >> >> Jim >> >> Jason Long wrote: >>> I am not sure I am going to fight the applet as I have no experience >>> with them what so ever. I am leaning towards exposing the device on >>> the network by installing a stripped down JBoss or something simpler. >>> >>> *Can anyone recommend the easiest way to expose a serial port as a >>> web service or networked device? Or tell me why this is a bad idea?* >>> >>> iqzw2r602 at sneakemail.com wrote: >>>> I wrote Webstart capabilities for RXTX. I submitted a patch that >>>> Trent is about to integrate; I guess it can't be long any more now >>>> that 2.2pre is out there. >>>> >>>> I'm not entirely sure if this would work from within an applet (the >>>> sandbox rules are quite strict on them if I remember correctly), but >>>> turning an applet into an application that is webstartable is very >>>> easy, and gives the user a similar experience. >>>> >>>> If your need is really urgent I can provide you with my locally >>>> patched rxtx-ws.jar (which is 2.1.7, WebStart-enabled). >>>> >>>> Cheers, >>>> >>>> Uwe >>>> >>>> >>>> On Wed, Jan 7, 2009 at 10:42 AM, Jason Long >>>> mailing.list-at-supernovasoftware.com >>>> |rxtx.org >>>> mailing list| <... > wrote: >>>> >>>> The user would not have to do the setup. I would even consider >>>> installing JBoss on the laptop that will be kept in the users >>>> truck. However the less I have to install on that machine the >>>> better. >>>> >>>> There is already a piece of software that extracts the data from >>>> the device, but is has very poor organization and requires a lot >>>> of information to be input to keep track of the material type and >>>> other data to be input by the user which I already have in my >>>> system. It is also written in FoxPro. Yuck. >>>> >>>> It would only be used in a warehouse type atmosphere where the >>>> material only needs to be measured when is is loaded to be sold. >>>> >>>> The steps are as follows. >>>> >>>> 1. Truck comes into the facility to pick up material.(My software >>>> will be controlling this entire process) >>>> 2. Material is measured and a list of 100-300 measurements must >>>> be uploaded into my system and attached to this truck. >>>> 3. The truck proceed to the checkout and all paperwork is >>>> generated and ready to go. >>>> >>>> The device allows no labeling of the data. It has 25 jobs and the >>>> user selects the job and then that is what data is sent when I ask >>>> the device for data. >>>> >>>> What I need is an easy way for the user to attach to a specific >>>> place in my application. For example given a list of trucks >>>> choose the proper one and say request data from device. The data >>>> would then be uploaded add attached there. >>>> >>>> The application is entirely web based, runs in Firefox, and the >>>> back end is based on JBoss. >>>> >>>> Current solution is to use the FoxPro application to dump the data >>>> an the use a web browser upload to attach the data. This is prone >>>> to error and require the user to select the correct file, ect. I >>>> am hoping to simplify this in some way. >>>> >>>> *What about exposing the serial port as some kind of virtual >>>> network interface so that a remove machine could contact and pull >>>> the data? This might be better as my remote server could actually >>>> request the data across the internet and attach it all by itself.* >>>> >>>> Joe Lauer wrote: >>>>> Hey Jason, >>>>> >>>>> I'm a consultant who has completed several projects with RXTX >>>>> (worked around headaches and all). I have not yet worked on a >>>>> project that launches it via an applet, although depending on your >>>>> situation, I might recommend a potential alternative. The user >>>>> could install a downloadable application they run on their desktop >>>>> as a daemon. The daemon would handle all device communicaton and >>>>> use webservices back/forth to your webapp. That may provide for a >>>>> better way to detect errors or walk the user thru connecting their >>>>> device. >>>>> >>>>> Sounds like an interesting project. The serial comm protocol >>>>> actually looks simple -- its just the other parts that will involve >>>>> effort -- to make it user friendly >>>>> >>>>> I'd be glad to discuss further if interested. >>>>> >>>>> Joe Lauer >>>>> Cloudhopper >>>>> www.cloudhopper.net >>>>> joe.lauer at cloudhopper.net >>>>> ----- Original Message ----- From: "Jason Long" >>>>> >>>>> To: "Johnny Luong" >>>>> >>>>> Cc: rxtx at qbang.org >>>>> Sent: Tuesday, January 6, 2009 2:38:13 PM >>>>> GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Using RxTx from >>>>> and applet Anyone here willing to provide some assistance? As a >>>>> consultant if necessary. Johnny Luong wrote: Jason Long wrote: I >>>>> have to integrate a type of measuring device directly into my web >>>>> based inventory system. It currently runs remotely on JBoss and >>>>> JDK 1.6. I need to be able for the user to attach the exported >>>>> measurement data directly to places in my application. The >>>>> following are the manufacturer directions. 1. set the hosts >>>>> computer's serial port to 2400 baud, 8-N-1 2. connect device to >>>>> host computer with a DB-9 connector 3. the host computer should >>>>> send the ASCII character "1" (31h) or "2" (32h) to the device to >>>>> begin data transmission. 4. after receiving this signal the >>>>> device will transmit the data and the string "ENDENDEND". That is >>>>> it. Sounds very simple to me. Is this actually going to be a >>>>> headache? It can be. *Does this look like something that I would >>>>> use RxTx for?* You can use RxTx via an applet as long as the JRE >>>>> knows about the classes and is able to run the native code >>>>> associated with it -- in the mailing list archives somewhere, >>>>> there was discussion about using it also through Java Web Start. >>>>> I think there are directions on the Wiki as well. The only thing >>>>> I can say about it is that you should try to isolate the part >>>>> that does the serial stuff and test it heavily to avoid bad >>>>> interactions with your applet. Best, Johnny >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> _______________________________________________ Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From linuxguy123 at gmail.com Thu Jan 8 10:46:44 2009 From: linuxguy123 at gmail.com (Linuxguy123) Date: Thu, 08 Jan 2009 10:46:44 -0700 Subject: [Rxtx] How do I use rxtx if I installed the package in Eclipse ? In-Reply-To: <1228892374.3839.14.camel@localhost.localdomain> References: <1228892374.3839.14.camel@localhost.localdomain> Message-ID: <1231436804.25799.64.camel@localhost.localdomain> On Tue, 2008-12-09 at 23:59 -0700, Linuxguy123 wrote: > I installed rxtx in Eclipse by > 1) opening Eclipse 3.4, Help->Software Updates-> Available Software > 2) Add Site... Entered: http://rxtx.qbang.org/eclipse/ > 3) Selected RXTX 2.1-7r4 and then the RXTX END-USER Runtime and SDK > packages. > > They install without errors. > > Now what do I do ? I got it working. Here is what I did: In Eclipse, Project-> Properties->Libraries. Add External Jars. Browse to the location of gnu.io.rxtx_.jar Add it. (Press OK) Then expand the rxtx library entry. (ie press the > icon) Select Native library location. Press Edit. Press External Folder. Browse to the location of librxtxSerial.so. LibrxtxParallel.so should be there as well. Press OK. Now when you look at the Referenced Libraries in your project, you should see gnu.io.rxtx_.jar. I hope this helps someone. From talberts at msiscales.com Fri Jan 9 11:49:59 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 10:49:59 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4963CB66.9080303@msiscales.com> References: <4963CB66.9080303@msiscales.com> Message-ID: <49679C57.7080509@msiscales.com> Thanks to Joe Lauer and Trent for responding. Unfortunately, I am getting nowhere with this problem. Per Joe's suggestion, I changed to polling the receive stream on a thread. This again works fine in Sun javax.comm, but RXTX gnu.io does not give me any data. The thing that seems to be happening is the InputStream.available() method returns true, but InputStream.read() always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c351b238/attachment-0029.vcf From lpdev at ruabrasil.org Fri Jan 9 12:05:15 2009 From: lpdev at ruabrasil.org (Luis Pires) Date: Fri, 9 Jan 2009 17:05:15 -0200 Subject: [Rxtx] buffer overflow in YACK() Message-ID: Hi, I'm using 2.1-7r2 and I came across a scenario where Windows returns a long error message while trying to open a serial port: "The process cannot access the file because it is being used by another process.", error code 0x20. This is okay, since the port is really in use by another process, but it leads to a buffer overflow in the YACK macro (in win32termios.h), when sprintf() is used to create the error message. When this happens, the whole jvm crashes due to an access violation. In my local version, I replaced this one occurrence of sprintf with sprintf_s (I used VS2005) to correct the problem, but I wanted to know how to proceed to get this fixed in the public version of the library. I believe using snprintf would be best, or maybe wrap this inside an #ifdef to allow for MS and non-MS compilers. Should I open a bug in bugzilla? Would any help from my part help to get this merged to the main 2.1 code sooner? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/97caf39a/attachment-0029.html From talberts at msiscales.com Fri Jan 9 12:30:54 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 11:30:54 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <49679C57.7080509@msiscales.com> References: <4963CB66.9080303@msiscales.com> <49679C57.7080509@msiscales.com> Message-ID: <4967A5EE.1090901@msiscales.com> Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/d6717cc4/attachment-0029.vcf From opensource at cloudhopper.net Fri Jan 9 12:40:57 2009 From: opensource at cloudhopper.net (Joe Lauer) Date: Fri, 9 Jan 2009 11:40:57 -0800 (PST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967A5EE.1090901@msiscales.com> Message-ID: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Hey Tim, Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. What OS was this on? -Joe ----- Original Message ----- From: "Tim Alberts" To: rxtx at qbang.org Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io Tim Alberts wrote: > > The thing that seems to be happening is the InputStream.available() > method returns true, but InputStream.read() always returns -1 with RXTX. Sorry, that should have been InputStream.available() > 0 returns true, while InputStream.read always returns -1 with RXTX. _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From talberts at msiscales.com Fri Jan 9 13:31:53 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:31:53 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> Message-ID: <4967B439.6090109@msiscales.com> Not much more to post than what I said: if( receivestream.available() > 0 ){ while( (rbyte = receivestream.read()) > -1 ){ buffer.append(rbyte); } } Same as used in the sample code on the RXTX Wiki. Nothing real special going on. Joe Lauer wrote: > Hey Tim, > > Can you copy and paste the code you have reading from the stream? I'll compare it to the version I have. > > What OS was this on? > > -Joe > > ----- Original Message ----- > From: "Tim Alberts" > To: rxtx at qbang.org > Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific > Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io > > Tim Alberts wrote: > >> The thing that seems to be happening is the InputStream.available() >> method returns true, but InputStream.read() always returns -1 with RXTX. >> > Sorry, that should have been InputStream.available() > 0 returns true, > while InputStream.read always returns -1 with RXTX. > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/c4e9210e/attachment-0029.vcf From talberts at msiscales.com Fri Jan 9 13:35:14 2009 From: talberts at msiscales.com (Tim Alberts) Date: Fri, 09 Jan 2009 12:35:14 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B439.6090109@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> Message-ID: <4967B502.4080305@msiscales.com> Sorry that was Windows XP. Tim Alberts wrote: > Not much more to post than what I said: > > if( receivestream.available() > 0 ){ > while( (rbyte = receivestream.read()) > -1 ){ > buffer.append(rbyte); > } > } > > Same as used in the sample code on the RXTX Wiki. Nothing real > special going on. > > > Joe Lauer wrote: >> Hey Tim, >> >> Can you copy and paste the code you have reading from the stream? >> I'll compare it to the version I have. >> >> What OS was this on? >> >> -Joe >> >> ----- Original Message ----- >> From: "Tim Alberts" >> To: rxtx at qbang.org >> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >> >> Tim Alberts wrote: >> >>> The thing that seems to be happening is the InputStream.available() >>> method returns true, but InputStream.read() always returns -1 with >>> RXTX. >>> >> Sorry, that should have been InputStream.available() > 0 returns >> true, while InputStream.read always returns -1 with RXTX. >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 350 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090109/1d7cc669/attachment-0029.vcf From andy at triera.net Fri Jan 9 17:21:59 2009 From: andy at triera.net (Andy Rozman) Date: Sat, 10 Jan 2009 01:21:59 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing Message-ID: <4967EA27.1090504@triera.net> Hi ! I have one weird question... I have application that is using Rxtx, and now I wanted to handle problems, like user not having native part of library installed... I had no problem doing that in code for reading data, but I have problem doing that in code for configuration... Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception which I can't catch, since its thrown CommPortIdentifier.java in its static context... Is there any way to check if native file is there. Are there any helper method, classes that can do that? Andy P.S.: I am using rxtx 2.1.7 From tjarvi at qbang.org Fri Jan 9 18:10:47 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 9 Jan 2009 18:10:47 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <4967B502.4080305@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: Hmm. I would do everything you can to avoid read() - one byte at a time. Can you do something like the following? You could nibble smaller pieces but try to get a few at a time at least. if( receivestream.available() > 0 ){ receivestream.read(byteArray,0, receivestream.available()) } ..process byteArray. I'll look at read() but would strongly recommend against getting a byte at a time. It may have something to do with timeout/threshold default settings. Is this a traditional serial port as in a UART on the motherboard? If not, could you give some details about it? On Fri, 9 Jan 2009, Tim Alberts wrote: > Sorry that was Windows XP. > > Tim Alberts wrote: >> Not much more to post than what I said: >> >> if( receivestream.available() > 0 ){ >> while( (rbyte = receivestream.read()) > -1 ){ >> buffer.append(rbyte); >> } >> } >> >> Same as used in the sample code on the RXTX Wiki. Nothing real special >> going on. >> >> >> Joe Lauer wrote: >>> Hey Tim, >>> >>> Can you copy and paste the code you have reading from the stream? I'll >>> compare it to the version I have. >>> >>> What OS was this on? >>> >>> -Joe >>> >>> ----- Original Message ----- >>> From: "Tim Alberts" >>> To: rxtx at qbang.org >>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>> >>> Tim Alberts wrote: >>> >>>> The thing that seems to be happening is the InputStream.available() >>>> method returns true, but InputStream.read() always returns -1 with RXTX. >>>> >>> Sorry, that should have been InputStream.available() > 0 returns true, >>> while InputStream.read always returns -1 with RXTX. >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> From hakcenter at gmail.com Sat Jan 10 21:20:56 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sat, 10 Jan 2009 20:20:56 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <4967EA27.1090504@triera.net> References: <4967EA27.1090504@triera.net> Message-ID: <496973A8.3050808@gmail.com> I'm using jna... public static void check_library() { try { // RXTX NativeLibrary.addSearchPath("rxtxSerial", "."); NativeLibrary.getInstance("rxtxSerial"); library = true; } catch (UnsatisfiedLinkError e) { JOptionPane.showMessageDialog(Main.logger_frame, e, "Error", JOptionPane.ERROR_MESSAGE); library = false; } } //END check_library Andy Rozman wrote: > Hi ! > > I have one weird question... > > I have application that is using Rxtx, and now I wanted to handle > problems, like user not having native part of library installed... > > I had no problem doing that in code for reading data, but I have problem > doing that in code for configuration... > > Everytime I call CommPortIdentifier.getPortIdentifiers() I get exception > which I can't catch, since its thrown CommPortIdentifier.java > in its static context... > > Is there any way to check if native file is there. Are there any helper > method, classes that can do that? > > Andy > > P.S.: I am using rxtx 2.1.7 > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From alexander.poddey at gmx.net Sun Jan 11 03:26:19 2009 From: alexander.poddey at gmx.net (Alexander Poddey) Date: Sun, 11 Jan 2009 11:26:19 +0100 Subject: [Rxtx] hang and 100% CPU usage when switching heavy loads close to the usb cable Message-ID: <200901111126.19313.alexander.poddey@gmx.net> I'm using RXTX-2.1-7 (on linux) for a while and found one problem when switching heavy loads (e.g. a pump of an espresso machine) located close to the measurement setup. This seems to induce an irritation either in the serial->usb converter or the usb cable itself. As a result, the java app. including the event listener hangs at 100% CPU usage. When writing the code, I found that (as reported by others on the list) serial_port_.notifyOnOutputEmpty(true); immediately hangs the app. the same way - I therefore now deactivated all notifications except notifyOnDataAvailable(true); Still the same problem. closing the app. and restarting allows to connect to the microcontroller sending the data - the hang definitely happens inside the java code. any suggestions where this comes from / could be cured? I thought of a workaround with a timer checking the serial events and - on a hang (no serial event for x seconds) closing and reopening the port again. better suggestions? thx alex From andy at triera.net Sun Jan 11 11:30:47 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 19:30:47 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496973A8.3050808@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> Message-ID: <496A3AD7.4060008@triera.net> Curtis Hacker wrote: > I'm using jna... > Ok. I got this to work on windows... but I am having problem on Mac... As first library name under mac is different, librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I still get problem with this... Any help appreciated... Andy > public static void check_library() { > try { > // RXTX > NativeLibrary.addSearchPath("rxtxSerial", "."); > NativeLibrary.getInstance("rxtxSerial"); > library = true; > } catch (UnsatisfiedLinkError e) { > JOptionPane.showMessageDialog(Main.logger_frame, e, > "Error", JOptionPane.ERROR_MESSAGE); > library = false; > } > } //END check_library > > Andy Rozman wrote: >> Hi ! >> >> I have one weird question... >> >> I have application that is using Rxtx, and now I wanted to handle >> problems, like user not having native part of library installed... >> >> I had no problem doing that in code for reading data, but I have >> problem doing that in code for configuration... >> >> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >> exception which I can't catch, since its thrown CommPortIdentifier.java >> in its static context... >> >> Is there any way to check if native file is there. Are there any >> helper method, classes that can do that? >> >> Andy >> >> P.S.: I am using rxtx 2.1.7 >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> > From hakcenter at gmail.com Sun Jan 11 11:47:19 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 11 Jan 2009 10:47:19 -0800 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3AD7.4060008@triera.net> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> Message-ID: <496A3EB7.7090103@gmail.com> Depending on the version of jna, my test code looks at /usr/local/lib for the file But when you run the java code it runs from the /Library/Java/Extensions dir the name of the file is fine as librxtxSerial.jnilib, my application is used on macs/windows/linux/freebsd, macs are a little lamer for the jna library lookup. either make a symbolic link to the /Library/Java/Extensions file to /usr/local/lib or copy it to both places. Andy Rozman wrote: > Curtis Hacker wrote: >> I'm using jna... >> > Ok. I got this to work on windows... but I am having problem on Mac... > As first library name under mac is different, librxtxSerial.jnilib, I > changed name to rxtxSerial.jnilib, but I still get problem with this... > > Any help appreciated... > > Andy > > >> public static void check_library() { >> try { >> // RXTX >> NativeLibrary.addSearchPath("rxtxSerial", "."); >> NativeLibrary.getInstance("rxtxSerial"); >> library = true; >> } catch (UnsatisfiedLinkError e) { >> JOptionPane.showMessageDialog(Main.logger_frame, e, >> "Error", JOptionPane.ERROR_MESSAGE); >> library = false; >> } >> } //END check_library >> >> Andy Rozman wrote: >>> Hi ! >>> >>> I have one weird question... >>> >>> I have application that is using Rxtx, and now I wanted to handle >>> problems, like user not having native part of library installed... >>> >>> I had no problem doing that in code for reading data, but I have >>> problem doing that in code for configuration... >>> >>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>> exception which I can't catch, since its thrown CommPortIdentifier.java >>> in its static context... >>> >>> Is there any way to check if native file is there. Are there any >>> helper method, classes that can do that? >>> >>> Andy >>> >>> P.S.: I am using rxtx 2.1.7 >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >> > > From andy at triera.net Sun Jan 11 13:15:36 2009 From: andy at triera.net (Andy Rozman) Date: Sun, 11 Jan 2009 21:15:36 +0100 Subject: [Rxtx] Problem with getting all available ports, while native rxtxSerial is missing In-Reply-To: <496A3EB7.7090103@gmail.com> References: <4967EA27.1090504@triera.net> <496973A8.3050808@gmail.com> <496A3AD7.4060008@triera.net> <496A3EB7.7090103@gmail.com> Message-ID: <496A5368.8010605@triera.net> Curtis Hacker wrote: > Depending on the version of jna, my test code looks at /usr/local/lib > for the file > But when you run the java code it runs from the > /Library/Java/Extensions dir > > the name of the file is fine as librxtxSerial.jnilib, my application > is used on macs/windows/linux/freebsd, macs are a little lamer for the > jna library lookup. > > either make a symbolic link to the /Library/Java/Extensions file to > /usr/local/lib or copy it to both places. Hi ! I solved problem... It looks for file librxtxSerial.dylib, after I made link to original librxtxSerial.jnilib and that problem is solved... I have 10.4 version of Mac (just as Test machine) Andy > > Andy Rozman wrote: >> Curtis Hacker wrote: >>> I'm using jna... >>> >> Ok. I got this to work on windows... but I am having problem on >> Mac... As first library name under mac is different, >> librxtxSerial.jnilib, I changed name to rxtxSerial.jnilib, but I >> still get problem with this... >> >> Any help appreciated... >> >> Andy >> >> >>> public static void check_library() { >>> try { >>> // RXTX >>> NativeLibrary.addSearchPath("rxtxSerial", "."); >>> NativeLibrary.getInstance("rxtxSerial"); >>> library = true; >>> } catch (UnsatisfiedLinkError e) { >>> JOptionPane.showMessageDialog(Main.logger_frame, e, >>> "Error", JOptionPane.ERROR_MESSAGE); >>> library = false; >>> } >>> } //END check_library >>> >>> Andy Rozman wrote: >>>> Hi ! >>>> >>>> I have one weird question... >>>> >>>> I have application that is using Rxtx, and now I wanted to handle >>>> problems, like user not having native part of library installed... >>>> >>>> I had no problem doing that in code for reading data, but I have >>>> problem doing that in code for configuration... >>>> >>>> Everytime I call CommPortIdentifier.getPortIdentifiers() I get >>>> exception which I can't catch, since its thrown >>>> CommPortIdentifier.java >>>> in its static context... >>>> >>>> Is there any way to check if native file is there. Are there any >>>> helper method, classes that can do that? >>>> >>>> Andy >>>> >>>> P.S.: I am using rxtx 2.1.7 >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> >> >> > From beat.arnet at gmail.com Sun Jan 11 13:45:56 2009 From: beat.arnet at gmail.com (Beat Arnet) Date: Sun, 11 Jan 2009 15:45:56 -0500 Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: References: <47717688.20002@gmail.com> Message-ID: <496A5A84.5050105@gmail.com> Dear all, For release 2.2, unless someone objects, I would like to propose that we implement the following change in termios.c, tcsetattr(): original: /* no DTR control in termios? */ dcb.fDtrControl = DTR_CONTROL_ENABLE; new: /* no DTR control in termios! */ dcb.fDtrControl = DTR_CONTROL_DISABLE; This modification solved my problem that was discussed in this thread a year ago. Regards, Beat From tjarvi at qbang.org Sun Jan 11 16:55:27 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 11 Jan 2009 16:55:27 -0700 (MST) Subject: [Rxtx] Maintaining DTR=false during setSerialPortParams() In-Reply-To: <496A5A84.5050105@gmail.com> References: <47717688.20002@gmail.com> <496A5A84.5050105@gmail.com> Message-ID: Hi Beat, This looks reasonable. To avoid forcing someone to follow your (difficult) path if this causes problems, would you mind creating a bugzilla entry for it? We can point to that in the changelog. I'd suggest putting two things in. 1) The positive impacts this change would cause: consistancy between OS's, behavior like Sun's (?). 2) The negative impacts it may cause. - guesses are fine. Reverse incompatability for rxtx users that depend upon that behavior in windows comes to mind. There is presumably no way to enable that through CommAPI? The goal is to leave an obvious trail for people to find in the future if they have issues. [You can tell I was not sure how that mapped to termios when I ran acrossed it in the documentation.] On Sun, 11 Jan 2009, Beat Arnet wrote: > Dear all, > For release 2.2, unless someone objects, I would like to propose that we > implement the following change in termios.c, tcsetattr(): > > original: > /* no DTR control in termios? */ > dcb.fDtrControl = DTR_CONTROL_ENABLE; > > new: > /* no DTR control in termios! */ > dcb.fDtrControl = DTR_CONTROL_DISABLE; > > This modification solved my problem that was discussed in this thread a year > ago. > > Regards, > Beat > > From talberts at msiscales.com Mon Jan 12 10:13:50 2009 From: talberts at msiscales.com (Tim Alberts) Date: Mon, 12 Jan 2009 09:13:50 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> Message-ID: <496B7A4E.70003@msiscales.com> I'll try that and report back. It is a motherboard serial port that I'm testing on (COM2). I do have an expansion serial card with 2 more serial ports, plus I have several ethernet and USB to serial converters, but none of which I'm testing on. I would point out that the Wiki page 'Event Based Two Way Communication' reads one byte at a time: int len = 0; while ( ( data = in.read()) > -1 ) { if ( data != '\n' ) { break; } buffer[len++] = (byte) data; } Trent Jarvi wrote: > > Hmm. I would do everything you can to avoid read() - one byte at a > time. Can you do something like the following? You could nibble > smaller pieces but try to get a few at a time at least. > > if( receivestream.available() > 0 ){ > receivestream.read(byteArray,0, receivestream.available()) > } > ..process byteArray. > > I'll look at read() but would strongly recommend against getting a > byte at a time. It may have something to do with timeout/threshold > default settings. > > Is this a traditional serial port as in a UART on the motherboard? If > not, could you give some details about it? > > On Fri, 9 Jan 2009, Tim Alberts wrote: > >> Sorry that was Windows XP. >> >> Tim Alberts wrote: >>> Not much more to post than what I said: >>> >>> if( receivestream.available() > 0 ){ >>> while( (rbyte = receivestream.read()) > -1 ){ >>> buffer.append(rbyte); >>> } >>> } >>> >>> Same as used in the sample code on the RXTX Wiki. Nothing real >>> special going on. >>> >>> >>> Joe Lauer wrote: >>>> Hey Tim, >>>> >>>> Can you copy and paste the code you have reading from the stream? >>>> I'll compare it to the version I have. >>>> >>>> What OS was this on? >>>> >>>> -Joe >>>> >>>> ----- Original Message ----- >>>> From: "Tim Alberts" >>>> To: rxtx at qbang.org >>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>> >>>> Tim Alberts wrote: >>>> >>>>> The thing that seems to be happening is the >>>>> InputStream.available() method returns true, but >>>>> InputStream.read() always returns -1 with RXTX. >>>>> >>>> Sorry, that should have been InputStream.available() > 0 returns >>>> true, while InputStream.read always returns -1 with RXTX. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090112/a1410ac3/attachment-0026.vcf From jaakko.sipari at gmail.com Tue Jan 13 03:43:52 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 12:43:52 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? Message-ID: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Hi! Is there any info if the (Windows specific) problems mentioned in these posts are/will be resolved with RXTX 2.2: http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html And to tell you something about My problem: I've had some strange behavior with reading (randomly lost frames) but have been unable to log it yet since it seems to fail very rarely. I'm currently using receive timeout of 300ms and a custom implementation of SerialPortEventListener which tries to read stuff from the input stream (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. Does my implementation sound like it could work? Meaning that should I use the SerialPortEventListener implementation with RXTX at all? I'm also interested to know what kind of timeout (currently 300ms) is recommended when the SerialPortEventListener callback is used to read data from the ComPort? Shouldn't it actually work on very low timeouts since the whole frame is not expected to be read on one callback? Since I'm doing asynchronous communications I cannot just set the timeout to a ridiculously high value (as suggested for the timeout problem in one thread) to really make sure everything comes through with one read. Hope this makes any sense :) I'm fairly new to serial communications and debugging problems differs very much from your basic java application. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/d81ebd66/attachment-0026.html From jaakko.sipari at gmail.com Tue Jan 13 07:02:42 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Tue, 13 Jan 2009 16:02:42 +0200 Subject: [Rxtx] Windows timeout problems (enableReceiveTimeout) solved in v2.2? In-Reply-To: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> References: <901f25b80901130243u11a8e891j79ed4a36b19bd60e@mail.gmail.com> Message-ID: <901f25b80901130602m73e8eafod63e9537f6d0f965@mail.gmail.com> On Tue, Jan 13, 2009 at 12:43 PM, Jaakko Sipari wrote: > Hi! > > Is there any info if the (Windows specific) problems mentioned in these > posts are/will be resolved with RXTX 2.2: > > http://mailman.qbang.org/pipermail/rxtx/2008-October/3566892.html > http://mailman.qbang.org/pipermail/rxtx/2008-September/3566888.html > > And to tell you something about My problem: > > I've had some strange behavior with reading (randomly lost frames) but have > been unable to log it yet since it seems to fail very rarely. I'm currently > using receive timeout of 300ms and a custom implementation of > SerialPortEventListener which tries to read stuff from the input stream > (ComPort.getInputStream()) when a DATA_AVAILABLE event is received. > > Does my implementation sound like it could work? Meaning that should I use > the SerialPortEventListener implementation with RXTX at all? I'm also > interested to know what kind of timeout (currently 300ms) is recommended > when the SerialPortEventListener callback is used to read data from the > ComPort? Shouldn't it actually work on very low timeouts since the whole > frame is not expected to be read on one callback? > > Since I'm doing asynchronous communications I cannot just set the timeout > to a ridiculously high value (as suggested for the timeout problem in one > thread) to really make sure everything comes through with one read. > > Hope this makes any sense :) I'm fairly new to serial communications and > debugging problems differs very much from your basic java application. > > - Jaakko > Some additional questions: - Is it possible to use a 0ms timeout (meaning that the InputStream.read(byte[])) would always return immediately when there's no data? If I understand correctly a 0ms timeout set with enableReceiveTimeout means (on a platform where it works correctly) that read should block forever or until there's some data available. - When is SerialPortEventListener called by the specification? After a burst of data or the first byte is received? Or maybe for every byte received? It would actually be nice to find all of this from the javadoc so I wouldn't need to flood the list :) - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/8b8279d1/attachment-0026.html From talberts at msiscales.com Tue Jan 13 11:53:05 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 10:53:05 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496B7A4E.70003@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> Message-ID: <496CE311.4000708@msiscales.com> OK, I have tried the suggested method for reading as follows with no success. byte[] buffer = new byte[1024]; int nbytes = receivestream.available(); if( nbytes > 0 ){ receivestream.read(buffer, 0, nbytes); ... } The symptoms are, receivestream.available() appears to correctly report the number of bytes received, and it gets copied to my nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is called. However after that, my buffer still contains all 0 for data. Once again, I've tested this with Sun javax.comm and it worked fine, but not with RXTX gnu.io. I have been testing with the stable version, and it reports to the output when the application runs: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 I'm not trying to use any web install JNLP yet, just running from Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and 2, so no special hardware involved. Is there a problem with having Suns javax.comm installed at the same time as having RXTX gnu.io installed? Tim Alberts wrote: > I'll try that and report back. It is a motherboard serial port that > I'm testing on (COM2). I do have an expansion serial card with 2 more > serial ports, plus I have several ethernet and USB to serial > converters, but none of which I'm testing on. > > I would point out that the Wiki page 'Event Based Two Way > Communication' reads one byte at a time: > > int len = 0; > while ( ( data = in.read()) > -1 ) > { > if ( data != '\n' ) { > break; > } > buffer[len++] = (byte) data; > } > > > > > Trent Jarvi wrote: >> >> Hmm. I would do everything you can to avoid read() - one byte at a >> time. Can you do something like the following? You could nibble >> smaller pieces but try to get a few at a time at least. >> >> if( receivestream.available() > 0 ){ >> receivestream.read(byteArray,0, receivestream.available()) >> } >> ..process byteArray. >> >> I'll look at read() but would strongly recommend against getting a >> byte at a time. It may have something to do with timeout/threshold >> default settings. >> >> Is this a traditional serial port as in a UART on the motherboard? >> If not, could you give some details about it? >> >> On Fri, 9 Jan 2009, Tim Alberts wrote: >> >>> Sorry that was Windows XP. >>> >>> Tim Alberts wrote: >>>> Not much more to post than what I said: >>>> >>>> if( receivestream.available() > 0 ){ >>>> while( (rbyte = receivestream.read()) > -1 ){ >>>> buffer.append(rbyte); >>>> } >>>> } >>>> >>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>> special going on. >>>> >>>> >>>> Joe Lauer wrote: >>>>> Hey Tim, >>>>> >>>>> Can you copy and paste the code you have reading from the stream? >>>>> I'll compare it to the version I have. >>>>> >>>>> What OS was this on? >>>>> >>>>> -Joe >>>>> >>>>> ----- Original Message ----- >>>>> From: "Tim Alberts" >>>>> To: rxtx at qbang.org >>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>> Pacific >>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>> >>>>> Tim Alberts wrote: >>>>> >>>>>> The thing that seems to be happening is the >>>>>> InputStream.available() method returns true, but >>>>>> InputStream.read() always returns -1 with RXTX. >>>>>> >>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>> true, while InputStream.read always returns -1 with RXTX. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/3ad8e701/attachment-0025.vcf From talberts at msiscales.com Tue Jan 13 12:26:22 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 13 Jan 2009 11:26:22 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CE311.4000708@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> Message-ID: <496CEADE.6090808@msiscales.com> Good grief I think I found it, thanks to your (Trent's) comment on Timeout/Threshold. I've always used: enableReceiveTimeout( 0 ); enableReceiveThreshold( 0 ); with Sun javax.comm. I commented these lines out (so they're at whatever defaults are) and ran again, now I'm receiving data! So for the sake of the dummies out there (like me)...can someone give a quick explanation of what these methods do? In conclusion (lesson learned) when moving from Sun javax.comm to RXTX gnu.io, best to try leaving timeout/threshold at defaults. Thanks everyone for the support...unfortunately I've already noticed some more problems with handshaking, but I'll get to that later after some more testing. Tim Alberts wrote: > OK, I have tried the suggested method for reading as follows with no > success. > > byte[] buffer = new byte[1024]; > int nbytes = receivestream.available(); > if( nbytes > 0 ){ > receivestream.read(buffer, 0, nbytes); > ... > } > > The symptoms are, receivestream.available() appears to correctly > report the number of bytes received, and it gets copied to my nbytes > variable. Then the receivestream.read(buffer, 0, nbytes) is called. > However after that, my buffer still contains all 0 for data. > > Once again, I've tested this with Sun javax.comm and it worked fine, > but not with RXTX gnu.io. > > I have been testing with the stable version, and it reports to the > output when the application runs: > > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > > I'm not trying to use any web install JNLP yet, just running from > Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard > comports 1 and 2, so no special hardware involved. > > Is there a problem with having Suns javax.comm installed at the same > time as having RXTX gnu.io installed? > > > Tim Alberts wrote: >> I'll try that and report back. It is a motherboard serial port that >> I'm testing on (COM2). I do have an expansion serial card with 2 >> more serial ports, plus I have several ethernet and USB to serial >> converters, but none of which I'm testing on. >> >> I would point out that the Wiki page 'Event Based Two Way >> Communication' reads one byte at a time: >> >> int len = 0; >> while ( ( data = in.read()) > -1 ) >> { >> if ( data != '\n' ) { >> break; >> } >> buffer[len++] = (byte) data; >> } >> >> >> >> >> Trent Jarvi wrote: >>> >>> Hmm. I would do everything you can to avoid read() - one byte at a >>> time. Can you do something like the following? You could nibble >>> smaller pieces but try to get a few at a time at least. >>> >>> if( receivestream.available() > 0 ){ >>> receivestream.read(byteArray,0, receivestream.available()) >>> } >>> ..process byteArray. >>> >>> I'll look at read() but would strongly recommend against getting a >>> byte at a time. It may have something to do with timeout/threshold >>> default settings. >>> >>> Is this a traditional serial port as in a UART on the motherboard? >>> If not, could you give some details about it? >>> >>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>> >>>> Sorry that was Windows XP. >>>> >>>> Tim Alberts wrote: >>>>> Not much more to post than what I said: >>>>> >>>>> if( receivestream.available() > 0 ){ >>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>> buffer.append(rbyte); >>>>> } >>>>> } >>>>> >>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>> special going on. >>>>> >>>>> >>>>> Joe Lauer wrote: >>>>>> Hey Tim, >>>>>> >>>>>> Can you copy and paste the code you have reading from the >>>>>> stream? I'll compare it to the version I have. >>>>>> >>>>>> What OS was this on? >>>>>> >>>>>> -Joe >>>>>> >>>>>> ----- Original Message ----- >>>>>> From: "Tim Alberts" >>>>>> To: rxtx at qbang.org >>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>> Pacific >>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>> >>>>>> Tim Alberts wrote: >>>>>> >>>>>>> The thing that seems to be happening is the >>>>>>> InputStream.available() method returns true, but >>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>> >>>>>> Sorry, that should have been InputStream.available() > 0 returns >>>>>> true, while InputStream.read always returns -1 with RXTX. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090113/01cc2161/attachment-0025.vcf From Paul.Klissner at Sun.COM Tue Jan 13 12:55:18 2009 From: Paul.Klissner at Sun.COM (Paul Klissner) Date: Tue, 13 Jan 2009 11:55:18 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <1F7DE6FE-DE57-4ADD-97CA-CBA618B23B7B@Sun.COM> On Jan 13, 2009, at 11:26 AM, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > I haven't looked this up, but as a programmer I've seen zero mean different things ... sometimes it means 'infinite', sometimes it means 'disable', sometimes it means 'minimum'. Sometimes -1 is used to disable things. So I wouldn't be too shocked if you find it behaving unpredictably in lieu of a clear definition. In this case, if it means 'minimum' instead of 'disable', timeouts would occur instantly. Paul > with Sun javax.comm. I commented these lines out (so they're at > whatever defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone > give a quick explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to > RXTX gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed > some more problems with handshaking, but I'll get to that later > after some more testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with >> no success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly >> report the number of bytes received, and it gets copied to my >> nbytes variable. Then the receivestream.read(buffer, 0, nbytes) is >> called. However after that, my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked >> fine, but not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the >> output when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from >> Netbeans 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard >> comports 1 and 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the >> same time as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port >>> that I'm testing on (COM2). I do have an expansion serial card >>> with 2 more serial ports, plus I have several ethernet and USB to >>> serial converters, but none of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way >>> Communication' reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at >>>> a time. Can you do something like the following? You could >>>> nibble smaller pieces but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting >>>> a byte at a time. It may have something to do with timeout/ >>>> threshold default settings. >>>> >>>> Is this a traditional serial port as in a UART on the >>>> motherboard? If not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real >>>>>> special going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the >>>>>>> stream? I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada >>>>>>> Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the >>>>>>>> InputStream.available() method returns true, but >>>>>>>> InputStream.read() always returns -1 with RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 >>>>>>> returns true, while InputStream.read always returns -1 with >>>>>>> RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Tue Jan 13 18:53:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 13 Jan 2009 18:53:31 -0700 (MST) Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: <496CEADE.6090808@msiscales.com> References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: I assume you have found a bug in the int read() method. Per your settings, it should have blocked until it received a byte. This is an older cheatsheet I put into RXTXPort.java after trying to figure out what is expected. timeout threshold Behavior ------------------------------------------------------------------------ 0 0 blocks until 1 byte is available >0 0 blocks until timeout occurs, returns 0 on timeout >0 >0 blocks until timeout or reads threshold bytes, returns 0 on timeout 0 >0 blocks until reads threshold bytes On Tue, 13 Jan 2009, Tim Alberts wrote: > Good grief I think I found it, thanks to your (Trent's) comment on > Timeout/Threshold. I've always used: > > enableReceiveTimeout( 0 ); > enableReceiveThreshold( 0 ); > > with Sun javax.comm. I commented these lines out (so they're at whatever > defaults are) and ran again, now I'm receiving data! > > So for the sake of the dummies out there (like me)...can someone give a quick > explanation of what these methods do? > > In conclusion (lesson learned) when moving from Sun javax.comm to RXTX > gnu.io, best to try leaving timeout/threshold at defaults. > > Thanks everyone for the support...unfortunately I've already noticed some > more problems with handshaking, but I'll get to that later after some more > testing. > > > Tim Alberts wrote: >> OK, I have tried the suggested method for reading as follows with no >> success. >> >> byte[] buffer = new byte[1024]; >> int nbytes = receivestream.available(); >> if( nbytes > 0 ){ >> receivestream.read(buffer, 0, nbytes); >> ... >> } >> >> The symptoms are, receivestream.available() appears to correctly report the >> number of bytes received, and it gets copied to my nbytes variable. Then >> the receivestream.read(buffer, 0, nbytes) is called. However after that, >> my buffer still contains all 0 for data. >> >> Once again, I've tested this with Sun javax.comm and it worked fine, but >> not with RXTX gnu.io. >> >> I have been testing with the stable version, and it reports to the output >> when the application runs: >> >> Stable Library >> ========================================= >> Native lib Version = RXTX-2.1-7 >> Java lib Version = RXTX-2.1-7 >> >> I'm not trying to use any web install JNLP yet, just running from Netbeans >> 6.5. My Java is Sun 1.5.0_16. I'm testing on motherboard comports 1 and >> 2, so no special hardware involved. >> >> Is there a problem with having Suns javax.comm installed at the same time >> as having RXTX gnu.io installed? >> >> >> Tim Alberts wrote: >>> I'll try that and report back. It is a motherboard serial port that I'm >>> testing on (COM2). I do have an expansion serial card with 2 more serial >>> ports, plus I have several ethernet and USB to serial converters, but none >>> of which I'm testing on. >>> >>> I would point out that the Wiki page 'Event Based Two Way Communication' >>> reads one byte at a time: >>> >>> int len = 0; >>> while ( ( data = in.read()) > -1 ) >>> { >>> if ( data != '\n' ) { >>> break; >>> } >>> buffer[len++] = (byte) data; >>> } >>> >>> >>> >>> >>> Trent Jarvi wrote: >>>> >>>> Hmm. I would do everything you can to avoid read() - one byte at a time. >>>> Can you do something like the following? You could nibble smaller pieces >>>> but try to get a few at a time at least. >>>> >>>> if( receivestream.available() > 0 ){ >>>> receivestream.read(byteArray,0, receivestream.available()) >>>> } >>>> ..process byteArray. >>>> >>>> I'll look at read() but would strongly recommend against getting a byte >>>> at a time. It may have something to do with timeout/threshold default >>>> settings. >>>> >>>> Is this a traditional serial port as in a UART on the motherboard? If >>>> not, could you give some details about it? >>>> >>>> On Fri, 9 Jan 2009, Tim Alberts wrote: >>>> >>>>> Sorry that was Windows XP. >>>>> >>>>> Tim Alberts wrote: >>>>>> Not much more to post than what I said: >>>>>> >>>>>> if( receivestream.available() > 0 ){ >>>>>> while( (rbyte = receivestream.read()) > -1 ){ >>>>>> buffer.append(rbyte); >>>>>> } >>>>>> } >>>>>> >>>>>> Same as used in the sample code on the RXTX Wiki. Nothing real special >>>>>> going on. >>>>>> >>>>>> >>>>>> Joe Lauer wrote: >>>>>>> Hey Tim, >>>>>>> >>>>>>> Can you copy and paste the code you have reading from the stream? >>>>>>> I'll compare it to the version I have. >>>>>>> >>>>>>> What OS was this on? >>>>>>> >>>>>>> -Joe >>>>>>> >>>>>>> ----- Original Message ----- >>>>>>> From: "Tim Alberts" >>>>>>> To: rxtx at qbang.org >>>>>>> Sent: Friday, January 9, 2009 11:30:54 AM GMT -08:00 US/Canada Pacific >>>>>>> Subject: Re: [Rxtx] Unsuccessful move from javax.comm to gnu.io >>>>>>> >>>>>>> Tim Alberts wrote: >>>>>>> >>>>>>>> The thing that seems to be happening is the InputStream.available() >>>>>>>> method returns true, but InputStream.read() always returns -1 with >>>>>>>> RXTX. >>>>>>>> >>>>>>> Sorry, that should have been InputStream.available() > 0 returns true, >>>>>>> while InputStream.read always returns -1 with RXTX. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> From jaakko.sipari at gmail.com Tue Jan 13 22:48:11 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:48:11 +0200 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io In-Reply-To: References: <1806729083.3521231530057621.JavaMail.root@zimbra-01.cloudhopper.lan> <4967B439.6090109@msiscales.com> <4967B502.4080305@msiscales.com> <496B7A4E.70003@msiscales.com> <496CE311.4000708@msiscales.com> <496CEADE.6090808@msiscales.com> Message-ID: <901f25b80901132148h4548e52fn327bd27f69c8876d@mail.gmail.com> On Wed, Jan 14, 2009 at 3:53 AM, Trent Jarvi wrote: > > I assume you have found a bug in the int read() method. Per your > settings, it should have blocked until it received a byte. This is an > older cheatsheet I put into RXTXPort.java after trying to figure out what > is expected. > > timeout threshold Behavior > ------------------------------------------------------------------------ > 0 0 blocks until 1 byte is available > >0 0 blocks until timeout occurs, returns 0 on timeout > >0 >0 blocks until timeout or reads threshold bytes, > returns 0 on timeout > 0 >0 blocks until reads threshold bytes > Shouldn't read() still always return a byte when there is something available (checked with .available())? Actually it also seems Tim has used read(byte[], offset, length) instead of the simple read() so shouldn't that one also function correctly? Or does it just use consecutive read() calls which would mean every read implementation is broken since read() is broken. > On Tue, 13 Jan 2009, Tim Alberts wrote: > > > Good grief I think I found it, thanks to your (Trent's) comment on > > Timeout/Threshold. I've always used: > > > > enableReceiveTimeout( 0 ); > > enableReceiveThreshold( 0 ); > > > > with Sun javax.comm. I commented these lines out (so they're at whatever > > defaults are) and ran again, now I'm receiving data! > Does anyone know what the defaults actually are then? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/5fe6050a/attachment-0025.html From jaakko.sipari at gmail.com Tue Jan 13 22:56:49 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Wed, 14 Jan 2009 07:56:49 +0200 Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize Message-ID: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Hi (again)! Could someone clarify what these methods actually do and are they even implemented? Do I get into trouble with buffer values of 0 (if I want to handle the buffers myself)? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090114/8f118ac3/attachment-0025.html From tjarvi at qbang.org Wed Jan 14 18:56:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 14 Jan 2009 18:56:50 -0700 (MST) Subject: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> Message-ID: On Wed, 14 Jan 2009, Jaakko Sipari wrote: > Hi (again)! > > Could someone clarify what these methods actually do and are they even > implemented? Do I get into trouble with buffer values of 0 (if I want to > handle the buffers myself)? > rxtx does not have buffers. It was not clear to me at the time why there would be a buffer when java already provides buffered input and output streams that can sit on top of rxtx. One reason I can see for implementing buffers in rxtx is to get data off the port so select() can block. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Wed Jan 14 23:23:08 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 15 Jan 2009 08:23:08 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> Message-ID: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Here's the same message for the list also. Forgot to do "Reply to all" ---------- Forwarded message ---------- From: Jaakko Sipari Date: Thu, Jan 15, 2009 at 8:22 AM Subject: Re: [Rxtx] The functionality behind setInputBufferSize & setOutputBufferSize To: Trent Jarvi On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! >> >> Could someone clarify what these methods actually do and are they even >> implemented? Do I get into trouble with buffer values of 0 (if I want to >> handle the buffers myself)? >> >> > rxtx does not have buffers. It was not clear to me at the time why there > would be a buffer when java already provides buffered input and output > streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data off > the port so select() can block. > So basically those methods have currently no effect at all? - Jaakko -- Jaakko Sipari tel. +358451238191 eMail. jaakko.sipari at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090115/8b4c47c0/attachment-0024.html From tjarvi at qbang.org Thu Jan 15 18:37:12 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 15 Jan 2009 18:37:12 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: On Thu, 15 Jan 2009, Jaakko Sipari wrote: > Here's the same message for the list also. Forgot to do "Reply to all" > > ---------- Forwarded message ---------- > From: Jaakko Sipari > Date: Thu, Jan 15, 2009 at 8:22 AM > Subject: Re: [Rxtx] The functionality behind setInputBufferSize & > setOutputBufferSize > To: Trent Jarvi > > > On Thu, Jan 15, 2009 at 3:56 AM, Trent Jarvi wrote: > On Wed, 14 Jan 2009, Jaakko Sipari wrote: > > Hi (again)! > > Could someone clarify what these methods actually do > and are they even > implemented? Do I get into trouble with buffer > values of 0 (if I want to > handle the buffers myself)? > > > rxtx does not have buffers. ?It was not clear to me at the time why > there would be a buffer when java already provides buffered input and > output streams that can sit on top of rxtx. > > One reason I can see for implementing buffers in rxtx is to get data > off the port so select() can block. > > > So basically those methods have currently no effect at all? > Correct. You can use BufferedInputStream and BufferedOutputStream from the Java API once you get the Input/OutputStream from rxtx. But changing the input and output buffer size in rxtx is not going to change behavior. -- Trent Jarvi tjarvi at qbang.org From jaakko.sipari at gmail.com Fri Jan 16 01:22:37 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Fri, 16 Jan 2009 10:22:37 +0200 Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> Message-ID: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> > So basically those methods have currently no effect at all? >> >> > Correct. You can use BufferedInputStream and BufferedOutputStream from the > Java API once you get the Input/OutputStream from rxtx. But changing the > input and output buffer size in rxtx is not going to change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > I assume there still is some kind of buffer in rxtx (or the serial port driver) in case of processing delays. I mean, if the serial port gives data faster than can be read from the Java program using rxtx it isn't just thrown away, right? - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090116/3bd9a52e/attachment-0023.html From tjarvi at qbang.org Fri Jan 16 05:17:24 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 16 Jan 2009 05:17:24 -0700 (MST) Subject: [Rxtx] Fwd: The functionality behind setInputBufferSize & setOutputBufferSize In-Reply-To: <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> References: <901f25b80901132156m120a3a2dv6fc27293f2f7711c@mail.gmail.com> <901f25b80901142222l2e56865fkbc65e1c9395d60f8@mail.gmail.com> <901f25b80901142223t6c87e609nd58525a7c291734d@mail.gmail.com> <901f25b80901160022l2e223b99t900cad5b7e3f1c5e@mail.gmail.com> Message-ID: On Fri, 16 Jan 2009, Jaakko Sipari wrote: > > So basically those methods have currently no effect > at all? > > > Correct. ?You can use BufferedInputStream and BufferedOutputStream > from the Java API once you get the Input/OutputStream from rxtx. ?But > changing the input and output buffer size in rxtx is not going to > change behavior. > > -- > > Trent Jarvi > tjarvi at qbang.org > > > > I assume there still is some kind of buffer in rxtx (or the serial port > driver) in case of processing delays. I mean, if the serial port gives data > faster than can be read from the Java program using rxtx it isn't just > thrown away, right? > The UART can usually hold a few bytes. The kernel driver can buffer the input. In practice, it works. With Sun commapi, the typical application has 4 buffers between the user and the incomming data. With rxtx, it is 3. BufferedInputStream -> commapi/rxtx -> kernel driver -> UART If you really do run into overflows on the UART, then hardware flow control is what you should be using and tinkering with rxtx to avoid it is not a very sound approach. -- Trent Jarvi tjarvi at qbang.org From llowrey at nuclearwinter.com Sun Jan 18 12:49:39 2009 From: llowrey at nuclearwinter.com (Larkin Lowrey) Date: Sun, 18 Jan 2009 13:49:39 -0600 Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain Message-ID: <497387D3.9040201@nuclearwinter.com> After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when running code that uses RXTXComm. The crashes only occur when using 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. As far as I can tell, the crash happens immediately on start. I can't see any evidence of much, if anything, happening before the crash. The code used to work and only stopped working after the "upgrade" to FC10. I have tried RXTX v2.1 and 2.2pre1. Any ideas? Here's the error: # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode linux-amd64) # Problematic frame: # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 --Larkin From tjarvi at qbang.org Mon Jan 19 17:48:34 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 19 Jan 2009 17:48:34 -0700 (MST) Subject: [Rxtx] SIGSEGV in Java_gnu_io_RXTXPort_nativeDrain In-Reply-To: <497387D3.9040201@nuclearwinter.com> References: <497387D3.9040201@nuclearwinter.com> Message-ID: On Sun, 18 Jan 2009, Larkin Lowrey wrote: > After "upgrading" from Fedora 8 to Fedora 10 I now get a SIGSEGV when > running code that uses RXTXComm. The crashes only occur when using > 64-bit JVMs. I have tried various 1.5 and 1.6 versions of the Sun JDK/JRE. > > As far as I can tell, the crash happens immediately on start. I can't > see any evidence of much, if anything, happening before the crash. > > The code used to work and only stopped working after the "upgrade" to > FC10. I have tried RXTX v2.1 and 2.2pre1. > > Any ideas? > > Here's the error: > > # > # An unexpected error has been detected by Java Runtime Environment: > # > # SIGSEGV (0xb) at pc=0x00007fa4a7c036e6, pid=948, tid=140345941178704 > # > # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode > linux-amd64) > # Problematic frame: > # C [librxtxSerial.so+0x76e6] Java_gnu_io_RXTXPort_nativeDrain+0xd6 > > > --Larkin Hi Larkin, I can think of 2 segv's in rxtx that may apply. Both are fixed in rxtx 2.2pre.. The first was that pointers required by nativeDrain needed to be stored in something larger than a 32 bit integer in java. This resulted in a crash like you see the first time the 'nativedrain' thread tried to use the pointer. The second was a concurrency issue George resolved with synchronization. The crash was usually during close but happened in the 'nativedrain' thread. (eventLoop) As mentioned, these are both fixed in the prerelease. There is a class provided in recent versions of RXTX that allow you confirm the version being used: gnu.io.RXTXVersion with member methods getVersion() and nativeGetVersion(). This allows you to confirm that you are indeed using the version you think you are. -- Trent Jarvi tjarvi at qbang.org From alexandrepoletto at gmail.com Wed Jan 21 11:48:07 2009 From: alexandrepoletto at gmail.com (Alexandre Poletto) Date: Wed, 21 Jan 2009 16:48:07 -0200 Subject: [Rxtx] work in windows but dont work in linux Message-ID: hi folks, I have an application to communicate with the serial port using rxtx, in the windows os my application works well, but when i try to run in the linux os i open the port (in windows "COM1", in Linux "/dev/ttyS0") send my commandes but i never receive any answer. I'm using ubuntu 8.10 and java 1.5, there is any configuration in that i'm missing? Thanks for the help! ps: Sorry form my bad english :( -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/70baea51/attachment-0017.html From jmudd at dtiweb.net Wed Jan 21 14:08:04 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Wed, 21 Jan 2009 16:08:04 -0500 Subject: [Rxtx] Hot unplugging of a USB device Message-ID: Looking to see if the issues surrounding an uplugging of a USB device have been resolved. I see from the mail list archives and bug reports that others have noted this issue. I have a USB GPS Receiver that is plugged into a Windows (XP) system and am using Netbeans 6.5 and Java jdk 1.6 and RXTX 2.1.7 and 2.2pre1. In the thread that is reading data via listening for a SerialEvent I can capture a Java IOException: No error in readArray. The application is essentially hung at this point. Only a termination of the application will clear it up and not leave the port hung. I had read in the archives that this is because the event loop in the native code portion is continually putting out the exceptions. I had also seen that this might be addressed in future releases. Any help is appreciated. Thanks, Jerry ________________________________ Jerry Mudd Senior Programmer 21795 Shangri-La Drive, Ste C Lexington Park, MD 20653 (301) 737-8893 (301) 737-8897 Fax jmudd at dtiweb.net www.dtiweb.net This message may contain sensitive, proprietary and/or privileged information. Disclosure is not authorized unless provided in writing by Defense Technologies, Inc. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0017.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 6296 bytes Desc: image001.gif Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090121/aac94693/attachment-0017.gif From netbeans at gatworks.com Wed Jan 21 17:33:46 2009 From: netbeans at gatworks.com (U. George) Date: Wed, 21 Jan 2009 19:33:46 -0500 Subject: [Rxtx] Hot unplugging of a USB device In-Reply-To: References: Message-ID: <4977BEEA.4020708@gatworks.com> > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:34 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:34 +1100 Subject: [Rxtx] Part 1 of 2 parts re rxtx 2.2 pre.. and OSX Message-ID: Hi, I have tried out the latest version of rxtx on a mac and can report that running with ImageJ (32 bit ) all seems to be fine. However when I attempt to use it with ImageJ64, I get a crash whenever the serial port is used. The details follow. What I did. Ran our plug-in in ImageJ 64 bit (1.42g) for Measuring, which is using the latest rxtx (the beta 2.2 compiled on 30 December 2008) for MacOSX 10.5.x) I installed this by putting the two files in the directory ~ LIBRARY/JAVA/EXTENSIONS. The Plug-in uses the serial port. The window we put up to show the numbers from the stage appeared, but only with the default "0" (zero) in each row, which is what we put there until we get data back from the port and the device attached. Then it crashed. I should point out that this all works fine using ImageJ (32 bit) 1.42g, on the same platform. So the only difference is the use of ImageJ 64 bit, and I guess the version of rxtx for 64 bit. I hope that cleverer people than me can throw some light onto this little problem. ImageJ64 seems to work ok until rxtx is called, although I haven't tried much so far, just some 3D rendering with 1 Gb of image data, which all went well, apart from the fact that the data was marginal. I am now showing the data supplied by the report to Apple window. This has three tabs, one to write your information in, one called Problem Details, and the third called SYSTEM CONFIG. These are pasted in below. Best wishes Noel Problem Details Process: JavaApplicationStub [463] Path: /Applications/ImageJ/ImageJ64.app/Contents/MacOS/JavaApplicationStub Identifier: gov.nih.info.rsb.ImageJ Version: ??? (10.2) Code Type: X86-64 (Native) Parent Process: launchd [398] Date/Time: 2009-01-19 10:48:09.342 +1100 OS Version: Mac OS X 10.5.6 (9G55) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000000029507c8 Crashed Thread: 16 Application Specific Information: Java information: Exception type: Bus Error (0xa) at pc=0x00000006ff70f418 Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0_07-b06-57 mixed mode macosx-amd64) Current thread (0x00000001020de800): JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] Stack: [0x0000000702851000,0x0000000702951000] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j gnu.io.RXTXPort.readByte()I+0 j gnu.io.RXTXPort$SerialInputStream.read()I+81 j SerialConnection.serialEvent(Lgnu/io/SerialPortEvent;)V+41 j gnu.io.RXTXPort.sendEvent(IZ)Z+382 v ~BufferBlob::StubRoutines (1) j gnu.io.RXTXPort.eventLoop()V+0 j gnu.io.RXTXPort$MonitorThread.run()V+12 v ~BufferBlob::StubRoutines (1) Java Threads: ( => current thread ) =>0x00000001020de800 JavaThread "Thread-2" [_thread_in_native, id=43323392, stack(0x0000000702851000,0x0000000702951000)] 0x00000001020e8800 JavaThread "Measure XYZ" [_thread_blocked, id=44384256, stack(0x0000000702954000,0x0000000702a54000)] 0x0000000102001000 JavaThread "DestroyJavaVM" [_thread_blocked, id=25169920, stack(0x0000000101001000,0x0000000101801000)] 0x00000001020da800 JavaThread "SocketListener" [_thread_in_native, id=29671424, stack(0x0000000701b4c000,0x0000000701c4c000)] 0x00000001020b4800 JavaThread "AWT-EventQueue-0" [_thread_in_Java, id=-27992064, stack(0x00000006fe44e000,0x00000006fe54e000)] 0x0000000102096000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=-34344960, stack(0x00000006fde3f000,0x00000006fdf3f000)] 0x0000000102078000 JavaThread "AWT-Shutdown" [_thread_blocked, id=-58392576, stack(0x00000006fc750000,0x00000006fc850000)] 0x0000000102077800 JavaThread "AWT-AppKit" daemon [_thread_in_native, id=1886770976, stack(0x00007fff5f400000,0x00007fff5fc00000)] 0x0000000102044800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=-333877248, stack(0x00000006ec097000,0x00000006ec197000)] 0x0000000102043000 JavaThread "CompilerThread1" daemon [_thread_blocked, id=-334938112, stack(0x00000006ebf94000,0x00000006ec094000)] 0x0000000102041800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=-335998976, stack(0x00000006ebe91000,0x00000006ebf91000)] 0x0000000102041000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=-337059840, stack(0x00000006ebd8e000,0x00000006ebe8e000)] 0x0000000102029800 JavaThread "Finalizer" daemon [_thread_blocked, id=-338214912, stack(0x00000006ebc74000,0x00000006ebd74000)] 0x0000000102028800 JavaThread "Reference Handler" daemon [_thread_blocked, id=-339333120, stack(0x00000006ebb63000,0x00000006ebc63000)] Other Threads: 0x0000000102020800 VMThread [stack: 0x00000006eba60000,0x00000006ebb60000] [id=-340393984] 0x0000000102046000 WatcherThread [stack: 0x00000006ec19a000,0x00000006ec29a000] [id=-332816384] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 76480K, used 14448K [0x0000000105800000, 0x000000010ad50000, 0x00000002f9800000) eden space 65600K, 22% used [0x0000000105800000, 0x000000010661c398, 0x0000000109810000) from space 10880K, 0% used [0x0000000109810000, 0x0000000109810000, 0x000000010a2b0000) to space 10880K, 0% used [0x000000010a2b0000, 0x000000010a2b0000, 0x000000010ad50000) tenured generation total 174784K, used 0K [0x00000002f9800000, 0x00000003042b0000, 0x00000006e1800000) the space 174784K, 0% used [0x00000002f9800000, 0x00000002f9800000, 0x00000002f9800200, 0x00000003042b0000) compacting perm gen total 21248K, used 10319K [0x00000006e1800000, 0x00000006e2cc0000, 0x00000006e6c00000) the space 21248K, 48% used [0x00000006e1800000, 0x00000006e2213d28, 0x00000006e2213e00, 0x00000006e2cc0000) No shared spaces configured. Virtual Machine Arguments: JVM Args: -Xbootclasspath/a:/System/Library/PrivateFrameworks/JavaApplicationLauncher. framework/Resources/LauncherSupport.jar -Xms256m -Xmx24000m -Dcom.apple.macos.useScreenMenuBar=false -Dcom.apple.mrj.application.growbox.intrudes=false -Dcom.apple.mrj.application.live-resize=true -Dcom.apple.hwaccel=false -Dapple.awt.Antialiasing=false -Dcom.apple.smallTabs=true -Dapple.awt.brushMetalLook=false Java Command: Launcher Type: generic Physical Memory: Page Size = 4k, Total = 2048M, Free = 30996M Thread 0: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 com.apple.CoreFoundation 0x00007fff8204dc4f CFRunLoopRunSpecific + 1631 3 com.apple.HIToolbox 0x00007fff839fdda2 RunCurrentEventLoopInMode + 278 4 com.apple.HIToolbox 0x00007fff839fdbd8 ReceiveNextEventCommon + 322 5 com.apple.HIToolbox 0x00007fff839fda83 BlockUntilNextEventMatchingListInMode + 79 6 com.apple.AppKit 0x00007fff8299d3b0 _DPSNextEvent + 603 7 com.apple.AppKit 0x00007fff8299ccf1 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 136 8 com.apple.AppKit 0x00007fff82996a84 -[NSApplication run] + 455 9 libawt.jnilib 0x00000006ec433257 +[AWTStarter startAWT:] + 1343 10 libawt.jnilib 0x00000006ec432c46 -[CPerformer perform] + 112 11 com.apple.Foundation 0x00007fff8153f2b4 __NSThreadPerformPerform + 148 12 com.apple.CoreFoundation 0x00007fff8204e0e8 CFRunLoopRunSpecific + 2808 13 ...ple.JavaApplicationLauncher 0x0000000100005165 startupJava(LauncherArgsStruct*) + 235 14 ...ple.JavaApplicationLauncher 0x000000010000579c launchJavaApplication + 1224 15 JavaApplicationStub 0x0000000100000b9c 0x100000000 + 2972 Thread 1: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x0000000101a93b61 JVM_GetCPFieldModifiers + 128961 5 libjvm.dylib 0x0000000101a93a36 JVM_GetCPFieldModifiers + 128662 6 ...ple.JavaApplicationLauncher 0x000000010000c0ce startJavaApplication + 2886 7 ...ple.JavaApplicationLauncher 0x000000010000506d java_main_stub(void*) + 9 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 2: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libSystem.B.dylib 0x00007fff840db0b0 mach_msg_server + 436 3 libjvm.dylib 0x000000010181176d JNI_CreateJavaVM_Impl + 53277 4 libjvm.dylib 0x0000000101811375 JNI_CreateJavaVM_Impl + 52261 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 3: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x00000001018e452f JVM_Lseek + 235727 5 libjvm.dylib 0x00000001018e42df JVM_Lseek + 235135 6 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 7 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 8 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 4: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x00000001028003ea 0 + 4336911338 11 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 12 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 13 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 14 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 15 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 16 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 17 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 18 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 19 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 20 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 5: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 6: 0 libSystem.B.dylib 0x00007fff8406dd72 semaphore_wait_trap + 10 1 libjvm.dylib 0x0000000101915bdb JVM_IsPrimitiveClass + 12139 2 libjvm.dylib 0x00000001019155b5 JVM_IsPrimitiveClass + 10565 3 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 4 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 7: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 8: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810bce JNI_CreateJavaVM_Impl + 50302 4 libjvm.dylib 0x000000010191c470 JVM_FindLoadedClass + 2928 5 libjvm.dylib 0x0000000101916af5 JVM_IsPrimitiveClass + 16005 6 libjvm.dylib 0x0000000101916819 JVM_IsPrimitiveClass + 15273 7 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 8 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 9 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 10 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 11 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 9: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x0000000101810cef JNI_CreateJavaVM_Impl + 50591 4 libjvm.dylib 0x0000000101918ec8 JVM_IsPrimitiveClass + 25176 5 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 6 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 7 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 8 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 9 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 10: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101810ef6 JNI_CreateJavaVM_Impl + 51110 3 libjvm.dylib 0x000000010191abb5 JVM_IsPrimitiveClass + 32581 4 libjvm.dylib 0x000000010191a70a JVM_IsPrimitiveClass + 31386 5 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 6 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 7 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 11: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x00000001028003ea 0 + 4336911338 12 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 13 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 14 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 15 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 16 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 17 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 18 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 19 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 20 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 21 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 12: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102803093 0 + 4336922771 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x0000000102803414 0 + 4336923668 12 ??? 0x00000001028003ea 0 + 4336911338 13 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 14 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 15 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 16 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 17 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 18 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 19 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 20 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 21 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 22 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 13: 0 ??? 0x0000000102817034 0 + 4337004596 1 ??? 0x000000010280304e 0 + 4336922702 2 ??? 0x0000000102803093 0 + 4336922771 3 ??? 0x000000010280356d 0 + 4336924013 4 ??? 0x0000000102803093 0 + 4336922771 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x000000010280356d 0 + 4336924013 8 ??? 0x0000000102803093 0 + 4336922771 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803414 0 + 4336923668 11 ??? 0x0000000102802f3a 0 + 4336922426 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102802f3a 0 + 4336922426 14 ??? 0x0000000102802f3a 0 + 4336922426 15 ??? 0x0000000102803162 0 + 4336922978 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102802f3a 0 + 4336922426 19 ??? 0x0000000102802f3a 0 + 4336922426 20 ??? 0x00000001028003ea 0 + 4336911338 21 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 22 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 23 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 24 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 25 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 26 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 27 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 28 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 29 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 30 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 14: 0 libSystem.B.dylib 0x00007fff840f210e accept + 10 1 libnet.jnilib 0x00000006ff6b6b11 Java_java_net_PlainSocketImpl_socketAccept + 277 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x0000000102802f3a 0 + 4336922426 4 ??? 0x0000000102802f3a 0 + 4336922426 5 ??? 0x0000000102802f3a 0 + 4336922426 6 ??? 0x0000000102803093 0 + 4336922771 7 ??? 0x0000000102803414 0 + 4336923668 8 ??? 0x00000001028003ea 0 + 4336911338 9 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 10 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 11 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 12 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 13 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 14 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 15 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 16 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 17 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 18 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 15: 0 libSystem.B.dylib 0x00007fff8406dd36 mach_msg_trap + 10 1 libSystem.B.dylib 0x00007fff84075373 mach_msg + 59 2 libjvm.dylib 0x0000000101811002 JNI_CreateJavaVM_Impl + 51378 3 libjvm.dylib 0x00000001018ff05b JVM_MonitorWait + 10411 4 libjvm.dylib 0x00000001018fe1ff JVM_MonitorWait + 6735 5 libjvm.dylib 0x00000001018fcc3b JVM_MonitorWait + 1163 6 libjvm.dylib 0x00000001018fc93f JVM_MonitorWait + 399 7 ??? 0x000000010280e878 0 + 4336969848 8 ??? 0x0000000102802f3a 0 + 4336922426 9 ??? 0x0000000102802f3a 0 + 4336922426 10 ??? 0x0000000102803093 0 + 4336922771 11 ??? 0x000000010280304e 0 + 4336922702 12 ??? 0x0000000102802f3a 0 + 4336922426 13 ??? 0x0000000102803414 0 + 4336923668 14 ??? 0x0000000102803093 0 + 4336922771 15 ??? 0x0000000102803093 0 + 4336922771 16 ??? 0x0000000102803093 0 + 4336922771 17 ??? 0x0000000102802f3a 0 + 4336922426 18 ??? 0x0000000102803414 0 + 4336923668 19 ??? 0x00000001028003ea 0 + 4336911338 20 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 21 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 22 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 23 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 24 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 25 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 26 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 27 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 28 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 29 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 Crashed: 0 librxtxSerial.jnilib 0x00000006ff70f418 read_byte_array + 68 1 librxtxSerial.jnilib 0x00000006ff70f9b3 Java_gnu_io_RXTXPort_readByte + 93 2 ??? 0x000000010280e878 0 + 4336969848 3 ??? 0x000000010280304e 0 + 4336922702 4 ??? 0x000000010280304e 0 + 4336922702 5 ??? 0x0000000102803414 0 + 4336923668 6 ??? 0x00000001028003ea 0 + 4336911338 7 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 8 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 9 libjvm.dylib 0x00000001018e5be8 JVM_Lseek + 241544 10 libjvm.dylib 0x0000000101900b11 JVM_MonitorWait + 17249 11 libjvm.dylib 0x0000000101a1e59e JVM_DisableCompiler + 1166 12 librxtxSerial.jnilib 0x00000006ff70d91e send_event + 132 13 librxtxSerial.jnilib 0x00000006ff70e82b report_serial_events + 92 14 librxtxSerial.jnilib 0x00000006ff7108c9 Java_gnu_io_RXTXPort_eventLoop + 237 15 ??? 0x000000010280e878 0 + 4336969848 16 ??? 0x0000000102802f3a 0 + 4336922426 17 ??? 0x00000001028003ea 0 + 4336911338 18 libjvm.dylib 0x00000001018e5fa2 JVM_Lseek + 242498 19 libjvm.dylib 0x00000001018e5c09 JVM_Lseek + 241577 20 libjvm.dylib 0x00000001018fc066 JVM_InternString + 2166 21 libjvm.dylib 0x00000001018fbf2b JVM_InternString + 1851 22 libjvm.dylib 0x00000001018fbe7a JVM_InternString + 1674 23 libjvm.dylib 0x00000001018fbda0 JVM_InternString + 1456 24 libjvm.dylib 0x00000001018fb79e JVM_StartThread + 1726 25 libjvm.dylib 0x0000000101810e1c JNI_CreateJavaVM_Impl + 50892 26 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 27 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 17: 0 libSystem.B.dylib 0x00007fff84074d02 __semwait_signal + 10 1 libSystem.B.dylib 0x00007fff840dce91 usleep + 57 2 librxtxSerial.jnilib 0x00000006ff70d729 drain_loop + 45 3 libSystem.B.dylib 0x00007fff8409bdcb _pthread_start + 316 4 libSystem.B.dylib 0x00007fff8409bc8d thread_start + 13 Thread 16 crashed with X86 Thread State (64-bit): rax: 0x00000000029507c0 rbx: 0x0000000000000041 rcx: 0x0000000000000065 rdx: 0x0000000000000002 rdi: 0x00000006ff71205e rsi: 0x00000006ff711c67 rbp: 0x0000000702950000 rsp: 0x000000070294fef0 r8: 0x000000000000004d r9: 0x00000006e21d64c0 r10: 0x00000006e21d38e8 r11: 0x00000000000000d2 r12: 0x00000001020de998 r13: 0x00000006e21d93b0 r14: 0x0000000000000032 r15: 0x00000000029507c0 rip: 0x00000006ff70f418 rfl: 0x0000000000010202 cr2: 0x00000000029507c8 Continued in the message part 2 -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From Noel.Goldsmith at dsto.defence.gov.au Wed Jan 21 20:05:41 2009 From: Noel.Goldsmith at dsto.defence.gov.au (Goldsmith, Noel) Date: Thu, 22 Jan 2009 14:05:41 +1100 Subject: [Rxtx] Part 2 re rxtx 2.2 pre... and MacOSX Message-ID: Continued from Part 1. Binary Images: 0x100000000 - 0x100000fff JavaApplicationStub ??? (???) /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationS tub 0x100004000 - 0x100011fff com.apple.JavaApplicationLauncher 12.2.0 (12.2.0) /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/JavaApplicationLauncher 0x10001a000 - 0x100022ffd com.apple.JavaVM 12.2.0 (12.2.0) <2b178e8d4bbcc0aa427c2f3f71bb2fcb> /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM 0x100055000 - 0x10005dff0 libverify.dylib ??? (???) <56eac95084cb86cd1339a721b1353182> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libveri fy.dylib 0x100063000 - 0x10006cffb JavaNativeFoundation ??? (???) <68ca6409dc49542301edda1e0744ac69> /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNative Foundation.framework/Versions/A/JavaNativeFoundation 0x1000a8000 - 0x1000c7fef libjava.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjava .jnilib 0x1000d8000 - 0x1000e5ffb libzip.jnilib ??? (???) <5b6dce7c9a1f25aa5dff1a633c9dc342> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libzip. jnilib 0x101803000 - 0x101eafff3 libjvm.dylib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bundle/Libra ries/libjvm.dylib 0x6ec2c5000 - 0x6ec2c6fff liblauncher.jnilib ??? (???) <567fa54a222b965b2c4aefea21d9800a> /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions /A/Resources/liblauncher.jnilib 0x6ec431000 - 0x6ec5e4fff libawt.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libawt. jnilib 0x6fdc3b000 - 0x6fdc3cfff ATSHI.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/Resources/ATSHI.dylib 0x6fdd6e000 - 0x6fdd6efff libcmm.jnilib ??? (???) <114e1a620a6920d77bf09bd57a7f7d52> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libcmm. jnilib 0x6fdd9e000 - 0x6fde1fff7 libfontmanager.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libfont manager.jnilib 0x6fdf41000 - 0x6fdf8ffff libsuncmm.jnilib ??? (???) <47330f1f17822de3a5cf921e07615cf7> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libsunc mm.jnilib 0x6fdf95000 - 0x6fdfc4ff7 libjpeg.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libjpeg .jnilib 0x6ff6ae000 - 0x6ff6baffb libnet.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnet. jnilib 0x6ff6c0000 - 0x6ff6c4fff libnio.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libnio. jnilib 0x6ff6d4000 - 0x6ff6e8ff7 libdcpr.jnilib ??? (???) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/libdcpr .jnilib 0x6ff70c000 - 0x6ff713fff +librxtxSerial.jnilib ??? (???) <5133deacebd01ceab7d528c541241956> /Library/Java/Extensions/librxtxSerial.jnilib 0x6ff734000 - 0x6ff74bfef libJapaneseConverter.dylib ??? (???) <64cca6bb4650a269f49a8427507e4963> /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib 0x70204f000 - 0x702218fef com.apple.RawCamera.bundle 2.0.10 (2.0.10) /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera 0x7fff5fc00000 - 0x7fff5fc2e643 dyld 97.1 (???) /usr/lib/dyld 0x7fff80003000 - 0x7fff80146ffb com.apple.audio.toolbox.AudioToolbox 1.5.2 (1.5.2) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x7fff801d2000 - 0x7fff801d5ffb com.apple.help 1.1 (36) <9000c05ccad96fdcc25bc35264abf587> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.frame work/Versions/A/Help 0x7fff801d6000 - 0x7fff80211fff com.apple.AE 402.2 (402.2) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.f ramework/Versions/A/AE 0x7fff80212000 - 0x7fff80257fef libRIP.A.dylib ??? (???) <8c818d7fd3dc57839ac48caf107ff4c0> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x7fff80258000 - 0x7fff8029bfef com.apple.QD 3.11.54 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/QD.framework/Versions/A/QD 0x7fff8029c000 - 0x7fff802dffef libTIFF.dylib ??? (???) <86be7909f46cc044a887cbb60ab7826d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x7fff802e0000 - 0x7fff803d4fff libobjc.A.dylib ??? (???) <118dc1ae05e685ad64290352fc94f1f0> /usr/lib/libobjc.A.dylib 0x7fff803d5000 - 0x7fff8045dfe7 libsqlite3.0.dylib ??? (???) <3c7ab3523b816dbd3e039ee7e6e2c580> /usr/lib/libsqlite3.0.dylib 0x7fff8045e000 - 0x7fff80466ffa libbsm.dylib ??? (???) <4d838c0d8a74fe61c781a53a8723303d> /usr/lib/libbsm.dylib 0x7fff80467000 - 0x7fff80497fff com.apple.shortcut 1 (1.0) <9822328df9321a661af3afcc841e8f80> /System/Library/PrivateFrameworks/Shortcut.framework/Versions/A/Shortcut 0x7fff80498000 - 0x7fff8049bfff com.apple.securityhi 3.0 (30817) <00ddd6e60692b62b7649573eab8aef5a> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI .framework/Versions/A/SecurityHI 0x7fff8049c000 - 0x7fff8049efff com.apple.print.framework.Print 218.0.2 (220.1) <2b847a0a1cd885f596a4d10409d50ba3> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.fram ework/Versions/A/Print 0x7fff8049f000 - 0x7fff805dbfe9 com.apple.ImageIO.framework 2.0.4 (2.0.4) <47dcdc0b5986b2c157e0b6dae48ce464> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/ImageIO 0x7fff805dc000 - 0x7fff805f9fef com.apple.CoreVideo 1.5.1 (1.5.1) <78253b3fe8d3dcc90f159d7ed866c295> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x7fff805fa000 - 0x7fff8068bfff com.apple.SearchKit 1.2.1 (1.2.1) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Sear chKit.framework/Versions/A/SearchKit 0x7fff8068c000 - 0x7fff80e49fef libBLAS.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libBLAS.dylib 0x7fff80e4a000 - 0x7fff81416fff com.apple.CoreGraphics 1.407.2 (???) <436dbc70f8c9b29b3beb1d2de220acf2> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/CoreGraphics 0x7fff81417000 - 0x7fff8141dfff com.apple.DiskArbitration 2.2.1 (2.2.1) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitrat ion 0x7fff8141e000 - 0x7fff8145bff7 com.apple.SystemConfiguration 1.9.2 (1.9.2) <150119d0cecb0c80f6736b9881c2411e> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemCo nfiguration 0x7fff8145c000 - 0x7fff81523fec com.apple.CFNetwork 422.11 (422.11) <570ca46de3b907cb1c8e33fc62f562b4> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNe twork.framework/Versions/A/CFNetwork 0x7fff81524000 - 0x7fff8152dfff libCGATS.A.dylib ??? (???) <722a0bbd58740d46739008e881010631> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib 0x7fff8152e000 - 0x7fff81533fff com.apple.CommonPanels 1.2.4 (85) <2cec1ecc95cf1ecea8bea030975a46b8> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPane ls.framework/Versions/A/CommonPanels 0x7fff81534000 - 0x7fff817cffe3 com.apple.Foundation 6.5.7 (677.22) <8134977fcc57198a53dc494b60592980> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x7fff817d0000 - 0x7fff817d0ffd com.apple.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x7fff817d1000 - 0x7fff81cf1fc6 libGLProgrammability.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgra mmability.dylib 0x7fff81cf2000 - 0x7fff81cf4fff com.apple.NavigationServices 3.5.2 (163) <7cb7f3fe7f9d56ec89ef28a6d3a1da7d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Navigation Services.framework/Versions/A/NavigationServices 0x7fff81cf5000 - 0x7fff81d32fe7 com.apple.coreui 1.2 (62) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x7fff81d33000 - 0x7fff81d33fff com.apple.Carbon 136 (136) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x7fff81d34000 - 0x7fff81d42fff libCSync.A.dylib ??? (???) <61f6cc104b3e9b77cd583635a3a9a5cf> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x7fff81d43000 - 0x7fff81d45ff9 libRadiance.dylib ??? (???) <6d9f2235e8f70a7aedfc59383a7548d8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x7fff81d46000 - 0x7fff81db5ff9 com.apple.print.framework.PrintCore 5.5.3 (245.3) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/PrintCore.framework/Versions/A/PrintCore 0x7fff81db6000 - 0x7fff81db6ff8 com.apple.ApplicationServices 34 (34) <81cd02cc2ccf4e47e51d03db860da556> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Applicat ionServices 0x7fff81db7000 - 0x7fff81dd8fff libresolv.9.dylib ??? (???) <38318f9fbcfbdb384e0f9b08cc0e757a> /usr/lib/libresolv.9.dylib 0x7fff81dd9000 - 0x7fff81e4ffef libvMisc.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvMisc.dylib 0x7fff81e50000 - 0x7fff81e52ff7 libffi.dylib ??? (???) <920bb19728451f35703bb95dc908c7ca> /usr/lib/libffi.dylib 0x7fff81e53000 - 0x7fff81eeefe7 com.apple.ink.framework 101.3 (86) <60c6579faf114ea9677fd9ae25389ed2> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framew ork/Versions/A/Ink 0x7fff81eef000 - 0x7fff81f0dfff libPng.dylib ??? (???) <4017eab74319a648dfd73b7d503e557d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x7fff81f0e000 - 0x7fff81f24ff9 com.apple.ImageCapture 5.0.1 (5.0.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCaptu re.framework/Versions/A/ImageCapture 0x7fff81f25000 - 0x7fff81f3dfff com.apple.DictionaryServices 1.0.0 (1.0.0) <78ea11e9a92120f76d69efa24b8d1f95> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Dict ionaryServices.framework/Versions/A/DictionaryServices 0x7fff81f3e000 - 0x7fff81f42fff libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib 0x7fff81f43000 - 0x7fff81fe3fe3 com.apple.ApplicationServices.ATS 3.4 (???) <47cf09bf78935889f17f1b6b09badf0d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ATS.framework/Versions/A/ATS 0x7fff81fe4000 - 0x7fff8211bfff com.apple.CoreFoundation 6.5.5 (476.17) <51930d43c7c2d8fb24148cbfc05bba0f> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundatio n 0x7fff8211c000 - 0x7fff82126fff com.apple.speech.recognition.framework 3.7.24 (3.7.24) <2399374b096b284345daba82e2cb833d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechReco gnition.framework/Versions/A/SpeechRecognition 0x7fff82127000 - 0x7fff82159ff7 libauto.dylib ??? (???) /usr/lib/libauto.dylib 0x7fff8215a000 - 0x7fff821cefe7 libstdc++.6.dylib ??? (???) <565ee6f798f7fef6f804c60682787280> /usr/lib/libstdc++.6.dylib 0x7fff821cf000 - 0x7fff8228dfff edu.mit.Kerberos 6.0.12 (6.0.12) /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x7fff8228e000 - 0x7fff8228effb com.apple.installserver.framework 1.0 (8) /System/Library/PrivateFrameworks/InstallServer.framework/Versions/A/Install Server 0x7fff8228f000 - 0x7fff82293fff libGIF.dylib ??? (???) <66436b84211fe0e723051eab15af0aca> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x7fff82294000 - 0x7fff8258ffe3 com.apple.CoreServices.CarbonCore 786.10 (786.10) <2ac701edf3ca98a86ae9d5f733200b40> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Carb onCore.framework/Versions/A/CarbonCore 0x7fff82590000 - 0x7fff825aafff libvDSP.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libvDSP.dylib 0x7fff825ab000 - 0x7fff827b1ff3 com.apple.security 5.0.4 (34102) <47c559b17c1f51998e7a981d0fbec4c8> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x7fff827b2000 - 0x7fff827d9fff libxslt.1.dylib ??? (???) /usr/lib/libxslt.1.dylib 0x7fff827da000 - 0x7fff82948fff libicucore.A.dylib ??? (???) <374ddaf141bf88dba00ab9058f2dbad6> /usr/lib/libicucore.A.dylib 0x7fff82949000 - 0x7fff8295dff7 libGL.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x7fff8295e000 - 0x7fff83286fff com.apple.AppKit 6.5.6 (949.43) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x7fff83287000 - 0x7fff83667fef com.apple.QuartzCore 1.5.7 (1.5.7) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x7fff83668000 - 0x7fff836b8fe7 com.apple.Metadata 10.5.2 (398.25) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Meta data.framework/Versions/A/Metadata 0x7fff836b9000 - 0x7fff836baff3 com.apple.audio.units.AudioUnit 1.5 (1.5) /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x7fff836bb000 - 0x7fff83710fe3 com.apple.HIServices 1.7.0 (???) <6bef766448d67adb91901b432629ea0f> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/HIServices.framework/Versions/A/HIServices 0x7fff83711000 - 0x7fff83711ffd com.apple.Accelerate.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/vecLib 0x7fff83712000 - 0x7fff837a7ffb com.apple.LaunchServices 290.3 (290.3) <56544e16c5192d2ce72df772901fcaef> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Laun chServices.framework/Versions/A/LaunchServices 0x7fff837a8000 - 0x7fff8382ffef com.apple.audio.CoreAudio 3.1.1 (3.1.1) <9c1714647fd7515c900362ad2ac76874> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x7fff83830000 - 0x7fff83893fef libGLU.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dyli b 0x7fff83894000 - 0x7fff838a2ff9 com.apple.helpdata 1.0.1 (14.2) /System/Library/PrivateFrameworks/HelpData.framework/Versions/A/HelpData 0x7fff838a3000 - 0x7fff838afff1 libgcc_s.1.dylib ??? (???) <23fa31a628c1ea8a62ac529fa333b6e1> /usr/lib/libgcc_s.1.dylib 0x7fff838b0000 - 0x7fff838d2fff libJPEG.dylib ??? (???) <4257ab268996bbeb93b47946df181cdc> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x7fff838d3000 - 0x7fff838d3ffd com.apple.Accelerate 1.4.2 (Accelerate 1.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x7fff838d4000 - 0x7fff838d4ff8 com.apple.Cocoa 6.5 (???) <8c59f679ffbd9178134df1d83dedde28> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa 0x7fff838d5000 - 0x7fff839cafff libxml2.2.dylib ??? (???) <8226d1180354f493954c5fa1fc0e1154> /usr/lib/libxml2.2.dylib 0x7fff839cb000 - 0x7fff839dafe7 com.apple.opengl 1.5.9 (1.5.9) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x7fff839db000 - 0x7fff83cc2feb com.apple.HIToolbox 1.5.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox. framework/Versions/A/HIToolbox 0x7fff83cc3000 - 0x7fff83d03fef com.apple.framework.IOKit 1.5.1 (???) <17e6707127a60c5e2d7a9bd2b7bf2db0> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x7fff83d04000 - 0x7fff83dc8fe2 com.apple.vImage 3.0 (3.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage .framework/Versions/A/vImage 0x7fff83dc9000 - 0x7fff83df3fff libcups.2.dylib ??? (???) /usr/lib/libcups.2.dylib 0x7fff83df4000 - 0x7fff83df4ffa com.apple.CoreServices 32 (32) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x7fff83df5000 - 0x7fff83ed6fff libcrypto.0.9.7.dylib ??? (???) <66f1f8773bd9fdfdcfd09e2b4b010636> /usr/lib/libcrypto.0.9.7.dylib 0x7fff83ed7000 - 0x7fff83f87fef com.apple.CoreServices.OSServices 226.5 (226.5) <1c38f727b3ad3293272db7323b37c735> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSSe rvices.framework/Versions/A/OSServices 0x7fff83f88000 - 0x7fff83fa2fff com.apple.openscripting 1.2.8 (???) <0674c4e3353c677c9f58df3297ae559b> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScript ing.framework/Versions/A/OpenScripting 0x7fff83fa3000 - 0x7fff83fdfff7 libGLImage.dylib ??? (???) <02258bcdbe8defdb254acc077a81dd9b> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage. dylib 0x7fff83fe0000 - 0x7fff83ff1fff com.apple.speech.synthesis.framework 3.7.1 (3.7.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x7fff83ff2000 - 0x7fff8406cff3 com.apple.CoreText 2.0.3 (???) <827bbfef670df72316719c25bfb39915> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/CoreText.framework/Versions/A/CoreText 0x7fff8406d000 - 0x7fff841f8ffb libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0x7fff841f9000 - 0x7fff8420affd libz.1.dylib ??? (???) /usr/lib/libz.1.dylib 0x7fff8420b000 - 0x7fff842befef com.apple.DesktopServices 1.4.7 (1.4.7) /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/D esktopServicesPriv 0x7fff842bf000 - 0x7fff84677fff libLAPACK.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib .framework/Versions/A/libLAPACK.dylib 0x7fff84678000 - 0x7fff84743fef com.apple.ColorSync 4.5.1 (4.5.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Framewor ks/ColorSync.framework/Versions/A/ColorSync 0x7fff84744000 - 0x7fff84847feb com.apple.CoreData 100.1 (186) <074abc7f43f81f7885e4d0674a8be4bc> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x7fffffe00000 - 0x7fffffe01780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0xfffffffffffec000 - 0xfffffffffffeffff libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib SYSTEM CONFIG Model: MacPro3,1, BootROM MP31.006C.B05, 8 processors, Quad-Core Intel Xeon, 2.8 GHz, 32 GB Graphics: kHW_ATIrv630Item, ATI Radeon HD 2600, spdisplays_pcie_device, 256 MB Memory Module: DIMM Riser B/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 2, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser B/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 3, 4 GB, DDR2 FB-DIMM, 800 MHz Memory Module: DIMM Riser A/DIMM 4, 4 GB, DDR2 FB-DIMM, 800 MHz Bluetooth: Version 2.1.3f8, 2 service, 1 devices, 1 incoming serial ports Network Service: Ethernet 2, Ethernet, en1 PCI Card: ATI Radeon HD 2600, display, Slot-1 Serial ATA Device: WDC WD3200AAJS-41VWA0, 298.09 GB Parallel ATA Device: PIONEER DVD-RW DVR-112D USB Device: Keyboard Hub, (null) mA USB Device: Apple Optical USB Mouse, (null) mA USB Device: Apple Keyboard, (null) mA USB Device: hub_device, (null) mA USB Device: Apple Cinema HD Display, (null) mA USB Device: Keyspan USA-28Xb, (null) mA USB Device: Bluetooth USB Host Controller, (null) mA FireWire Device: built-in_hub, unknown_value, unknown_speed FireWire Device: My Book, WD, 800mbit_speed FireWire Device: unknown_device, unknown_value, unknown_speed -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au -- Noel Goldsmith Air Vehicles Division Defence Science and Technology Organisation 506 Lorimer Street Port Melbourne Vic 3207 Ph 03 96267527 Fax 03 96267089 Mobile 0428364003 Noel.goldsmith at dsto.defence.gov.au IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From jaakko.sipari at gmail.com Thu Jan 22 03:00:03 2009 From: jaakko.sipari at gmail.com (Jaakko Sipari) Date: Thu, 22 Jan 2009 12:00:03 +0200 Subject: [Rxtx] RXTX compilation with GCJ possible? Message-ID: <901f25b80901220200s53792317o374b80cbb6066a52@mail.gmail.com> Hi! Does anyone have experience on using RXTX in a GCJ compiled Java application? I'm interested whether this is possible in Windows and/or in Linux platforms. And of course what does it take to get it work, or does it just work out of the box. Ultimately my aim here would be to move to a more time deterministic system by utilizing GCJ, jRate & Javolution and possibly run the RXTX (and other important) threads at a priority higher than the garbage collector. This of course would require some modification for the RXTX threads to run in a Javolution pool context or non allocating real time contexts so they wouldn't produce any garbage, but that's something to hack on later. For now I'd just like to know if there are any obstacles on the road to compiling & running RXTX with GCJ. - Jaakko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/5592681a/attachment-0017.html From jmudd at dtiweb.net Thu Jan 22 06:21:03 2009 From: jmudd at dtiweb.net (Jerry Mudd) Date: Thu, 22 Jan 2009 08:21:03 -0500 Subject: [Rxtx] Hot unplugging of a USB device References: <4977BEEA.4020708@gatworks.com> Message-ID: U. George, Thanks for the information. How did you resolve your USB/GPS device on Linux? My application has to run on both Linux and Windows eventually. Thanks, Jerry -----Original Message----- From: U. George [mailto:netbeans at gatworks.com] Sent: Wednesday, January 21, 2009 7:34 PM To: Jerry Mudd Cc: rxtx at qbang.org Subject: Re: [Rxtx] Hot unplugging of a USB device > I had read in the archives that this is because the event loop in the > native code portion is continually putting out the exceptions. I had > also seen that this might be addressed in future releases. > Actually, most of the native code is trying to processing i/o error. It does not realize that there is no recovery to the I/O channel once the device is removed. On unix, the device is not software removed until the channel is closed. If you plug the USB back in, while the channel has not been closed, the linux kernel will create a second USB device. In unix there is no error code for 'device unplugged' . So it gets to be a problem to determine what to do ( ie u know u unplugged the device, but how do u tell the program that the I/O error is just that. ) I had fixed this issue for my USB/GPS device(s) on linux. From m.kirkland at comcast.net Thu Jan 22 09:21:01 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Thu, 22 Jan 2009 08:21:01 -0800 Subject: [Rxtx] Serial port control lines change with call to getPortIdentifiers() on Linux Message-ID: <94443DEFFD574B6CA8DDB2B201D9E007@bengal.net> Hi All ! I have noticed an issue with RXTX on Ubuntu Linux 8.10 that has prevented me from being able to use RXTX on Linux. I have noticed this issue on both the rxtx 2.1.7 and the new rxtx2.2pre1. When I execute the following line to get the ports on a system - java.util.Enumeration portEnum = CommPortIdentifier.getPortIdentifiers(); Both DTR and RTS become active on ttyS0 and only ttyS0, not ttyS1 (I only have 2 ports). I see this prior to opening any ports or making any other calls to RXTX. I have stepped it though with the debugger and I am sure this is the trigger. My application uses these control lines to perform functions other then the standard flow control so it is critical that I be able to control them exactly. I would also think that folks using RXTX for more standard serial IO would also have issues with devices starting to talk before a listener was ready. I checked Windows XP and I do not see this issue (but I only have a com1 on the Windows computer). I also noticed that the DTR line blips when setting up a port on 2.2.pre1 like it does on 2.1.7r2. This it the same issue that the folks at http://www.codeskin.com/ patched. I see this issue on both Linux and Windows XP. Any help or clues would be greatly appreciated. If I can provide any additional info or do any testing I would be glad to help out to get version 2.2 in top shape for release. BTW I have written a simple dynamic loader to load the RXTX jar and native code that is drive by the os.name and os.arch system properties. I would be more then happy to contribute this to the project if folks though it would be useful. Its more convenient then having to manage copying the files around to various JVM's. TNX Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090122/eab26bae/attachment-0016.html From josefk_5 at yahoo.com Fri Jan 23 09:44:06 2009 From: josefk_5 at yahoo.com (Josef Kahsay) Date: Fri, 23 Jan 2009 08:44:06 -0800 (PST) Subject: [Rxtx] Help on Accessing RS232 Message-ID: <509617.88308.qm@web38205.mail.mud.yahoo.com> Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS From m.kirkland at comcast.net Sat Jan 24 01:28:52 2009 From: m.kirkland at comcast.net (Mike Kirkland) Date: Sat, 24 Jan 2009 00:28:52 -0800 Subject: [Rxtx] Help on Accessing RS232 In-Reply-To: <509617.88308.qm@web38205.mail.mud.yahoo.com> References: <509617.88308.qm@web38205.mail.mud.yahoo.com> Message-ID: <665887C02E1446708CE392FE0BD73D79@bengal.net> It seems to me that you are having a classic java classpath issue. Java classpath issues can be annoying to solve sometimes. As some random guesses I would suggest you look at the following. 1 - You might not be running the JVM from the location that you think you are (gets me all the time). I which Windows had a which command. 2 - You don't mention what development environment you are using like Eclipse etc., and if you are trying to run the demo from inside the development environment. If so, do whatever is appropriate for the development environment to control the classpath. In Eclipse this would involve adding a "User Library" to point to the jar and native code. 3 - Once you get the classpath ok, the next thing you might run into is not being able to load the native library. 4 - I have found that on XP I can place the RXTX jar and native library in the same directory as my application's jar file (and a class-path entry in the application's jar file manifest) and it all works. 5 - If you need more control of managing different versions of RXTX for different OS platforms, I have a dynamic RXTX loader I can send you (but I recommend getting the simple case working first). Let me know if this helps. Mike -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Josef Kahsay Sent: Friday, January 23, 2009 8:44 AM To: rxtx at qbang.org Subject: [Rxtx] Help on Accessing RS232 Hello there! I appreciate the work you have done so far. It's my first time to do a project which requires access through the serial port. My OS is Windows XP, and I have used the 'rxtx-2.1-7-bins-r2'. I have put the RXTXcomm.jar in ..\jre\lib\ext and rxtxSerial.dll in ..\jre\bin. Then I tried to test it for the SerialDemo found in the Sun's CommAPI example package. I have also changed the import statements from 'javax.comm' to 'gnu.io' in each of the files. The compilation was successful with the command: javac *.java. But when I tried to run it as follows: java SerialDeom, it generated the following errors. Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethod(Unknown Source) at java.awt.Component.isCoalesceEventsOverriden(Unknown Source) at java.awt.Component.access$300(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.awt.Component$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Component.checkCoalescing(Unknown Source) at java.awt.Component.(Unknown Source) at java.awt.Container.(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at SerialDemo.(SerialDemo.java:94) at SerialDemo.main(SerialDemo.java:81) Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 27 more Can you please help me solve this problem? Your help is crucial. I am stuck. Before I proceed with my project, I need to make sure that this example from Sun works correctly. Thanks in advance for all your co-operation. JOS _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From jacomoman at hotmail.com Mon Jan 26 12:12:27 2009 From: jacomoman at hotmail.com (Joseph Schmoley) Date: Mon, 26 Jan 2009 11:12:27 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: Message-ID: Hi All, First, let me thank you all for your effort on this excellent project. I've been using the Win32 binaries in the 2.1-7r2 package without any problems on WinXP Pro (32-bit). I then tried the .jnilib of the same version on my Mac OSX 10.5 64-bit darwin and got the familiar UnsatisfiedLinkError problem. I read up on all the mailing list archive messages and found this one (http://mailman.qbang.org/pipermail/rxtx/2008-May/2436699.html) suggesting that perhaps rxtx-devel from CVS would have a fix. So I got latest rxtx-devel + commapi-0-0-1 as suggested by the CVS page at rxtx.org. I even set my CFLAGS and LDFLAGS to include "-arch x86_64 -arch ppc64", but as it turned out, the latest configure script didn't need it. In any case, I configured and built rxtx-devel with no errors (that I could see) and transferred the resulting i386-apple-darwin9.6.0/librxtxSerial.jnilib to where my java.library.path is pointing to and ran my test class. Whereas before I was getting UnsatisfiedLinkError, I now simply get this: Invalid memory access of location 22d927c8 rip=22356420 Invalid memory access of location 22d9292c rip=22357540 [error occurred during error reporting (null), id 0xa] ./run-class.sh: line 10: 15647 Segmentation fault java -Djava.library.path=./lib/native -Dapp.logging.file.path=./log/runtime.log -classpath .:${MYCP} ${CLASSNAME} "${CMD}" run-class.sh is simply a script I've got to run my test class and all that class does is invoke the RXTX API, first one being: CommPortIdentifier.getPortIdentifiers(). Has anyone had any luck with getting latest CVS sources to work on Mac OS X 10.5 64-bit? Any help/pointers would be greatly appreciated. Thank you in advance. -Jac I've attached my configure and make output as txt files. Here's all my build/machine environment info, as per the troubleshooting wiki page: Mac OS X 10.5.6 (9G55) ----------------------------------------------- /usr/bin/java -version java version "1.6.0_07" Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153) Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode) ----------------------------------------------- Darwin my-macbook.local 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 ----------------------------------------------- autoconf (GNU Autoconf) 2.61 Copyright (C) 2006 Free Software Foundation, Inc. This is free software. You may redistribute copies of it under the terms of the GNU General Public License . There is NO WARRANTY, to the extent permitted by law. Written by David J. MacKenzie and Akim Demaille. ----------------------------------------------- automake (GNU automake) 1.10 Written by Tom Tromey and Alexandre Duret-Lutz . Copyright 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ----------------------------------------------- $ libtool -V Apple Computer, Inc. version cctools-698.1 ----------------------------------------------- GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program built for powerpc-apple-darwin9.0 ----------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: my-configure.out.txt Type: application/octet-stream Size: 6934 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090126/89d9c7f6/attachment-0024.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: my-make.out.txt Type: application/octet-stream Size: 7737 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090126/89d9c7f6/attachment-0025.obj From kintel at sim.no Mon Jan 26 16:16:19 2009 From: kintel at sim.no (Marius Kintel) Date: Tue, 27 Jan 2009 00:16:19 +0100 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: Message-ID: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Hi Jac, I've had the same issue, and I suggested a patch to partially fix it a while back: http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html I don't know the status of this in the current incarnation of the rxtx code and I have reverted to Java-1.5 since then.. ~/= Marius -- We are Elektropeople for a better living. From tjarvi at qbang.org Tue Jan 27 08:08:54 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 27 Jan 2009 08:08:54 -0700 (MST) Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: On Tue, 27 Jan 2009, Marius Kintel wrote: > Hi Jac, > > I've had the same issue, and I suggested a patch to partially fix it a > while back: > http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html > > I don't know the status of this in the current incarnation of the rxtx > code and I have reverted to Java-1.5 since then.. > > ~/= Marius > > -- > We are Elektropeople for a better living. > Hmm. That did not get in. I can add it and put a new prerelease out this week. The eis must be a regression. I was sure we fixed that. -- Trent Jarvi tjarvi at qbang.org From jacomoman at hotmail.com Tue Jan 27 08:48:16 2009 From: jacomoman at hotmail.com (Joseph Schmoley) Date: Tue, 27 Jan 2009 07:48:16 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: That would be excellent Trent. I've got a project partially on hold because of this. It runs great on Win32 (XP/Vista), it just has to do the same on Mac 64-bit and Linux 32-bit. I look forward to this pre-release. Again, thanks a bunch to you and all the other code contributors for this excellent project. I wish I could donate something to you guys. I couldn't find a donation link anywhere. RxTx has been a great help with my project. -Jac From: Trent Jarvi Sent: Tuesday, January 27, 2009 7:08 AM To: Marius Kintel Cc: Joseph Schmoley ; rxtx at qbang.org Subject: Re: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit On Tue, 27 Jan 2009, Marius Kintel wrote: > Hi Jac, > > I've had the same issue, and I suggested a patch to partially fix it a > while back: > http://mailman.qbang.org/pipermail/rxtx/2008-June/3636818.html > > I don't know the status of this in the current incarnation of the rxtx > code and I have reverted to Java-1.5 since then.. > > ~/= Marius > > -- > We are Elektropeople for a better living. > Hmm. That did not get in. I can add it and put a new prerelease out this week. The eis must be a regression. I was sure we fixed that. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090127/bbd287bb/attachment-0011.html From bschlining at gmail.com Tue Jan 27 09:38:26 2009 From: bschlining at gmail.com (Brian Schlining) Date: Tue, 27 Jan 2009 08:38:26 -0800 Subject: [Rxtx] Latest CVS rxtx-devel on Mac OS X 10.5.6 64-bit In-Reply-To: References: <386DF92A-EDF8-4870-8DF5-1F032A725E55@sim.no> Message-ID: > That would be excellent Trent. I've got a project partially on hold > because of this. It runs great on Win32 (XP/Vista), it just has to do the > same on Mac 64-bit and Linux 32-bit. I look forward to this pre-release. > I'm in the same spot too. Looking forward to the pre-release! -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlining at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090127/2275013b/attachment-0011.html From andrew.paverd at rorotika.com Wed Jan 28 03:14:58 2009 From: andrew.paverd at rorotika.com (Andrew Paverd) Date: Wed, 28 Jan 2009 12:14:58 +0200 Subject: [Rxtx] RXTX not working on Solaris Message-ID: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Hi all, I am attempting to use RXTX on a Sun SPARC server running Solaris. I have tried the binaries from both the latest release (2.1-7) and the pre-release (2.2pre1). The 2.1-7 driver gives the following error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: fatal: libgcc_s.so.1: open failed: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)" I'm not sure what this "libgcc_s.so.1" file does in terms of RXTX but its absence is preventing the application from running. With the 2.2pre1 binary, the application loads without any issue but does not detect any comm-ports. I know that there are multiple ports available because when using the Sun javax.comm library for Solaris SPARC, the ports are all correctly discovered and the application can read from and write to them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in the 2.2 release. Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if so, how did you do it (which versions did you use etc.)? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090128/a97b220d/attachment-0011.html From tjarvi at qbang.org Wed Jan 28 17:01:50 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 28 Jan 2009 17:01:50 -0700 (MST) Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: On Wed, 28 Jan 2009, Andrew Paverd wrote: > > Hi all, > > ? > > I am attempting to use RXTX on a Sun SPARC server running Solaris. I have > tried the binaries from both the latest release (2.1-7) and the pre-release > (2.2pre1). > > ? > > The 2.1-7 driver gives the following error: > > ? > > ?Exception in thread "main" java.lang.UnsatisfiedLinkError: > /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: > fatal: libgcc_s.so.1: open failed: No such file or directory > > ??????? at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > ??????? at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) > > ??????? at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) > > ??????? at java.lang.Runtime.loadLibrary0(Runtime.java:823) > > ??????? at java.lang.System.loadLibrary(System.java:1030) > > ??????? at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)? > > ? > > I?m not sure what this ?libgcc_s.so.1? file does in terms of RXTX but its > absence is preventing the application from running. > > ? > > With the 2.2pre1 binary, the application loads without any issue but does > not detect any comm-ports. I know that there are multiple ports available > because when using the Sun javax.comm library for Solaris SPARC, the ports > are all correctly discovered and the application can read from and write to > them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in > the 2.2 release. > > ? > > Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if > so, how did you do it (which versions did you use etc.)? > > ? Hi Andrew ld.so/libgcc_s.so are part of GNU gcc/ld. They are available for solaris. I'm not sure how to link them without requiring them. It is also possible to compile rxtx with Sun's compiler if you have it. Perhaps someone here knows how to get rxtx compiled on Solaris using gcc without requiring those libs by everyone? -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Jan 28 17:39:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 28 Jan 2009 17:39:08 -0700 (MST) Subject: [Rxtx] Problem on 'Trouble Shooting' wiki page. Message-ID: It has been pointed out that the rxtx wiki page says usermod -G may be used to update the group a user is in. http://rxtx.qbang.org/wiki/index.php/Trouble_shooting The corrected text now says to use usermod -aG to add the user to a group in addition to their current group(s). The previous -G version would replace the users current groups with the new group. Replacing group information can cause significant problems for end users. If you have information based upon the wiki, please update your content. Thanks, -- Trent Jarvi tjarvi at qbang.org From andrew.paverd at rorotika.com Thu Jan 29 02:15:35 2009 From: andrew.paverd at rorotika.com (Andrew Paverd) Date: Thu, 29 Jan 2009 11:15:35 +0200 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Thanks for the advice Trent - I was originally using the precompiled librxtxSerial.so. I've subsequently compiled rxtx for Solaris (using gcc) and after copying the libgcc_s.so file to my .../jre/lib/sparc directory, the library loads. However, it does not detect any ports. When I call the getComPortIdentifiers() nothing is returned and I can't connect to any port. Sun's javax.comm package detects and can connect to all the ports. This is the same as when I tried the 2.2pre1 library. Are there any extra steps that must be taken to detect ports on Solaris? (user is member of uucp group) Thanks, Andrew From tristan.dyer at cgi.com Thu Jan 29 05:57:25 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 29 Jan 2009 07:57:25 -0500 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D030BE152@MTL-MSG-02.cgiclients.com> Andrew, I had the same problem, but before I got too far the scope of my project changed, and I don't have to support Solaris anymore.. I was getting a weird error, file does not exist but should, or something like that. The project ended before I figured out why. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Andrew Paverd Sent: January 29, 2009 5:16 AM To: 'Trent Jarvi' Cc: rxtx at qbang.org Subject: Re: [Rxtx] RXTX not working on Solaris Thanks for the advice Trent - I was originally using the precompiled librxtxSerial.so. I've subsequently compiled rxtx for Solaris (using gcc) and after copying the libgcc_s.so file to my .../jre/lib/sparc directory, the library loads. However, it does not detect any ports. When I call the getComPortIdentifiers() nothing is returned and I can't connect to any port. Sun's javax.comm package detects and can connect to all the ports. This is the same as when I tried the 2.2pre1 library. Are there any extra steps that must be taken to detect ports on Solaris? (user is member of uucp group) Thanks, Andrew _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From Martin.Oberhuber at windriver.com Thu Jan 29 06:15:01 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:15:01 +0100 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2326@ism-mail03.corp.ad.wrs.com> Hi Andrew & Paverd, the trick of compiling with gcc on Solaris such that the libgcc_s.so library is not needed at runtime is that gcc itself must be configured and compiled with special options: cd gcc-src ./configure --disable-shared make Using that specially compiled gcc, you can then build the RXTX library: setenv PATH $HOME/my-gcc/bin:$PATH cd rxtx mkdir build-solaris && cd build-solaris ../configure --disable-lockfiles make For more details, see the original bug and its attachments: http://bugzilla.qbang.org/show_bug.cgi?id=73 An rxtx-2.1-7r2 build for Solaris without libgcc_s dependency is available from the Eclipse packages at http://rxtx.qbang.org/eclipse/downloads/ Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm ________________________________ From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Andrew Paverd Sent: Mittwoch, 28. J?nner 2009 11:15 To: rxtx at qbang.org Subject: [Rxtx] RXTX not working on Solaris Hi all, I am attempting to use RXTX on a Sun SPARC server running Solaris. I have tried the binaries from both the latest release (2.1-7) and the pre-release (2.2pre1). The 2.1-7 driver gives the following error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0/jre/lib/sparc/librxtxSerial.so: ld.so.1: java: fatal: libgcc_s.so.1: open failed: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)" I'm not sure what this "libgcc_s.so.1" file does in terms of RXTX but its absence is preventing the application from running. With the 2.2pre1 binary, the application loads without any issue but does not detect any comm-ports. I know that there are multiple ports available because when using the Sun javax.comm library for Solaris SPARC, the ports are all correctly discovered and the application can read from and write to them. I hope that this is a bug in the 2.2pre1 binary which will be fixed in the 2.2 release. Has anyone managed to get RXTX working on Solaris (or OpenSolaris) and if so, how did you do it (which versions did you use etc.)? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090129/d6d73f3e/attachment-0010.html From Martin.Oberhuber at windriver.com Thu Jan 29 06:16:38 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:16:38 +0100 Subject: [Rxtx] RXTX not working on Solaris In-Reply-To: <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> References: <000001c98131$47ef8570$d7ce9050$@paverd@rorotika.com> <000001c981f2$280f4d50$782de7f0$@paverd@rorotika.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E232A@ism-mail03.corp.ad.wrs.com> Hi Andrew, one thing I did notice on Solaris was that after closing a port, the Solaris Kernel seems to have some timeout before it can be re-opened. So, when you try it again, make sure that no other application hogs the port or has been hogging it shortly before. It may make sense to try a few times. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Andrew Paverd > Sent: Donnerstag, 29. J?nner 2009 10:16 > To: 'Trent Jarvi' > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX not working on Solaris > > Thanks for the advice Trent - I was originally using the > precompiled librxtxSerial.so. I've subsequently compiled rxtx > for Solaris (using gcc) and after copying the libgcc_s.so > file to my .../jre/lib/sparc directory, the library loads. > > However, it does not detect any ports. When I call the > getComPortIdentifiers() nothing is returned and I can't > connect to any port. Sun's javax.comm package detects and can > connect to all the ports. This is the same as when I tried > the 2.2pre1 library. > > Are there any extra steps that must be taken to detect ports > on Solaris? (user is member of uucp group) > > Thanks, > > > Andrew > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From Martin.Oberhuber at windriver.com Thu Jan 29 06:24:05 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:24:05 +0100 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2335@ism-mail03.corp.ad.wrs.com> Hi Greg, sorry for the late response (just catching up on E-Mails). I do not plan to create any Eclipse bundles before rxtx-2.2 is released. Creating the packages is a bit of an effort, which I'd rather postpone until the release, and then do it only once. In the meantime, if you need it for testing, I think it should be easy to take the existing Eclipse bundles/fragments and simply replace any new DLL's / so's in them, plus use WinZIP to replace the .class files in the Java bundle. For Eclipse, it will still look like rxtx-2.1-7 but in reality it will be your own latest build. Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Trent Jarvi > Sent: Sonntag, 04. J?nner 2009 20:42 > To: Greg Johnson > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] [Announce] RXTX 2.2pre1 is available. > > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse > packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be > a popular > spam abuse page. I'll put a license and download link on there. All > other pages are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > > > Hi Trent, > > The download link on rxtx.org > (http://users.frii.com/jarvi/rxtx/) loops back > > to rxtx.org, and the wiki doesn't seem to have a link (top > level at least) to > > download. I think Martin had been generating > (fantastically useful) Eclipse > > bundles, as well - are these available for 2.2pre1 also? > > > > Many thanks to everyone for their work - rxtx is an > essential part of our > > product, and we have been keenly awaiting this release. > > > > Regards, > > greg > > > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > > > >> > >> The binaries, source and pending wiki move are now announced on > >> http://www.rxtx.org. After this has baked, we can put > the web install in. > >> > >> Changes in rxtx 2.2 (If I missed something let me know): > >> ... snip ... > >> > >> -- > >> Trent Jarvi > >> tjarvi at qbang.org_______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > -- > > Greg Johnson, PhD > > Director of Engineering > > http://www.rbr-global.com > > greg.johnson at rbr-global.com > > +1.613.233.1621 (GMT-5) office > > > > > > See us at: Ocean Business 2009, Southampton, England, March > 31 - April 1, > > 2009 > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From Martin.Oberhuber at windriver.com Thu Jan 29 06:32:57 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:32:57 +0100 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> Message-ID: <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> Hi Tristan, > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); I think that this code is wrong. User code must not call the RXTXCommDriver constructor, since you cannot initialize it properly. What you can do to announce previously unknown port names is this: System.setProperty("gnu.io.rxtx.SerialPorts","/dev/term/a"); before you first access any RXTX function. For details, see the code in RXTXCommDriver#registerSpecifiedPorts() > What is the output of System.getProperty("os.name") on OpenSolaris? I didn't see any response of yours to this question from Trent. What does OpenSolaris output? Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Trent Jarvi > Sent: Mittwoch, 31. Dezember 2008 20:04 > To: Dyer, Tristan > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX for OpenSolaris 2008.11 > > > > On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > > > > Hi, > > > > I have tried building the rxtx library for OpenSolaris 2008.11. > > > > It seemed to build fine without errors, however code such as > > > > ????? java.util.Enumeration portList > > ???????? = CommPortIdentifier.getPortIdentifiers(); > > ????? boolean found = false; > > ????? while (portList.hasMoreElements()) { > > ???????? portId = (CommPortIdentifier) portList.nextElement(); > > ???????? System.out.println(" " + portId.getName()); > > ???????? if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > > ?????????? ???? ?? System.out.println("found"); > > ?????????????? found = true; > > ?????????????? break; > > ??????????? } > > ???????? } > > ????? } > > Will output nothing. > > > > Or rather it seems as if there are no ports found by RXTX. > This code works > > on Ubuntu8.04 and winXP. > > > > If I Add the port manually and then try and open the port > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > > ????? try{ > > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > > ????? } > > ????? catch(Exception e){ > > ??? ??? ? System.out.println("NoSuchPortException"); > > ??? ??? ? //ignore > > ????? } > > ????? try { > > ??????? ???????? System.out.println("opening port"); > > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > > WAIT_TO_OPEN); > > ??????????? connected = true; > > ??????????? System.out.println("Connected to port " + > portId.getName()); > > ???????? } catch (PortInUseException p) { > > ??????????? if (DEBUG) { > > ?????????????? System.err.println(p); > > ??????????? } > > ??????????? port = null; > > ??????????? portId = null; > > ??????????? System.out.println("PortInUseException"); > > ??????????? p.printStackTrace(); > > ???????? } > > > > I will get the following, but not the NoSuchPortException. > > > > java.lang.reflect.InvocationTargetException > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Caused by: java.lang.NullPointerException > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:296) > > > > ??????? ... 7 more > > > > > > As well as > > > > java.lang.NullPointerException > > ??????? at > gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > > ??????? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > > ??????? at > > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:255) > > > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > > > Did I build it wrong? Or is there a problem with > OpenSolaris that will > > prevent this from working? Or am I missing something > incredibly simple? > > > > As well OpenSolaris is running inside a VM with COM1 mapped to > > COM1(VirtualBox) which I believe maps it to /dev/term/a > > > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > > > > > Hi Tristan? > > What is the output of System.getProperty("os.name") on > OpenSolaris? We > have logic like the following in RXTX to handle platform specific > information: > > if ( osName.equals("Solaris") || osName.equals("SunOS")) > > Which may not be getting hit. The result if you will never > call private > void checkSolaris(String PortName, int PortType). > > It could also result in Solaris specific settings not being > set in the > Makefile. > > > The os.name is displayed when you run the configure script. > > -- > Trent Jarvi > tjarvi at qbang.org > From Martin.Oberhuber at windriver.com Thu Jan 29 06:38:20 2009 From: Martin.Oberhuber at windriver.com (Oberhuber, Martin) Date: Thu, 29 Jan 2009 14:38:20 +0100 Subject: [Rxtx] [Suspected Spam][Blocked Sender] how do you dynamically reload native libraries? In-Reply-To: References: Message-ID: <460801A4097E3D4CA04CC64EE6485848094E2341@ism-mail03.corp.ad.wrs.com> Hi Douglas, Eclipse / OSGi may be doing what you want. It does say that multiple versions of a lib can co-exist at the same time, when the MANIFEST.MF doesn't specify a lib as a singleton. I'm not sure though if or how that would work with native libs. Eclipse bundles for RXTX-2.1-7r2 are available on http://rxtx.qbang.org/eclipse/downloads/ You could build RXTX-2.2pre and then manually create those Eclipse bundles just by adding the MANIFEST.MF to the JAR with the version number exchanged. Then you should be able to try it out. If you do, let me know how it goes... Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] > On Behalf Of Dr. Douglas Lyon > Sent: Samstag, 27. Dezember 2008 15:00 > To: rxtx at qbang.org; lyon at docjava.com > Subject: [Suspected Spam][Blocked Sender][Rxtx] how do you > dynamically reload native libraries? > > Hi All, > I am trying to test multiple versions of the RXTX native libraries > in a single JVM. > > Each RXTX library instance can share a single virtual machine, but > must have an isolated context class loader. > A context class loader maps a thread to specific classes and > resources. > When the thread dies, the classes and resources are freed. > > Is there some way to have multiple context class loaders that can > load different native method > library implementations? > > Thanks! > - Doug > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tristan.dyer at cgi.com Thu Jan 29 07:50:05 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Thu, 29 Jan 2009 09:50:05 -0500 Subject: [Rxtx] RXTX for OpenSolaris 2008.11 In-Reply-To: <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> References: <9DA32B4D8579AF44AD96C1CC2E9C518D02F1A160@MTL-MSG-02.cgiclients.com> <460801A4097E3D4CA04CC64EE6485848094E233C@ism-mail03.corp.ad.wrs.com> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D030BE22B@MTL-MSG-02.cgiclients.com> Sorry, I had sent it to Trent alone. It outputs "SunOS" Also I had only added that line as a test to see if explicitly adding the port would make a difference, it didn't. My project scope has been reduced so I don't need to support solaris anymore, but I will return to the problem when things slow down. I do remember that the error that was being reported by the native code was "2" which I believe maps to "ENOENT No such file or directory A file name is specified and the file should exist but doesn't, or one of the directories in a path name does not exist." I didn't get much farther. Thanks, -- Tristan Dyer -----Original Message----- From: Oberhuber, Martin [mailto:Martin.Oberhuber at windriver.com] Sent: January 29, 2009 9:33 AM To: Trent Jarvi; Dyer, Tristan Cc: rxtx at qbang.org Subject: RE: [Rxtx] RXTX for OpenSolaris 2008.11 Hi Tristan, > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); I think that this code is wrong. User code must not call the RXTXCommDriver constructor, since you cannot initialize it properly. What you can do to announce previously unknown port names is this: System.setProperty("gnu.io.rxtx.SerialPorts","/dev/term/a"); before you first access any RXTX function. For details, see the code in RXTXCommDriver#registerSpecifiedPorts() > What is the output of System.getProperty("os.name") on OpenSolaris? I didn't see any response of yours to this question from Trent. What does OpenSolaris output? Cheers, -- Martin Oberhuber, Senior Member of Technical Staff, Wind River Target Management Project Lead, DSDP PMC Member http://www.eclipse.org/dsdp/tm > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Mittwoch, 31. Dezember 2008 20:04 > To: Dyer, Tristan > Cc: rxtx at qbang.org > Subject: Re: [Rxtx] RXTX for OpenSolaris 2008.11 > > > > On Wed, 31 Dec 2008, Dyer, Tristan wrote: > > > > > Hi, > > > > I have tried building the rxtx library for OpenSolaris 2008.11. > > > > It seemed to build fine without errors, however code such as > > > > ????? java.util.Enumeration portList > > ???????? = CommPortIdentifier.getPortIdentifiers(); > > ????? boolean found = false; > > ????? while (portList.hasMoreElements()) { > > ???????? portId = (CommPortIdentifier) portList.nextElement(); > > ???????? System.out.println(" " + portId.getName()); > > ???????? if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > ??????????? if (portId.getName().equalsIgnoreCase(portname)) { > > ?????????? ???? ?? System.out.println("found"); > > ?????????????? found = true; > > ?????????????? break; > > ??????????? } > > ???????? } > > ????? } > > Will output nothing. > > > > Or rather it seems as if there are no ports found by RXTX. > This code works > > on Ubuntu8.04 and winXP. > > > > If I Add the port manually and then try and open the port > > ????? gnu.io.CommPortIdentifier.addPortName("/dev/term/a", > > CommPortIdentifier.PORT_SERIAL, new RXTXCommDriver()); > > ????? try{ > > ????? portId = CommPortIdentifier.getPortIdentifier(portname); > > ????? } > > ????? catch(Exception e){ > > ??? ??? ? System.out.println("NoSuchPortException"); > > ??? ??? ? //ignore > > ????? } > > ????? try { > > ??????? ???????? System.out.println("opening port"); > > ??????????? port = (gnu.io.SerialPort) portId.open(this.printerName, > > WAIT_TO_OPEN); > > ??????????? connected = true; > > ??????????? System.out.println("Connected to port " + > portId.getName()); > > ???????? } catch (PortInUseException p) { > > ??????????? if (DEBUG) { > > ?????????????? System.err.println(p); > > ??????????? } > > ??????????? port = null; > > ??????????? portId = null; > > ??????????? System.out.println("PortInUseException"); > > ??????????? p.printStackTrace(); > > ???????? } > > > > I will get the following, but not the NoSuchPortException. > > > > java.lang.reflect.InvocationTargetException > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > Caused by: java.lang.NullPointerException > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:296) > > > > ??????? ... 7 more > > > > > > As well as > > > > java.lang.NullPointerException > > ??????? at > gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:800) > > ??????? at > gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:343) > > ??????? at > > net.leaguedata.printing.SerialPrinter.(SerialPrinter.java:123) > > ??????? > atnet.leaguedata.printing.ef4565.PrinterEF4565.(PrinterE > F4565.java:255) > > > > ??????? at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > ??????? > atsun.reflect.NativeConstructorAccessorImpl.newInstance(Native > ConstructorAcce > > ssorImpl.java:39) > > ??????? > atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(De > legatingConstru > > ctorAccessorImpl.java:27) > > ??????? at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.printerFactory > (PrintQueueMana > > gerImpl.java:406) > > ??????? > atnet.leaguedata.printing.PrintQueueManagerImpl.(PrintQu > eueManagerImpl. > > java:77) > > ??????? at net.leaguedata.printing.PrintServer.main(Unknown Source) > > > > Did I build it wrong? Or is there a problem with > OpenSolaris that will > > prevent this from working? Or am I missing something > incredibly simple? > > > > As well OpenSolaris is running inside a VM with COM1 mapped to > > COM1(VirtualBox) which I believe maps it to /dev/term/a > > > > Same thing with Ubuntu 8.04 and /dev/ttyS0 works perfectly. > > > > > Hi Tristan > > What is the output of System.getProperty("os.name") on OpenSolaris? > We have logic like the following in RXTX to handle platform specific > information: > > if ( osName.equals("Solaris") || osName.equals("SunOS")) > > Which may not be getting hit. The result if you will never call > private void checkSolaris(String PortName, int PortType). > > It could also result in Solaris specific settings not being set in the > Makefile. > > > The os.name is displayed when you run the configure script. > > -- > Trent Jarvi > tjarvi at qbang.org > From hho at bibliotheca.dk Thu Jan 29 08:00:49 2009 From: hho at bibliotheca.dk (Hans Hvelplund Odborg) Date: Thu, 29 Jan 2009 16:00:49 +0100 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: I know that there arent any guarantees, but could someone involved with the development of RxTx please guesstimate when 2.2 final will be released? I'm not familiar with the pre-release history of 2.1-7 but I read that there was 20 pre-relases of 2.1-7 so I guess (based on current pre-release rate) that 2.2 may easily be more than 6 months away? Thanks Med venlig hilsen / Best regards / Med v?nliga h?lsningar Hans Hvelplund Odborg BIBLIOTHECA A/S Vallensb?kvej 22A, 2. TH ? 2605 Br?ndby ? Denmark Mob.: +45 30235940 Tel.: +45 70271008 Fax: +45 70271009 hho at bibliotheca.dk www.bibliotheca.dk -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: 4. januar 2009 20:15 To: rxtx at qbang.org Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Jan 29 08:33:33 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 29 Jan 2009 08:33:33 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: Projects tend to evolve from an adhoc release process to predictable releases when enough projects demand it (and help make it happen). "Its ready when Its ready" is a typical answer prior to the above. I lik$ to say "The beatings will continue until moral improves." I expect moral to improve in the next six months at most. This release i$ resolving 3 larger issues. 1) syncing of some large efforts to the same source code. 2) incorperating all community patches 3) building the binaries correctly. This does not include fixing everyones bugs. But it does include making sure the fixes get in if they are provided. Given the above, I don't expect this to be as drawn out as 2.1-7pre*. We may have several stable releases during the same period. On Thu, 29 Jan 2009, Hans Hvelplund Odborg wrote: > I know that there arent any guarantees, but could someone involved with the > development of RxTx please guesstimate when 2.2 final will be released? > > I'm not familiar with the pre-release history of 2.1-7 but I read that there > was 20 pre-relases of 2.1-7 so I guess (based on current pre-release rate) > that 2.2 may easily be more than 6 months away? > > Thanks > > Med venlig hilsen / Best regards / Med v?nliga h?lsningar > Hans Hvelplund Odborg > > BIBLIOTHECA A/S > Vallensb?kvej 22A, 2. TH ? 2605 Br?ndby ? Denmark > Mob.: +45 30235940 > Tel.: +45 70271008 > Fax: +45 70271009 > hho at bibliotheca.dk > www.bibliotheca.dk > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: 4. januar 2009 20:15 > To: rxtx at qbang.org > Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. > > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org. After this has baked, we can put the web install > in. > > Changes in rxtx 2.2 (If I missed something let me know): > > threshold fix > Alexandre Rusev > http://bugzilla.qbang.org/show_bug.cgi?id=85 > > RXTX close deadlocks in REXTXPort.finalize > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=53 > > Add ACM serial devices to all known ports. > Duncan Pierce > http://bugzilla.qbang.org/show_bug.cgi?id=51 > > Concurrency fixes for SMP/multicore systems > U. George > http://bugzilla.qbang.org/show_bug.cgi?id=100 > > Fixes for MAC systems with no drivers installed. > 1.5 stop bit fix > > Enable universal library builds for Mac OS X > Andre-John Mas ajmas at sympatico.ca > > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > Do not remove and ignore interrupts. > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=45 > > find ports which were added after program startup on Mac > OS X. > Martin Oberhuber > http://bugzilla.qbang.org/show_bug.cgi?id=48 > > Clean up CommPort Ownership code, avoid possible deadlocks, > fix lost commport ownership events. > Martin Oberhuber > http://bugzilla.qbang.org/show_bug.cgi?id=83 > > rxtx does not compile against JDK-1.6 > Neboj?a > http://bugzilla.qbang.org/show_bug.cgi?id=84 > > configure script failed at line UTS_RELEASE > megov > http://bugzilla.qbang.org/show_bug.cgi?id=80 > > code cleanup patch (extra ';' creates bug for if statements > + new String() calls removed) > Xavier Le Vourch > http://bugzilla.qbang.org/show_bug.cgi?id=77 > > Wont compile on linux ppc with glibc 2.5 - no sys/io.h > Brian Johnson > http://bugzilla.qbang.org/show_bug.cgi?id=72 > > rxtx overwrites System properties > Andrew Gillett > Nektarios K. Papadopoulos > Neboj?a > http://bugzilla.qbang.org/show_bug.cgi?id=64 > > Solaris ACM port support > Dave Cleal > http://bugzilla.qbang.org/show_bug.cgi?id=59 > > Setting of non-standard baud rate fails. > Andrew Prunicki > http://bugzilla.qbang.org/show_bug.cgi?id=58 > > RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=50 > > JavaDoc fixes > Joachim Buechse > http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > From mmornati at byte-code.com Fri Jan 30 02:32:44 2009 From: mmornati at byte-code.com (Marco Mornati) Date: Fri, 30 Jan 2009 10:32:44 +0100 Subject: [Rxtx] Linux Library Message-ID: <1233307964.4046.19.camel@localhost.localdomain> Hello, I made a little Applet added to my web application to support BarCode printer (on serial port). All is autoconfigured during applet init: dll/so are copied on /tmp folder on local computer and with System.load(/tmp/library.so/dll) I'm adding the library to classpath. On windows all works correctly and I'm able to print (jar is signed... without signing it there's no way to communicate with serial port). I've just a little problem on linux. It seams that library is not added to classpath, because when I try to connect with com port, applet says that is impossible to find .so. Any idea on what could be the problem? Just for information I post here my code: Container content = getContentPane(); content.setBackground(Color.white); content.setLayout(new FlowLayout()); String libraryFile = ""; String libraryName = ""; if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")) { libraryName = DLL_SERIAL_NAME; libraryFile = System.getProperty("java.io.tmpdir") + DLL_SERIAL_NAME; } else if (System.getProperty("os.name").toUpperCase().contains("LINUX")) { if (System.getProperty("os.arch").contains("i386")) { libraryName = SO_SERIAL_NAME_32; } else { libraryName = SO_SERIAL_NAME_64; } char fileSeparator = System.getProperty("file.separator").charAt(0); libraryFile = System.getProperty("java.io.tmpdir") + fileSeparator + SO_SERIAL_NAME; } System.out.println("Library File: " + libraryFile); /** * Copying DLL to java bin dir (if it's not already present) */ if (!verifyLibraryExistence(libraryFile)) { System.out.println("Library file does not exist"); copyResourceFromJar(libraryFile, libraryName); } try { System.load(libraryFile); } catch (Exception e) { System.out.println("Cannot load " + libraryFile + " you have to install it manually!!"); } try { content.add(new JLabel("Initializing Applet!")); Enumeration portList = CommPortIdentifier.getPortIdentifiers(); content.add(new JLabel("List Porte: " + portList)); if (portList == null) { content.add(new JLabel("No Serial Port Found!!")); } while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if ((portId.getPortType() == CommPortIdentifier.PORT_SERIAL)) { System.out.println("Porta Trovata: " + portId.getName()); content.add(new JLabel("Porta Trovata: " + portId.getName())); } break; } } catch (Exception e) { content.add(new JLabel("Exception: " + e)); e.printStackTrace(); } Thanks a lot Bye Marco -- Dott. Ing. Mornati Marco Byte-Code s.r.l via Antonio Cechov, 1 San Giuliano Milanese (MI) E-Mail: mmornati at byte-code.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090130/c176573f/attachment-0009.bin From tjarvi at qbang.org Sat Jan 3 21:24:26 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 3 Jan 2009 21:24:26 -0700 (MST) Subject: [Rxtx] rxtx-2.2pre1 binaries are available. In-Reply-To: References: Message-ID: So far no complaints. I see people have downloaded it. Tomorrow I'll move the announcement to rxtx.org for wider testing if nobody objects. On Tue, 30 Dec 2008, Trent Jarvi wrote: > > Season's greatings! > > This is the first in what will be more than one attempt to get the > binaries right for rxtx-2.2. There are three things I'm looking for: > > 1) Sane binaries are built by default - no special flags required. > 2) The binaries are functional. > 3) No 'unusual' build environments are required. You should be able to > do this at home. Visual Studio was used for Windows, however. > > There are a few things I'm not currently looking at: > > 1) web installs - next. > 2) the ToyBox builds - those come last. (The ToyBox is another ~15 > platforms). > 3) "Could you add/fix/...." Everyone has the source. We need to make a > release. If it isn't a regression, I probably will not get to it but you > may. > > I've compiled binaries for the following platforms: > > Mac: ppc, i686, x86_64 (universal binaries) > Solaris: sparc32, sparc64 > Linux: i686, x86_64 > Windows: win64, win32 > > The files are are downloadable from qbang.org. > http://rxtx.qbang.org/wiki/index.php/Download > > cb15edd90e0fd3e3bdfbf9bcff1c0758 rxtx-2.2pre1-bins.zip > 79415406420fe872c89c98e097024207 rxtx-2.2pre1.zip > > For help installing: > http://rxtx.qbang.org/wiki/index.php/Installation > > The only difference between the source above and CVS is the version > number used in the library version checks. For sol64 builds, I did add > -m64 to the flags in the Makefile manually. > > The ChangeLog is in with the source for now. > > Initially, I could use a hand testing the binaries and updating the wiki > pages at http://rxtx.qbang.org which is what www.rxtx.org will be when > the rxtx 2.2 release goes out. For now, I just want to take feedback from > a smaller group to catch any obvious mistakes. I'll announce the binaries > on rxtx.org when we are ready for a larger audience. > > > -- > Trent Jarvi > tjarvi at qbang.org > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Sun Jan 4 12:14:35 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:14:35 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: The binaries, source and pending wiki move are now announced on http://www.rxtx.org. After this has baked, we can put the web install in. Changes in rxtx 2.2 (If I missed something let me know): threshold fix Alexandre Rusev http://bugzilla.qbang.org/show_bug.cgi?id=85 RXTX close deadlocks in REXTXPort.finalize Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=53 Add ACM serial devices to all known ports. Duncan Pierce http://bugzilla.qbang.org/show_bug.cgi?id=51 Concurrency fixes for SMP/multicore systems U. George http://bugzilla.qbang.org/show_bug.cgi?id=100 Fixes for MAC systems with no drivers installed. 1.5 stop bit fix Enable universal library builds for Mac OS X Andre-John Mas ajmas at sympatico.ca http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html Do not remove and ignore interrupts. Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=45 find ports which were added after program startup on Mac OS X. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=48 Clean up CommPort Ownership code, avoid possible deadlocks, fix lost commport ownership events. Martin Oberhuber http://bugzilla.qbang.org/show_bug.cgi?id=83 rxtx does not compile against JDK-1.6 Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=84 configure script failed at line UTS_RELEASE megov http://bugzilla.qbang.org/show_bug.cgi?id=80 code cleanup patch (extra ';' creates bug for if statements + new String() calls removed) Xavier Le Vourch http://bugzilla.qbang.org/show_bug.cgi?id=77 Wont compile on linux ppc with glibc 2.5 - no sys/io.h Brian Johnson http://bugzilla.qbang.org/show_bug.cgi?id=72 rxtx overwrites System properties Andrew Gillett Nektarios K. Papadopoulos Neboj?a http://bugzilla.qbang.org/show_bug.cgi?id=64 Solaris ACM port support Dave Cleal http://bugzilla.qbang.org/show_bug.cgi?id=59 Setting of non-standard baud rate fails. Andrew Prunicki http://bugzilla.qbang.org/show_bug.cgi?id=58 RXTX uses lockfiles on MacOS X (instead of ioctl TIOCEXCL) Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=50 JavaDoc fixes Joachim Buechse http://bugzilla.qbang.org/show_bug.cgi?id=49 -- Trent Jarvi tjarvi at qbang.org From greg.johnson at rbr-global.com Sun Jan 4 12:40:56 2009 From: greg.johnson at rbr-global.com (Greg Johnson) Date: Sun, 4 Jan 2009 14:40:56 -0500 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. Message-ID: Hi Trent, The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to download. I think Martin had been generating (fantastically useful) Eclipse bundles, as well - are these available for 2.2pre1 also? Many thanks to everyone for their work - rxtx is an essential part of our product, and we have been keenly awaiting this release. Regards, greg -- Greg Johnson, PhD Director of Engineering http://www.rbr-global.com greg.johnson at rbr-global.com +1.613.233.1621 (GMT-5) office See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, 2009 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/6ef4b841/attachment-0035.html From tjarvi at qbang.org Sun Jan 4 12:42:08 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 12:42:08 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: Hi Greg, Thanks for the feedback. I'll let Martin mention his work/status on the Eclipse packages. He does indeed have full access to rxtx.qbang.org. The front page of the wiki is locked because it appears to be a popular spam abuse page. I'll put a license and download link on there. All other pages are wide open for editing after creating an account. I can put a note in the rxtx.org/download.html page. On Sun, 4 Jan 2009, Greg Johnson wrote: > Hi Trent, > The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops back > to rxtx.org, and the wiki doesn't seem to have a link (top level at least) to > download. I think Martin had been generating (fantastically useful) Eclipse > bundles, as well - are these available for 2.2pre1 also? > > Many thanks to everyone for their work - rxtx is an essential part of our > product, and we have been keenly awaiting this release. > > Regards, > greg > > On 4 Jan 2009, at 14:14, Trent Jarvi wrote: > >> >> The binaries, source and pending wiki move are now announced on >> http://www.rxtx.org. After this has baked, we can put the web install in. >> >> Changes in rxtx 2.2 (If I missed something let me know): >> ... snip ... >> >> -- >> Trent Jarvi >> tjarvi at qbang.org_______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -- > Greg Johnson, PhD > Director of Engineering > http://www.rbr-global.com > greg.johnson at rbr-global.com > +1.613.233.1621 (GMT-5) office > > > See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, > 2009 > From tjarvi at qbang.org Sun Jan 4 13:47:31 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 13:47:31 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: <69A74E1D-53F0-4A20-81FC-FD9FE5076307@rbr-global.com> Message-ID: I've updated and unlocked the front page in case someone would like to add links that make sense for the project (like the eclipse packages). I'll probably lock it again when 2.2 is released as a practical issue. If there is something that really bugs you about the front page, now is the time to fix it. http://rxtx.qbang.org (soon to be www.rxtx.org). On Sun, 4 Jan 2009, Trent Jarvi wrote: > > Hi Greg, > > Thanks for the feedback. > > I'll let Martin mention his work/status on the Eclipse packages. He does > indeed have full access to rxtx.qbang.org. > > The front page of the wiki is locked because it appears to be a popular spam > abuse page. I'll put a license and download link on there. All other pages > are wide open for editing after creating an account. > > I can put a note in the rxtx.org/download.html page. > > On Sun, 4 Jan 2009, Greg Johnson wrote: > >> Hi Trent, >> The download link on rxtx.org (http://users.frii.com/jarvi/rxtx/) loops >> back to rxtx.org, and the wiki doesn't seem to have a link (top level at >> least) to download. I think Martin had been generating (fantastically >> useful) Eclipse bundles, as well - are these available for 2.2pre1 also? >> >> Many thanks to everyone for their work - rxtx is an essential part of our >> product, and we have been keenly awaiting this release. >> >> Regards, >> greg >> >> On 4 Jan 2009, at 14:14, Trent Jarvi wrote: >> >>> >>> The binaries, source and pending wiki move are now announced on >>> http://www.rxtx.org. After this has baked, we can put the web install >>> in. >>> >>> Changes in rxtx 2.2 (If I missed something let me know): >>> ... snip ... >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org_______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> -- >> Greg Johnson, PhD >> Director of Engineering >> http://www.rbr-global.com >> greg.johnson at rbr-global.com >> +1.613.233.1621 (GMT-5) office >> >> >> See us at: Ocean Business 2009, Southampton, England, March 31 - April 1, >> 2009 >> > From hakcenter at gmail.com Sun Jan 4 18:55:27 2009 From: hakcenter at gmail.com (Curtis Hacker) Date: Sun, 04 Jan 2009 17:55:27 -0800 Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: References: Message-ID: <4961688F.1020906@gmail.com> An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090104/cd98ce66/attachment-0035.html From tjarvi at qbang.org Sun Jan 4 20:18:40 2009 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 4 Jan 2009 20:18:40 -0700 (MST) Subject: [Rxtx] [Announce] RXTX 2.2pre1 is available. In-Reply-To: <4961688F.1020906@gmail.com> References: <4961688F.1020906@gmail.com> Message-ID: Hi Curtis, I did not get that in. The last I recall on the custom baudrate patch was we didnt have a piece of hardware that actually used it. Is that still the case? We could put it in or document the concept with the patch in pre2. I got the impression we still wondered what the exposed kernel capability actually worked with. Since you did provide the patch, I'll let you decide what is best and describe your reasoning to the list. Patches sent to me or the list (prefered) do get high priority. On Sun, 4 Jan 2009, Curtis Hacker wrote: > was the mac custom baud and linux baud fix included? i haven't checked the > cvs, i think i sent it personally to Trent > > Trent Jarvi wrote: > > The binaries, source and pending wiki move are now announced on > http://www.rxtx.org.?? After this has baked, we can put the web > install in. > > Changes in rxtx 2.2 (If I missed something let me know): > > ??????????????? threshold fix > ??????????????? Alexandre Rusev > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=85 > > ??????????????? RXTX close deadlocks in REXTXPort.finalize > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=53 > > ??????????????? Add ACM serial devices to all known ports. > ??????????????? Duncan Pierce > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=51 > > ??????????????? Concurrency fixes for SMP/multicore systems > ??????????????? U. George > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=100 > > ??????????????? Fixes for MAC systems with no drivers installed. > ??????????????? 1.5 stop bit fix > > ??????????????? Enable universal library builds for Mac OS X > ??????????????? Andre-John Mas ajmas at sympatico.ca > ??????????????? > http://mailman.qbang.org/pipermail/rxtx/2007-December/1793319.html > > ??????????????? Do not remove and ignore interrupts. > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=45 > > ??????????????? find ports which were added after program > startup on Mac? OS X. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=48 > > ??????????????? Clean up CommPort Ownership code, avoid possible > deadlocks, > ??????????????? fix lost commport ownership events. > ??????????????? Martin Oberhuber > > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=83 > > ??????????????? rxtx does not compile against JDK-1.6 > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=84 > > ??????????????? configure script failed at line UTS_RELEASE > ??????????????? megov > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=80 > > ??????????????? code cleanup patch (extra ';' creates bug for if > statements > ??????????????? + new String() calls removed) > ??????????????? Xavier Le Vourch > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=77 > > ??????????????? Wont compile on linux ppc with glibc 2.5 - no > sys/io.h > ??????????????? Brian Johnson > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=72 > > ??????????????? rxtx overwrites System properties > ??????????????? Andrew Gillett > ??????????????? Nektarios K. Papadopoulos > > ??????????????? Neboj?a > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=64 > > ??????????????? Solaris ACM port support > ??????????????? Dave Cleal > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=59 > > ??????????????? Setting of non-standard baud rate fails. > ??????????????? Andrew Prunicki > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=58 > > ??????????????? RXTX uses lockfiles on MacOS X (instead of ioctl > TIOCEXCL) > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=50 > > ??????????????? JavaDoc fixes > ??????????????? Joachim Buechse > ??????????????? http://bugzilla.qbang.org/show_bug.cgi?id=49 > > > -- > Trent Jarvi > tjarvi at qbang.org > > ____________________________________________________________________ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > From mail at johannes-meyer.net Tue Jan 6 11:06:00 2009 From: mail at johannes-meyer.net (Johannes Meyer) Date: Tue, 6 Jan 2009 19:06:00 +0100 Subject: [Rxtx] Linux /dev/tts/X Message-ID: <004f01c97029$6f0bbca0$4d2335e0$@net> Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes From tristan.dyer at cgi.com Tue Jan 6 12:17:30 2009 From: tristan.dyer at cgi.com (Dyer, Tristan) Date: Tue, 6 Jan 2009 14:17:30 -0500 Subject: [Rxtx] Linux /dev/tts/X In-Reply-To: <004f01c97029$6f0bbca0$4d2335e0$@net> References: <004f01c97029$6f0bbca0$4d2335e0$@net> Message-ID: <9DA32B4D8579AF44AD96C1CC2E9C518D02F87059@MTL-MSG-02.cgiclients.com> Hi, You can alter the ports that RXTXCommDriver.java looks for in gnu.io. Solaris uses /dev/term/X or /dev/cua/X if you look for Solaris or SunOS that should give you a good idea of what you will need to change. You should also be able to define the ports to use in the gnu.io.rxtx.properties file. Thanks, -- Tristan Dyer -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Johannes Meyer Sent: January 6, 2009 2:06 PM To: rxtx at qbang.org Subject: [Rxtx] Linux /dev/tts/X Hello, I'm implementing a software for a thin client with Linux and Java. The problem is, that the serial ports aren't under "/dev/ttySX" but unter "/dev/tts/X". RXTX doesn't find these ports. What can I do? I'm using RXTX 2.1-7. Kind regards an sorry for my englisch, Johannes _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From mailing.list at supernovasoftware.com Tue Jan 6 13:39:41 2009 From: mailing.list at supernovasoftware.com (Jason Long) Date: Tue, 06 Jan 2009 14:39:41 -0600 Subject: [Rxtx] Using RxTx from and applet Message-ID: <4963C18D.9010603@supernovasoftware.com> I have to integrate a type of measuring device directly into my web based inventory system. It currently runs remotely on JBoss and JDK 1.6. I need to be able for the user to attach the exported measurement data directly to places in my application. The following are the manufacturer directions. 1. set the hosts computer's serial port to 2400 baud, 8-N-1 2. connect device to host computer with a DB-9 connector 3. the host computer should send the ASCII character "1" (31h) or "2" (32h) to the device to begin data transmission. 4. after receiving this signal the device will transmit the data and the string "ENDENDEND". That is it. Sounds very simple to me. Is this actually going to be a headache? *Does this look like something that I would use RxTx for?* Is there anyone one on here in Houston that could provide some assistance with this? Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/0fad6515/attachment-0033.html From talberts at msiscales.com Tue Jan 6 14:21:42 2009 From: talberts at msiscales.com (Tim Alberts) Date: Tue, 06 Jan 2009 13:21:42 -0800 Subject: [Rxtx] Unsuccessful move from javax.comm to gnu.io Message-ID: <4963CB66.9080303@msiscales.com> Hello again everyone, happy New Year. I saw that Trent released 2.2pre...and figured it was time for me to make the leap from Sun javax.comm to RXTX gnu.io in hopes of utilizing the, hopefully coming soon, web install capabilities. In making this leap, everything I've read says that the conversion is as simple as changing imports from javax.comm.* to gnu.io.* which is what I did. The result is one major problem in that I am not receiving anything from the input stream. I use event based communications and noticed it fires about 150-200 times per second. This is confusing because it happens regardless if the device I'm trying to talk to is not transmitting at all, or transmitting about 20 characters once per second. It seems that under the hood, the Sun javax.comm and RXTX gnu.io are completely different. I have repeated this with both RXTX 2.1-7_r2 and RXTX 2.2pre1. My platform is Win32 (Windows XP) and Sun Java 1.5.0_16. Additionally, it appears that the hardware handshaking is handled different between javax.comm and gnu.io. I'll have to dig out the port analyzer to be precise on this. The device I talk to (an RF modem) can use a simple 3 wire TX, RX, Gnd, but is best used with 8 wire TX, RX, Gnd, CTS, RTS, DTR, DSR, CD. With the gnu.io package, if I don't use hardware handshaking (flow control == none), the device does not appear to get enabled. I'm guessing the DTR from the DTE (computer) is defaulting the wrong way? If I enable CTS/RTS, the modem appears to be enabled, it transmits and receives with the exception of the above problem, the application never gets data from gnu.io. If anyone knows what the differences or subtleties I should be aware of in handling these serial port lines with the gnu.io package, your help is appreciated. On the plus side, gnu.io seems to have found (almost) all of my serial ports and serial devices. I can also see that I am transmitting data (on the port I've tested with). So my first question is, is there any documentation that details the differences between Sun javax.comm and RXTX gnu.io? Second question, is the gnu.io in event mode supposed to fire 150-200 SerialPortEvent.DATA_AVAILABLE events per second, or is this an indication of a problem? Any help anyone can offer beyond these questions would be outstanding. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: talberts.vcf Type: text/x-vcard Size: 337 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20090106/f3b48342/attachment-0033.vcf From johnny.luong at trustcommerce.com Tue Jan 6 15:02:42 2009 From: johnny.luong at trustcommerce.com (Johnny Luong) Date: Tue, 06 Jan 2009 14:02:42 -0800 Subject: [Rxtx] Using RxTx from and applet In-Reply-To: <4963C18D.9010603@supernovasoftware.com> References: <4963C18D.9010603@supernovasoftware.com> Message-ID: <4963D502.8060705@trustcommerce.com> Jason Long wrote: > I have to integrate a type of measuring device directly into my web > based inventory system. > It currently runs remotely on JBoss and JDK 1.6. > > I need to be able for the user to attach the exported measurement data > directly to places in my application. > > The following are the manufacturer directions. > > 1. set the hosts computer's serial port to 2400 baud, 8-N-1 > 2. connect device to host computer with a DB-9 connector > 3. the host computer should send the ASCII character "1" (31h) or "2" > (32h) to the device to begin data transmission. > 4. after receiving this signal the device will transmit th