From will.tatam at red61.com Thu May 5 12:30:52 2011
From: will.tatam at red61.com (Will Tatam)
Date: Thu, 05 May 2011 19:30:52 +0100
Subject: [Rxtx] WebStart, rxtx, and amd64
In-Reply-To: <4DB5CDEC.2010707@gmail.com>
References: <4DB5CDEC.2010707@gmail.com>
Message-ID: <4DC2ECDC.6050109@red61.com>
On 25/04/11 20:39, Mike Markowski wrote:
> I've run into an odd problem that hopefully someone else has seen and solved.
> If I use WebStart for 32-bit linux, Intel, all is well. Java Console shows me
> that it arrives at the web server as os.name=Linux and os.arch=i386 and, sure
> enough, the jnlp file (attached below) points it to the correct native jar.
>
> However, if I try the same with 64-bit linux, Java Console shows os.name=Linux
> and os.arch=amd64. The bad news is that the jnlp file does not supply -any-
> rxtx native lib via WebStart. The only way I can get it to work is by adding
> the last linux entry that does not specify the architecture.
>
> I assume I'm doing something wrong but haven't figured it out yet. Thanks for
> any ideas!
>
> Mike
>
>
>
>
> RXTX
> ajmas
>
> Java API for serial port communication
> Java API for serial port communication.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
This following works for me using the sun jre
--
Will Tatam
Systems Architect
Red61
0845 867 2203 ext 103
From will.tatam at red61.com Thu May 5 12:42:01 2011
From: will.tatam at red61.com (Will Tatam)
Date: Thu, 05 May 2011 19:42:01 +0100
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References:
Message-ID: <4DC2EF79.2080108@red61.com>
On 12/04/11 11:27, Kustaa Nyholm wrote:
> Hi List,
>
> I could not resist so I had to create a Pure Java implementation of
> JavaComm SerialPort
> with no C-code or JNI in sight!
>
> If you are interested, please go to my website at:
>
> http://www.sparetimelabs.com/
>
> and select 'PureJavaComm' from the navigation on the left.
>
> br Kusti
>
>
Has anyone done any comparison testing between RXTX and this new project ?
Latency is where I'm most interested as RXTX is riddled with sleep() calls
--
Will Tatam
Systems Architect
Red61
From will.tatam at red61.com Thu May 5 13:01:07 2011
From: will.tatam at red61.com (Will Tatam)
Date: Thu, 05 May 2011 20:01:07 +0100
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To: <4DC2EF79.2080108@red61.com>
References:
<4DC2EF79.2080108@red61.com>
Message-ID: <4DC2F3F3.8020100@red61.com>
On 05/05/11 19:42, Will Tatam wrote:
> On 12/04/11 11:27, Kustaa Nyholm wrote:
>> Hi List,
>>
>> I could not resist so I had to create a Pure Java implementation of
>> JavaComm SerialPort
>> with no C-code or JNI in sight!
>>
>> If you are interested, please go to my website at:
>>
>> http://www.sparetimelabs.com/
>>
>> and select 'PureJavaComm' from the navigation on the left.
>>
>> br Kusti
>>
>>
>
> Has anyone done any comparison testing between RXTX and this new
> project ?
> Latency is where I'm most interested as RXTX is riddled with sleep()
> calls
>
Is the ParallelPort complete ? it appears to be missing functions like
isPaperOut() and isPrinterError()
--
Will Tatam
Systems Architect
Red61
0845 867 2203 ext 103
From Kustaa.Nyholm at planmeca.com Thu May 5 13:29:05 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Thu, 5 May 2011 22:29:05 +0300
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To: <4DC2F3F3.8020100@red61.com>
Message-ID:
On 5/5/11 22:01, "Will Tatam" wrote:
> Is the ParallelPort complete ? it appears to be missing functions like
> isPaperOut() and isPrinterError()
purejavacomm is strictly serial port, I've got no plans
to add parallel port, though of course it would not be
difficult, but I've got no hardware with parallel port.
> Has anyone done any comparison testing between RXTX and this new project
>?
> Latency is where I'm most interested as RXTX is riddled with sleep()
>calls
I don't think anyone has done anything like that yet. It is
early days with purejavacomm yet. At the moment basic functionality
works and I've got some positive reports but also some
users have identified some issues that I try to resolve
in the coming weeks.
I'm not sure if we are welcome to hijack rxtx list for
purejavacomm discussions. I don't mind but it is not for
me to say.
Also, please do not cc pete batard, he might get annoyed after
awhile as this really has nothing to do with him.
br Kusti
From tjarvi at qbang.org Thu May 5 19:56:15 2011
From: tjarvi at qbang.org (Trent Jarvi)
Date: Thu, 5 May 2011 19:56:15 -0600 (MDT)
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References:
Message-ID:
> I'm not sure if we are welcome to hijack rxtx list for
> purejavacomm discussions. I don't mind but it is not for
> me to say.
Hehe, Hijack? I guess that means we would lose something other than work?
Posts related to CommAPI are welcome here. Really, its open to the
general interest group as a whole with no expectations.
--
Trent Jarvi
tjarvi at qbang.org
From Kustaa.Nyholm at planmeca.com Thu May 5 23:59:37 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Fri, 6 May 2011 08:59:37 +0300
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To: <4DC33F55.2070004@gmail.com>
Message-ID:
On 5/6/11 03:22, "Curtis Hacker" wrote:
>Is there no common shared language structure between the OS's at this
>point ? jtermios.windows/macosx/linux ?
I'm not sure if I understand what you are asking?
The purejavacomm.* classes are 100% shared between the OSs and contains
all the functionality that implement javax.comm.* functionality in terms
of, or on top of, an idealized POSIX like device API which is implemented
by jtermios.JTermios class (plus the other structures in that package).
Especially the purejavacomm.PureJavaSerialPort does most of the work,
apart from the device enumeration which is in
purejavacomm.CommPortIdentifier
class.
So that is all 100% shared between the OS's.
JTermios defines all the necessary POSIX like API calls as static functions
that delegate the actual implementation to one of the OS/arch specific
implementation class instances defined in in the jtermios.*.JTermiosImpl
classes.
The implementing classes for POSIX -like operating systems are very thin
wrappers around JNA calls to the actual Unix/Linux standard C-library
calls.
There is very little actual code or definitions in them and what there is
cannot be shared between OS as this is the 'glue' that attaches the
abstract
with the concrete.
For Windows, which is totally unlike unix, the implementation class
jtermios.windows.JTermiosImpl contains quite a lot of code to do the
impedance matching between unix and windows way of doing things. This is
of course very Windows specific and cannot be shared.
JTermios defines, in addition to the API functions, all the constants
necessary to pass to the those functions, such as O_NONBLOCK, B19200
etc etc. The values of these constants varies between (or can vary, I
have not checked every OS out there ;-) operating systems, so these
cannot be defined 'final'. JTermios provides default values for these
constants which the JTermiosImpl class is supposed to write over in the
constructor if required. The default values are those from/for
Mac OS X 10.6.6 / x86_64 so that the macosx.JTermiosImpl does not need
to override anything. In Windows the values of these constant have no
meaning so the windows.JTermiosImpl can use the mac values as-is and
it does not need to change them. So at the moment only linux.JTermiosImpl
needs to change those constants from the default values.
Hope this clarifies.
>
>Non standard baud rates possible on linux and osx (10.4 or better) ?
Well, the way it works is that purejavacomm.PureJavaSerialPort checks if
the requested baud rate is one of the 'standard' (which standard BTW) baud
rates
and if so passes the OS specific constant to the next layer in the
communication stack, or, if the baud rate is non standard, then the
requested
value directly to the next layer. In unix-like systems the next layer is
basically
the OS API function so it is up to the OS to decide what to do with that.
In Mac OS X and Windows it turns out that the OS specific constant is
actually the baud
rate value so you it gets passed directly to the OS and you can use
whatever
the OS supports.
In Linux the OS specific constants are not directly the
baudrate values, for example the OS constant for 9600 baud is 15, but since
the non standard values get passed directly to the OS you can use whatever
the OS supports as long as you can figure out what the constant is, which
you
should be able to do by examining the termios.h header of your Linux.
The 'standard' baud rates as far as JTermios is concerned are the standard
POSIX baud rates ie
50,75,110,134,150,200,300,1200,1800,2400,4800,9600,19200,38400.
But if I made myself clear you above you are not limited to these, in Mac
OS X
I think at least 14400 and 57600 are supported and in Windows in addition
to those
there is 56000,115200,128000 and 256000. In Linux I'm not sure what is the
current
state of affairs, but seem to recall that you can get 'weird' baud rate
with special
values, for example to set 230400 use 22.
Hope this clarifies a bit (pun intended).
br Kusti
PS
Since Trent was courteous enough to allow this discussion in the rxtx list
I'm CC:ing the list.
From damorales at gmail.com Fri May 6 07:33:19 2011
From: damorales at gmail.com (Daniel Morales Salas)
Date: Fri, 6 May 2011 09:33:19 -0400
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References: <4DC33F55.2070004@gmail.com>
Message-ID:
Hi
I'm developing an application that use rxtx to comunicate with a serial port
(UART) to send commands to a PLCBUS device and it works perfect (I only
tried in linux). I would like to try purejavacomm. Is all the serial port
functionality ready to use ?
Thanks.
Greetings!
2011/5/6 Kustaa Nyholm
> On 5/6/11 03:22, "Curtis Hacker" wrote:
>
> >Is there no common shared language structure between the OS's at this
> >point ? jtermios.windows/macosx/linux ?
>
>
> I'm not sure if I understand what you are asking?
>
> The purejavacomm.* classes are 100% shared between the OSs and contains
> all the functionality that implement javax.comm.* functionality in terms
> of, or on top of, an idealized POSIX like device API which is implemented
> by jtermios.JTermios class (plus the other structures in that package).
>
> Especially the purejavacomm.PureJavaSerialPort does most of the work,
> apart from the device enumeration which is in
> purejavacomm.CommPortIdentifier
> class.
>
> So that is all 100% shared between the OS's.
>
>
> JTermios defines all the necessary POSIX like API calls as static functions
> that delegate the actual implementation to one of the OS/arch specific
> implementation class instances defined in in the jtermios.*.JTermiosImpl
> classes.
>
> The implementing classes for POSIX -like operating systems are very thin
> wrappers around JNA calls to the actual Unix/Linux standard C-library
> calls.
> There is very little actual code or definitions in them and what there is
> cannot be shared between OS as this is the 'glue' that attaches the
> abstract
> with the concrete.
>
> For Windows, which is totally unlike unix, the implementation class
> jtermios.windows.JTermiosImpl contains quite a lot of code to do the
> impedance matching between unix and windows way of doing things. This is
> of course very Windows specific and cannot be shared.
>
> JTermios defines, in addition to the API functions, all the constants
> necessary to pass to the those functions, such as O_NONBLOCK, B19200
> etc etc. The values of these constants varies between (or can vary, I
> have not checked every OS out there ;-) operating systems, so these
> cannot be defined 'final'. JTermios provides default values for these
> constants which the JTermiosImpl class is supposed to write over in the
> constructor if required. The default values are those from/for
> Mac OS X 10.6.6 / x86_64 so that the macosx.JTermiosImpl does not need
> to override anything. In Windows the values of these constant have no
> meaning so the windows.JTermiosImpl can use the mac values as-is and
> it does not need to change them. So at the moment only linux.JTermiosImpl
> needs to change those constants from the default values.
>
>
> Hope this clarifies.
>
> >
> >Non standard baud rates possible on linux and osx (10.4 or better) ?
>
> Well, the way it works is that purejavacomm.PureJavaSerialPort checks if
> the requested baud rate is one of the 'standard' (which standard BTW) baud
> rates
> and if so passes the OS specific constant to the next layer in the
> communication stack, or, if the baud rate is non standard, then the
> requested
> value directly to the next layer. In unix-like systems the next layer is
> basically
> the OS API function so it is up to the OS to decide what to do with that.
>
> In Mac OS X and Windows it turns out that the OS specific constant is
> actually the baud
> rate value so you it gets passed directly to the OS and you can use
> whatever
> the OS supports.
>
> In Linux the OS specific constants are not directly the
> baudrate values, for example the OS constant for 9600 baud is 15, but since
> the non standard values get passed directly to the OS you can use whatever
> the OS supports as long as you can figure out what the constant is, which
> you
> should be able to do by examining the termios.h header of your Linux.
>
> The 'standard' baud rates as far as JTermios is concerned are the standard
> POSIX baud rates ie
> 50,75,110,134,150,200,300,1200,1800,2400,4800,9600,19200,38400.
>
> But if I made myself clear you above you are not limited to these, in Mac
> OS X
> I think at least 14400 and 57600 are supported and in Windows in addition
> to those
> there is 56000,115200,128000 and 256000. In Linux I'm not sure what is the
> current
> state of affairs, but seem to recall that you can get 'weird' baud rate
> with special
> values, for example to set 230400 use 22.
>
> Hope this clarifies a bit (pun intended).
>
> br Kusti
>
> PS
>
> Since Trent was courteous enough to allow this discussion in the rxtx list
> I'm CC:ing the list.
>
>
>
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
--
Atte:
Daniel Dario Morales Salas
Ingeniero Civil en Computaci?n e Inform?tica
Tel?fono: 02 684 3417
Celular: 09 643 1802
Santiago, Chile
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From Kustaa.Nyholm at planmeca.com Fri May 6 07:47:17 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Fri, 6 May 2011 16:47:17 +0300
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
Message-ID:
On 5/6/11 16:33, "Daniel Morales Salas" wrote:
>Hi
>
>I'm developing an application that use rxtx to comunicate with a serial
>port (UART) to send commands to a PLCBUS device and it works perfect (I
>only tried in linux). I would like to try purejavacomm. Is all the serial
>port functionality ready to use ?
Hard to say, but it definitely is ready enough to be tried!
It works for some people, some people have reported some issues
that I'm working with.
br Kusti
>
From damorales at gmail.com Fri May 6 08:42:22 2011
From: damorales at gmail.com (Daniel Morales Salas)
Date: Fri, 6 May 2011 10:42:22 -0400
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References:
Message-ID:
Ok, I will try it this weekend and I will let you know how it goes.
Thanks and greetings!!
2011/5/6 Kustaa Nyholm
> On 5/6/11 16:33, "Daniel Morales Salas" wrote:
>
> >Hi
> >
> >I'm developing an application that use rxtx to comunicate with a serial
> >port (UART) to send commands to a PLCBUS device and it works perfect (I
> >only tried in linux). I would like to try purejavacomm. Is all the serial
> >port functionality ready to use ?
>
> Hard to say, but it definitely is ready enough to be tried!
>
> It works for some people, some people have reported some issues
> that I'm working with.
>
> br Kusti
> >
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
--
Atte:
Daniel Dario Morales Salas
Ingeniero Civil en Computaci?n e Inform?tica
Tel?fono: 02 684 3417
Celular: 09 643 1802
Santiago, Chile
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From blueeagle2 at gmail.com Sat May 7 01:35:18 2011
From: blueeagle2 at gmail.com (blueeagle2 at gmail.com)
Date: Sat, 7 May 2011 00:35:18 -0700
Subject: [Rxtx] rxtx for eclipse in Windows XP
Message-ID:
I installed the eclipse plugins for rxtx, but eclipse does not recognize the
import gnu.io.*;
What else do I need to do? I looked for a rxtx.jar file, but could not
locate one. Do eclipse plugins work differently?
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From aawolfe at gmail.com Sat May 7 05:07:44 2011
From: aawolfe at gmail.com (Aaron Wolfe)
Date: Sat, 7 May 2011 07:07:44 -0400
Subject: [Rxtx] USB latency woes
Message-ID:
I use RXTX in an open source project that implements a disk drive over
serial emulation for old 8 bit computers, and it's been great. In the
past the top rate the old computers could digest was 115k, but
recently a retro-guru has hacked up a way to do 230kbps.
We've found that throughput with USB adapters is poor, in some cases
barely better than 115k, yet with a real serial port the gains in
speed are large. It seems there is a large latency per operation on
all the USB adapters we've tried, although it varies a lot from one to
the next. By tweaking settings in the driver for the adapter, I've
been able to improve things, but still the best USB adapter (a
Prolific 2303) is about 10% slower than a real serial port, and the
others are worse.
The latency seems to occur per call to read() or write().. for
instance if I need to read 2 bytes, it takes almost twice as long to
do read(byte); read(byte) as it does a single read(byte[2]). We do a
lot of small i/o back and forth, sometimes a single byte. The largest
transaction is only about 260 bytes in one direction, a handful in the
other. By combining as many operations into larger blocks as I can,
latency can be reduced, but still it's having major effects and there
are some operations that just have to send lots of tiny bits back and
forth, no way to combine them.
Has anybody dealt with this and improved things, or is this just life
with USB->serial? There are lots of timing tweaks available in RXTX,
but I've had odd results when messing with them, especially with
different behavior on different platforms. I thought maybe there was
some magic combination of things that would help.
Thanks for any ideas
-Aaron
From Kustaa.Nyholm at planmeca.com Sat May 7 07:24:40 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Sat, 7 May 2011 16:24:40 +0300
Subject: [Rxtx] USB latency woes
In-Reply-To:
Message-ID:
On 5/7/11 14:07, "Aaron Wolfe" wrote:
>
>Has anybody dealt with this and improved things, or is this just life
>with USB->serial?
My experience is that this is life with USB. USB is based on 1 ms polling
(the host asks the device if it has any data once every msec) so if you
read
one byte it may well be that next byte is available 1 msec later.
Also some adapters, atleast FTDI has 10 msec (IIRC) latency when you write
anything less than an internal buffer full (64 bytes IIRC) so this really
kills your throughput if you do a lot of small transfers.
YMMV.
br Kusti
From Hans.Nouwens at xs4all.nl Sat May 7 07:47:41 2011
From: Hans.Nouwens at xs4all.nl (Hans Nouwens)
Date: Sat, 7 May 2011 15:47:41 +0200
Subject: [Rxtx] USB latency woes
In-Reply-To:
References:
Message-ID:
Aaron,
with the ftd chipset I use I'm able to set a legacy time-out to a minimum
of 1 ms. This means that whatever amount of bytes are waiting in the
buffer it sends or transmits anyway.
With some overhead I'm able to communicate with my hardware with 600
messages per second. My messages are usually smaller than 20 bytes.
Hans Nouwens.
> I use RXTX in an open source project that implements a disk drive over
> serial emulation for old 8 bit computers, and it's been great. In the
> past the top rate the old computers could digest was 115k, but
> recently a retro-guru has hacked up a way to do 230kbps.
>
> We've found that throughput with USB adapters is poor, in some cases
> barely better than 115k, yet with a real serial port the gains in
> speed are large. It seems there is a large latency per operation on
> all the USB adapters we've tried, although it varies a lot from one to
> the next. By tweaking settings in the driver for the adapter, I've
> been able to improve things, but still the best USB adapter (a
> Prolific 2303) is about 10% slower than a real serial port, and the
> others are worse.
>
> The latency seems to occur per call to read() or write().. for
> instance if I need to read 2 bytes, it takes almost twice as long to
> do read(byte); read(byte) as it does a single read(byte[2]). We do a
> lot of small i/o back and forth, sometimes a single byte. The largest
> transaction is only about 260 bytes in one direction, a handful in the
> other. By combining as many operations into larger blocks as I can,
> latency can be reduced, but still it's having major effects and there
> are some operations that just have to send lots of tiny bits back and
> forth, no way to combine them.
>
> Has anybody dealt with this and improved things, or is this just life
> with USB->serial? There are lots of timing tweaks available in RXTX,
> but I've had odd results when messing with them, especially with
> different behavior on different platforms. I thought maybe there was
> some magic combination of things that would help.
>
> Thanks for any ideas
> -Aaron
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
From will.tatam at red61.com Thu May 5 12:30:52 2011
From: will.tatam at red61.com (Will Tatam)
Date: Thu, 05 May 2011 19:30:52 +0100
Subject: [Rxtx] WebStart, rxtx, and amd64
In-Reply-To: <4DB5CDEC.2010707@gmail.com>
References: <4DB5CDEC.2010707@gmail.com>
Message-ID: <4DC2ECDC.6050109@red61.com>
On 25/04/11 20:39, Mike Markowski wrote:
> I've run into an odd problem that hopefully someone else has seen and solved.
> If I use WebStart for 32-bit linux, Intel, all is well. Java Console shows me
> that it arrives at the web server as os.name=Linux and os.arch=i386 and, sure
> enough, the jnlp file (attached below) points it to the correct native jar.
>
> However, if I try the same with 64-bit linux, Java Console shows os.name=Linux
> and os.arch=amd64. The bad news is that the jnlp file does not supply -any-
> rxtx native lib via WebStart. The only way I can get it to work is by adding
> the last linux entry that does not specify the architecture.
>
> I assume I'm doing something wrong but haven't figured it out yet. Thanks for
> any ideas!
>
> Mike
>
>
>
>
> RXTX
> ajmas
>
> Java API for serial port communication
> Java API for serial port communication.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
This following works for me using the sun jre
--
Will Tatam
Systems Architect
Red61
0845 867 2203 ext 103
From will.tatam at red61.com Thu May 5 12:42:01 2011
From: will.tatam at red61.com (Will Tatam)
Date: Thu, 05 May 2011 19:42:01 +0100
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References:
Message-ID: <4DC2EF79.2080108@red61.com>
On 12/04/11 11:27, Kustaa Nyholm wrote:
> Hi List,
>
> I could not resist so I had to create a Pure Java implementation of
> JavaComm SerialPort
> with no C-code or JNI in sight!
>
> If you are interested, please go to my website at:
>
> http://www.sparetimelabs.com/
>
> and select 'PureJavaComm' from the navigation on the left.
>
> br Kusti
>
>
Has anyone done any comparison testing between RXTX and this new project ?
Latency is where I'm most interested as RXTX is riddled with sleep() calls
--
Will Tatam
Systems Architect
Red61
From will.tatam at red61.com Thu May 5 13:01:07 2011
From: will.tatam at red61.com (Will Tatam)
Date: Thu, 05 May 2011 20:01:07 +0100
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To: <4DC2EF79.2080108@red61.com>
References:
<4DC2EF79.2080108@red61.com>
Message-ID: <4DC2F3F3.8020100@red61.com>
On 05/05/11 19:42, Will Tatam wrote:
> On 12/04/11 11:27, Kustaa Nyholm wrote:
>> Hi List,
>>
>> I could not resist so I had to create a Pure Java implementation of
>> JavaComm SerialPort
>> with no C-code or JNI in sight!
>>
>> If you are interested, please go to my website at:
>>
>> http://www.sparetimelabs.com/
>>
>> and select 'PureJavaComm' from the navigation on the left.
>>
>> br Kusti
>>
>>
>
> Has anyone done any comparison testing between RXTX and this new
> project ?
> Latency is where I'm most interested as RXTX is riddled with sleep()
> calls
>
Is the ParallelPort complete ? it appears to be missing functions like
isPaperOut() and isPrinterError()
--
Will Tatam
Systems Architect
Red61
0845 867 2203 ext 103
From Kustaa.Nyholm at planmeca.com Thu May 5 13:29:05 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Thu, 5 May 2011 22:29:05 +0300
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To: <4DC2F3F3.8020100@red61.com>
Message-ID:
On 5/5/11 22:01, "Will Tatam" wrote:
> Is the ParallelPort complete ? it appears to be missing functions like
> isPaperOut() and isPrinterError()
purejavacomm is strictly serial port, I've got no plans
to add parallel port, though of course it would not be
difficult, but I've got no hardware with parallel port.
> Has anyone done any comparison testing between RXTX and this new project
>?
> Latency is where I'm most interested as RXTX is riddled with sleep()
>calls
I don't think anyone has done anything like that yet. It is
early days with purejavacomm yet. At the moment basic functionality
works and I've got some positive reports but also some
users have identified some issues that I try to resolve
in the coming weeks.
I'm not sure if we are welcome to hijack rxtx list for
purejavacomm discussions. I don't mind but it is not for
me to say.
Also, please do not cc pete batard, he might get annoyed after
awhile as this really has nothing to do with him.
br Kusti
From tjarvi at qbang.org Thu May 5 19:56:15 2011
From: tjarvi at qbang.org (Trent Jarvi)
Date: Thu, 5 May 2011 19:56:15 -0600 (MDT)
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References:
Message-ID:
> I'm not sure if we are welcome to hijack rxtx list for
> purejavacomm discussions. I don't mind but it is not for
> me to say.
Hehe, Hijack? I guess that means we would lose something other than work?
Posts related to CommAPI are welcome here. Really, its open to the
general interest group as a whole with no expectations.
--
Trent Jarvi
tjarvi at qbang.org
From Kustaa.Nyholm at planmeca.com Thu May 5 23:59:37 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Fri, 6 May 2011 08:59:37 +0300
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To: <4DC33F55.2070004@gmail.com>
Message-ID:
On 5/6/11 03:22, "Curtis Hacker" wrote:
>Is there no common shared language structure between the OS's at this
>point ? jtermios.windows/macosx/linux ?
I'm not sure if I understand what you are asking?
The purejavacomm.* classes are 100% shared between the OSs and contains
all the functionality that implement javax.comm.* functionality in terms
of, or on top of, an idealized POSIX like device API which is implemented
by jtermios.JTermios class (plus the other structures in that package).
Especially the purejavacomm.PureJavaSerialPort does most of the work,
apart from the device enumeration which is in
purejavacomm.CommPortIdentifier
class.
So that is all 100% shared between the OS's.
JTermios defines all the necessary POSIX like API calls as static functions
that delegate the actual implementation to one of the OS/arch specific
implementation class instances defined in in the jtermios.*.JTermiosImpl
classes.
The implementing classes for POSIX -like operating systems are very thin
wrappers around JNA calls to the actual Unix/Linux standard C-library
calls.
There is very little actual code or definitions in them and what there is
cannot be shared between OS as this is the 'glue' that attaches the
abstract
with the concrete.
For Windows, which is totally unlike unix, the implementation class
jtermios.windows.JTermiosImpl contains quite a lot of code to do the
impedance matching between unix and windows way of doing things. This is
of course very Windows specific and cannot be shared.
JTermios defines, in addition to the API functions, all the constants
necessary to pass to the those functions, such as O_NONBLOCK, B19200
etc etc. The values of these constants varies between (or can vary, I
have not checked every OS out there ;-) operating systems, so these
cannot be defined 'final'. JTermios provides default values for these
constants which the JTermiosImpl class is supposed to write over in the
constructor if required. The default values are those from/for
Mac OS X 10.6.6 / x86_64 so that the macosx.JTermiosImpl does not need
to override anything. In Windows the values of these constant have no
meaning so the windows.JTermiosImpl can use the mac values as-is and
it does not need to change them. So at the moment only linux.JTermiosImpl
needs to change those constants from the default values.
Hope this clarifies.
>
>Non standard baud rates possible on linux and osx (10.4 or better) ?
Well, the way it works is that purejavacomm.PureJavaSerialPort checks if
the requested baud rate is one of the 'standard' (which standard BTW) baud
rates
and if so passes the OS specific constant to the next layer in the
communication stack, or, if the baud rate is non standard, then the
requested
value directly to the next layer. In unix-like systems the next layer is
basically
the OS API function so it is up to the OS to decide what to do with that.
In Mac OS X and Windows it turns out that the OS specific constant is
actually the baud
rate value so you it gets passed directly to the OS and you can use
whatever
the OS supports.
In Linux the OS specific constants are not directly the
baudrate values, for example the OS constant for 9600 baud is 15, but since
the non standard values get passed directly to the OS you can use whatever
the OS supports as long as you can figure out what the constant is, which
you
should be able to do by examining the termios.h header of your Linux.
The 'standard' baud rates as far as JTermios is concerned are the standard
POSIX baud rates ie
50,75,110,134,150,200,300,1200,1800,2400,4800,9600,19200,38400.
But if I made myself clear you above you are not limited to these, in Mac
OS X
I think at least 14400 and 57600 are supported and in Windows in addition
to those
there is 56000,115200,128000 and 256000. In Linux I'm not sure what is the
current
state of affairs, but seem to recall that you can get 'weird' baud rate
with special
values, for example to set 230400 use 22.
Hope this clarifies a bit (pun intended).
br Kusti
PS
Since Trent was courteous enough to allow this discussion in the rxtx list
I'm CC:ing the list.
From damorales at gmail.com Fri May 6 07:33:19 2011
From: damorales at gmail.com (Daniel Morales Salas)
Date: Fri, 6 May 2011 09:33:19 -0400
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References: <4DC33F55.2070004@gmail.com>
Message-ID:
Hi
I'm developing an application that use rxtx to comunicate with a serial port
(UART) to send commands to a PLCBUS device and it works perfect (I only
tried in linux). I would like to try purejavacomm. Is all the serial port
functionality ready to use ?
Thanks.
Greetings!
2011/5/6 Kustaa Nyholm
> On 5/6/11 03:22, "Curtis Hacker" wrote:
>
> >Is there no common shared language structure between the OS's at this
> >point ? jtermios.windows/macosx/linux ?
>
>
> I'm not sure if I understand what you are asking?
>
> The purejavacomm.* classes are 100% shared between the OSs and contains
> all the functionality that implement javax.comm.* functionality in terms
> of, or on top of, an idealized POSIX like device API which is implemented
> by jtermios.JTermios class (plus the other structures in that package).
>
> Especially the purejavacomm.PureJavaSerialPort does most of the work,
> apart from the device enumeration which is in
> purejavacomm.CommPortIdentifier
> class.
>
> So that is all 100% shared between the OS's.
>
>
> JTermios defines all the necessary POSIX like API calls as static functions
> that delegate the actual implementation to one of the OS/arch specific
> implementation class instances defined in in the jtermios.*.JTermiosImpl
> classes.
>
> The implementing classes for POSIX -like operating systems are very thin
> wrappers around JNA calls to the actual Unix/Linux standard C-library
> calls.
> There is very little actual code or definitions in them and what there is
> cannot be shared between OS as this is the 'glue' that attaches the
> abstract
> with the concrete.
>
> For Windows, which is totally unlike unix, the implementation class
> jtermios.windows.JTermiosImpl contains quite a lot of code to do the
> impedance matching between unix and windows way of doing things. This is
> of course very Windows specific and cannot be shared.
>
> JTermios defines, in addition to the API functions, all the constants
> necessary to pass to the those functions, such as O_NONBLOCK, B19200
> etc etc. The values of these constants varies between (or can vary, I
> have not checked every OS out there ;-) operating systems, so these
> cannot be defined 'final'. JTermios provides default values for these
> constants which the JTermiosImpl class is supposed to write over in the
> constructor if required. The default values are those from/for
> Mac OS X 10.6.6 / x86_64 so that the macosx.JTermiosImpl does not need
> to override anything. In Windows the values of these constant have no
> meaning so the windows.JTermiosImpl can use the mac values as-is and
> it does not need to change them. So at the moment only linux.JTermiosImpl
> needs to change those constants from the default values.
>
>
> Hope this clarifies.
>
> >
> >Non standard baud rates possible on linux and osx (10.4 or better) ?
>
> Well, the way it works is that purejavacomm.PureJavaSerialPort checks if
> the requested baud rate is one of the 'standard' (which standard BTW) baud
> rates
> and if so passes the OS specific constant to the next layer in the
> communication stack, or, if the baud rate is non standard, then the
> requested
> value directly to the next layer. In unix-like systems the next layer is
> basically
> the OS API function so it is up to the OS to decide what to do with that.
>
> In Mac OS X and Windows it turns out that the OS specific constant is
> actually the baud
> rate value so you it gets passed directly to the OS and you can use
> whatever
> the OS supports.
>
> In Linux the OS specific constants are not directly the
> baudrate values, for example the OS constant for 9600 baud is 15, but since
> the non standard values get passed directly to the OS you can use whatever
> the OS supports as long as you can figure out what the constant is, which
> you
> should be able to do by examining the termios.h header of your Linux.
>
> The 'standard' baud rates as far as JTermios is concerned are the standard
> POSIX baud rates ie
> 50,75,110,134,150,200,300,1200,1800,2400,4800,9600,19200,38400.
>
> But if I made myself clear you above you are not limited to these, in Mac
> OS X
> I think at least 14400 and 57600 are supported and in Windows in addition
> to those
> there is 56000,115200,128000 and 256000. In Linux I'm not sure what is the
> current
> state of affairs, but seem to recall that you can get 'weird' baud rate
> with special
> values, for example to set 230400 use 22.
>
> Hope this clarifies a bit (pun intended).
>
> br Kusti
>
> PS
>
> Since Trent was courteous enough to allow this discussion in the rxtx list
> I'm CC:ing the list.
>
>
>
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
--
Atte:
Daniel Dario Morales Salas
Ingeniero Civil en Computaci?n e Inform?tica
Tel?fono: 02 684 3417
Celular: 09 643 1802
Santiago, Chile
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From Kustaa.Nyholm at planmeca.com Fri May 6 07:47:17 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Fri, 6 May 2011 16:47:17 +0300
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
Message-ID:
On 5/6/11 16:33, "Daniel Morales Salas" wrote:
>Hi
>
>I'm developing an application that use rxtx to comunicate with a serial
>port (UART) to send commands to a PLCBUS device and it works perfect (I
>only tried in linux). I would like to try purejavacomm. Is all the serial
>port functionality ready to use ?
Hard to say, but it definitely is ready enough to be tried!
It works for some people, some people have reported some issues
that I'm working with.
br Kusti
>
From damorales at gmail.com Fri May 6 08:42:22 2011
From: damorales at gmail.com (Daniel Morales Salas)
Date: Fri, 6 May 2011 10:42:22 -0400
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References:
Message-ID:
Ok, I will try it this weekend and I will let you know how it goes.
Thanks and greetings!!
2011/5/6 Kustaa Nyholm
> On 5/6/11 16:33, "Daniel Morales Salas" wrote:
>
> >Hi
> >
> >I'm developing an application that use rxtx to comunicate with a serial
> >port (UART) to send commands to a PLCBUS device and it works perfect (I
> >only tried in linux). I would like to try purejavacomm. Is all the serial
> >port functionality ready to use ?
>
> Hard to say, but it definitely is ready enough to be tried!
>
> It works for some people, some people have reported some issues
> that I'm working with.
>
> br Kusti
> >
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
--
Atte:
Daniel Dario Morales Salas
Ingeniero Civil en Computaci?n e Inform?tica
Tel?fono: 02 684 3417
Celular: 09 643 1802
Santiago, Chile
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From blueeagle2 at gmail.com Sat May 7 01:35:18 2011
From: blueeagle2 at gmail.com (blueeagle2 at gmail.com)
Date: Sat, 7 May 2011 00:35:18 -0700
Subject: [Rxtx] rxtx for eclipse in Windows XP
Message-ID:
I installed the eclipse plugins for rxtx, but eclipse does not recognize the
import gnu.io.*;
What else do I need to do? I looked for a rxtx.jar file, but could not
locate one. Do eclipse plugins work differently?
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From aawolfe at gmail.com Sat May 7 05:07:44 2011
From: aawolfe at gmail.com (Aaron Wolfe)
Date: Sat, 7 May 2011 07:07:44 -0400
Subject: [Rxtx] USB latency woes
Message-ID:
I use RXTX in an open source project that implements a disk drive over
serial emulation for old 8 bit computers, and it's been great. In the
past the top rate the old computers could digest was 115k, but
recently a retro-guru has hacked up a way to do 230kbps.
We've found that throughput with USB adapters is poor, in some cases
barely better than 115k, yet with a real serial port the gains in
speed are large. It seems there is a large latency per operation on
all the USB adapters we've tried, although it varies a lot from one to
the next. By tweaking settings in the driver for the adapter, I've
been able to improve things, but still the best USB adapter (a
Prolific 2303) is about 10% slower than a real serial port, and the
others are worse.
The latency seems to occur per call to read() or write().. for
instance if I need to read 2 bytes, it takes almost twice as long to
do read(byte); read(byte) as it does a single read(byte[2]). We do a
lot of small i/o back and forth, sometimes a single byte. The largest
transaction is only about 260 bytes in one direction, a handful in the
other. By combining as many operations into larger blocks as I can,
latency can be reduced, but still it's having major effects and there
are some operations that just have to send lots of tiny bits back and
forth, no way to combine them.
Has anybody dealt with this and improved things, or is this just life
with USB->serial? There are lots of timing tweaks available in RXTX,
but I've had odd results when messing with them, especially with
different behavior on different platforms. I thought maybe there was
some magic combination of things that would help.
Thanks for any ideas
-Aaron
From Kustaa.Nyholm at planmeca.com Sat May 7 07:24:40 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Sat, 7 May 2011 16:24:40 +0300
Subject: [Rxtx] USB latency woes
In-Reply-To:
Message-ID:
On 5/7/11 14:07, "Aaron Wolfe" wrote:
>
>Has anybody dealt with this and improved things, or is this just life
>with USB->serial?
My experience is that this is life with USB. USB is based on 1 ms polling
(the host asks the device if it has any data once every msec) so if you
read
one byte it may well be that next byte is available 1 msec later.
Also some adapters, atleast FTDI has 10 msec (IIRC) latency when you write
anything less than an internal buffer full (64 bytes IIRC) so this really
kills your throughput if you do a lot of small transfers.
YMMV.
br Kusti
From Hans.Nouwens at xs4all.nl Sat May 7 07:47:41 2011
From: Hans.Nouwens at xs4all.nl (Hans Nouwens)
Date: Sat, 7 May 2011 15:47:41 +0200
Subject: [Rxtx] USB latency woes
In-Reply-To:
References:
Message-ID:
Aaron,
with the ftd chipset I use I'm able to set a legacy time-out to a minimum
of 1 ms. This means that whatever amount of bytes are waiting in the
buffer it sends or transmits anyway.
With some overhead I'm able to communicate with my hardware with 600
messages per second. My messages are usually smaller than 20 bytes.
Hans Nouwens.
> I use RXTX in an open source project that implements a disk drive over
> serial emulation for old 8 bit computers, and it's been great. In the
> past the top rate the old computers could digest was 115k, but
> recently a retro-guru has hacked up a way to do 230kbps.
>
> We've found that throughput with USB adapters is poor, in some cases
> barely better than 115k, yet with a real serial port the gains in
> speed are large. It seems there is a large latency per operation on
> all the USB adapters we've tried, although it varies a lot from one to
> the next. By tweaking settings in the driver for the adapter, I've
> been able to improve things, but still the best USB adapter (a
> Prolific 2303) is about 10% slower than a real serial port, and the
> others are worse.
>
> The latency seems to occur per call to read() or write().. for
> instance if I need to read 2 bytes, it takes almost twice as long to
> do read(byte); read(byte) as it does a single read(byte[2]). We do a
> lot of small i/o back and forth, sometimes a single byte. The largest
> transaction is only about 260 bytes in one direction, a handful in the
> other. By combining as many operations into larger blocks as I can,
> latency can be reduced, but still it's having major effects and there
> are some operations that just have to send lots of tiny bits back and
> forth, no way to combine them.
>
> Has anybody dealt with this and improved things, or is this just life
> with USB->serial? There are lots of timing tweaks available in RXTX,
> but I've had odd results when messing with them, especially with
> different behavior on different platforms. I thought maybe there was
> some magic combination of things that would help.
>
> Thanks for any ideas
> -Aaron
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
From will.tatam at red61.com Thu May 5 12:30:52 2011
From: will.tatam at red61.com (Will Tatam)
Date: Thu, 05 May 2011 19:30:52 +0100
Subject: [Rxtx] WebStart, rxtx, and amd64
In-Reply-To: <4DB5CDEC.2010707@gmail.com>
References: <4DB5CDEC.2010707@gmail.com>
Message-ID: <4DC2ECDC.6050109@red61.com>
On 25/04/11 20:39, Mike Markowski wrote:
> I've run into an odd problem that hopefully someone else has seen and solved.
> If I use WebStart for 32-bit linux, Intel, all is well. Java Console shows me
> that it arrives at the web server as os.name=Linux and os.arch=i386 and, sure
> enough, the jnlp file (attached below) points it to the correct native jar.
>
> However, if I try the same with 64-bit linux, Java Console shows os.name=Linux
> and os.arch=amd64. The bad news is that the jnlp file does not supply -any-
> rxtx native lib via WebStart. The only way I can get it to work is by adding
> the last linux entry that does not specify the architecture.
>
> I assume I'm doing something wrong but haven't figured it out yet. Thanks for
> any ideas!
>
> Mike
>
>
>
>
> RXTX
> ajmas
>
> Java API for serial port communication
> Java API for serial port communication.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
This following works for me using the sun jre
--
Will Tatam
Systems Architect
Red61
0845 867 2203 ext 103
From will.tatam at red61.com Thu May 5 12:42:01 2011
From: will.tatam at red61.com (Will Tatam)
Date: Thu, 05 May 2011 19:42:01 +0100
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References:
Message-ID: <4DC2EF79.2080108@red61.com>
On 12/04/11 11:27, Kustaa Nyholm wrote:
> Hi List,
>
> I could not resist so I had to create a Pure Java implementation of
> JavaComm SerialPort
> with no C-code or JNI in sight!
>
> If you are interested, please go to my website at:
>
> http://www.sparetimelabs.com/
>
> and select 'PureJavaComm' from the navigation on the left.
>
> br Kusti
>
>
Has anyone done any comparison testing between RXTX and this new project ?
Latency is where I'm most interested as RXTX is riddled with sleep() calls
--
Will Tatam
Systems Architect
Red61
From will.tatam at red61.com Thu May 5 13:01:07 2011
From: will.tatam at red61.com (Will Tatam)
Date: Thu, 05 May 2011 20:01:07 +0100
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To: <4DC2EF79.2080108@red61.com>
References:
<4DC2EF79.2080108@red61.com>
Message-ID: <4DC2F3F3.8020100@red61.com>
On 05/05/11 19:42, Will Tatam wrote:
> On 12/04/11 11:27, Kustaa Nyholm wrote:
>> Hi List,
>>
>> I could not resist so I had to create a Pure Java implementation of
>> JavaComm SerialPort
>> with no C-code or JNI in sight!
>>
>> If you are interested, please go to my website at:
>>
>> http://www.sparetimelabs.com/
>>
>> and select 'PureJavaComm' from the navigation on the left.
>>
>> br Kusti
>>
>>
>
> Has anyone done any comparison testing between RXTX and this new
> project ?
> Latency is where I'm most interested as RXTX is riddled with sleep()
> calls
>
Is the ParallelPort complete ? it appears to be missing functions like
isPaperOut() and isPrinterError()
--
Will Tatam
Systems Architect
Red61
0845 867 2203 ext 103
From Kustaa.Nyholm at planmeca.com Thu May 5 13:29:05 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Thu, 5 May 2011 22:29:05 +0300
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To: <4DC2F3F3.8020100@red61.com>
Message-ID:
On 5/5/11 22:01, "Will Tatam" wrote:
> Is the ParallelPort complete ? it appears to be missing functions like
> isPaperOut() and isPrinterError()
purejavacomm is strictly serial port, I've got no plans
to add parallel port, though of course it would not be
difficult, but I've got no hardware with parallel port.
> Has anyone done any comparison testing between RXTX and this new project
>?
> Latency is where I'm most interested as RXTX is riddled with sleep()
>calls
I don't think anyone has done anything like that yet. It is
early days with purejavacomm yet. At the moment basic functionality
works and I've got some positive reports but also some
users have identified some issues that I try to resolve
in the coming weeks.
I'm not sure if we are welcome to hijack rxtx list for
purejavacomm discussions. I don't mind but it is not for
me to say.
Also, please do not cc pete batard, he might get annoyed after
awhile as this really has nothing to do with him.
br Kusti
From tjarvi at qbang.org Thu May 5 19:56:15 2011
From: tjarvi at qbang.org (Trent Jarvi)
Date: Thu, 5 May 2011 19:56:15 -0600 (MDT)
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References:
Message-ID:
> I'm not sure if we are welcome to hijack rxtx list for
> purejavacomm discussions. I don't mind but it is not for
> me to say.
Hehe, Hijack? I guess that means we would lose something other than work?
Posts related to CommAPI are welcome here. Really, its open to the
general interest group as a whole with no expectations.
--
Trent Jarvi
tjarvi at qbang.org
From Kustaa.Nyholm at planmeca.com Thu May 5 23:59:37 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Fri, 6 May 2011 08:59:37 +0300
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To: <4DC33F55.2070004@gmail.com>
Message-ID:
On 5/6/11 03:22, "Curtis Hacker" wrote:
>Is there no common shared language structure between the OS's at this
>point ? jtermios.windows/macosx/linux ?
I'm not sure if I understand what you are asking?
The purejavacomm.* classes are 100% shared between the OSs and contains
all the functionality that implement javax.comm.* functionality in terms
of, or on top of, an idealized POSIX like device API which is implemented
by jtermios.JTermios class (plus the other structures in that package).
Especially the purejavacomm.PureJavaSerialPort does most of the work,
apart from the device enumeration which is in
purejavacomm.CommPortIdentifier
class.
So that is all 100% shared between the OS's.
JTermios defines all the necessary POSIX like API calls as static functions
that delegate the actual implementation to one of the OS/arch specific
implementation class instances defined in in the jtermios.*.JTermiosImpl
classes.
The implementing classes for POSIX -like operating systems are very thin
wrappers around JNA calls to the actual Unix/Linux standard C-library
calls.
There is very little actual code or definitions in them and what there is
cannot be shared between OS as this is the 'glue' that attaches the
abstract
with the concrete.
For Windows, which is totally unlike unix, the implementation class
jtermios.windows.JTermiosImpl contains quite a lot of code to do the
impedance matching between unix and windows way of doing things. This is
of course very Windows specific and cannot be shared.
JTermios defines, in addition to the API functions, all the constants
necessary to pass to the those functions, such as O_NONBLOCK, B19200
etc etc. The values of these constants varies between (or can vary, I
have not checked every OS out there ;-) operating systems, so these
cannot be defined 'final'. JTermios provides default values for these
constants which the JTermiosImpl class is supposed to write over in the
constructor if required. The default values are those from/for
Mac OS X 10.6.6 / x86_64 so that the macosx.JTermiosImpl does not need
to override anything. In Windows the values of these constant have no
meaning so the windows.JTermiosImpl can use the mac values as-is and
it does not need to change them. So at the moment only linux.JTermiosImpl
needs to change those constants from the default values.
Hope this clarifies.
>
>Non standard baud rates possible on linux and osx (10.4 or better) ?
Well, the way it works is that purejavacomm.PureJavaSerialPort checks if
the requested baud rate is one of the 'standard' (which standard BTW) baud
rates
and if so passes the OS specific constant to the next layer in the
communication stack, or, if the baud rate is non standard, then the
requested
value directly to the next layer. In unix-like systems the next layer is
basically
the OS API function so it is up to the OS to decide what to do with that.
In Mac OS X and Windows it turns out that the OS specific constant is
actually the baud
rate value so you it gets passed directly to the OS and you can use
whatever
the OS supports.
In Linux the OS specific constants are not directly the
baudrate values, for example the OS constant for 9600 baud is 15, but since
the non standard values get passed directly to the OS you can use whatever
the OS supports as long as you can figure out what the constant is, which
you
should be able to do by examining the termios.h header of your Linux.
The 'standard' baud rates as far as JTermios is concerned are the standard
POSIX baud rates ie
50,75,110,134,150,200,300,1200,1800,2400,4800,9600,19200,38400.
But if I made myself clear you above you are not limited to these, in Mac
OS X
I think at least 14400 and 57600 are supported and in Windows in addition
to those
there is 56000,115200,128000 and 256000. In Linux I'm not sure what is the
current
state of affairs, but seem to recall that you can get 'weird' baud rate
with special
values, for example to set 230400 use 22.
Hope this clarifies a bit (pun intended).
br Kusti
PS
Since Trent was courteous enough to allow this discussion in the rxtx list
I'm CC:ing the list.
From damorales at gmail.com Fri May 6 07:33:19 2011
From: damorales at gmail.com (Daniel Morales Salas)
Date: Fri, 6 May 2011 09:33:19 -0400
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References: <4DC33F55.2070004@gmail.com>
Message-ID:
Hi
I'm developing an application that use rxtx to comunicate with a serial port
(UART) to send commands to a PLCBUS device and it works perfect (I only
tried in linux). I would like to try purejavacomm. Is all the serial port
functionality ready to use ?
Thanks.
Greetings!
2011/5/6 Kustaa Nyholm
> On 5/6/11 03:22, "Curtis Hacker" wrote:
>
> >Is there no common shared language structure between the OS's at this
> >point ? jtermios.windows/macosx/linux ?
>
>
> I'm not sure if I understand what you are asking?
>
> The purejavacomm.* classes are 100% shared between the OSs and contains
> all the functionality that implement javax.comm.* functionality in terms
> of, or on top of, an idealized POSIX like device API which is implemented
> by jtermios.JTermios class (plus the other structures in that package).
>
> Especially the purejavacomm.PureJavaSerialPort does most of the work,
> apart from the device enumeration which is in
> purejavacomm.CommPortIdentifier
> class.
>
> So that is all 100% shared between the OS's.
>
>
> JTermios defines all the necessary POSIX like API calls as static functions
> that delegate the actual implementation to one of the OS/arch specific
> implementation class instances defined in in the jtermios.*.JTermiosImpl
> classes.
>
> The implementing classes for POSIX -like operating systems are very thin
> wrappers around JNA calls to the actual Unix/Linux standard C-library
> calls.
> There is very little actual code or definitions in them and what there is
> cannot be shared between OS as this is the 'glue' that attaches the
> abstract
> with the concrete.
>
> For Windows, which is totally unlike unix, the implementation class
> jtermios.windows.JTermiosImpl contains quite a lot of code to do the
> impedance matching between unix and windows way of doing things. This is
> of course very Windows specific and cannot be shared.
>
> JTermios defines, in addition to the API functions, all the constants
> necessary to pass to the those functions, such as O_NONBLOCK, B19200
> etc etc. The values of these constants varies between (or can vary, I
> have not checked every OS out there ;-) operating systems, so these
> cannot be defined 'final'. JTermios provides default values for these
> constants which the JTermiosImpl class is supposed to write over in the
> constructor if required. The default values are those from/for
> Mac OS X 10.6.6 / x86_64 so that the macosx.JTermiosImpl does not need
> to override anything. In Windows the values of these constant have no
> meaning so the windows.JTermiosImpl can use the mac values as-is and
> it does not need to change them. So at the moment only linux.JTermiosImpl
> needs to change those constants from the default values.
>
>
> Hope this clarifies.
>
> >
> >Non standard baud rates possible on linux and osx (10.4 or better) ?
>
> Well, the way it works is that purejavacomm.PureJavaSerialPort checks if
> the requested baud rate is one of the 'standard' (which standard BTW) baud
> rates
> and if so passes the OS specific constant to the next layer in the
> communication stack, or, if the baud rate is non standard, then the
> requested
> value directly to the next layer. In unix-like systems the next layer is
> basically
> the OS API function so it is up to the OS to decide what to do with that.
>
> In Mac OS X and Windows it turns out that the OS specific constant is
> actually the baud
> rate value so you it gets passed directly to the OS and you can use
> whatever
> the OS supports.
>
> In Linux the OS specific constants are not directly the
> baudrate values, for example the OS constant for 9600 baud is 15, but since
> the non standard values get passed directly to the OS you can use whatever
> the OS supports as long as you can figure out what the constant is, which
> you
> should be able to do by examining the termios.h header of your Linux.
>
> The 'standard' baud rates as far as JTermios is concerned are the standard
> POSIX baud rates ie
> 50,75,110,134,150,200,300,1200,1800,2400,4800,9600,19200,38400.
>
> But if I made myself clear you above you are not limited to these, in Mac
> OS X
> I think at least 14400 and 57600 are supported and in Windows in addition
> to those
> there is 56000,115200,128000 and 256000. In Linux I'm not sure what is the
> current
> state of affairs, but seem to recall that you can get 'weird' baud rate
> with special
> values, for example to set 230400 use 22.
>
> Hope this clarifies a bit (pun intended).
>
> br Kusti
>
> PS
>
> Since Trent was courteous enough to allow this discussion in the rxtx list
> I'm CC:ing the list.
>
>
>
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
--
Atte:
Daniel Dario Morales Salas
Ingeniero Civil en Computaci?n e Inform?tica
Tel?fono: 02 684 3417
Celular: 09 643 1802
Santiago, Chile
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From Kustaa.Nyholm at planmeca.com Fri May 6 07:47:17 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Fri, 6 May 2011 16:47:17 +0300
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
Message-ID:
On 5/6/11 16:33, "Daniel Morales Salas" wrote:
>Hi
>
>I'm developing an application that use rxtx to comunicate with a serial
>port (UART) to send commands to a PLCBUS device and it works perfect (I
>only tried in linux). I would like to try purejavacomm. Is all the serial
>port functionality ready to use ?
Hard to say, but it definitely is ready enough to be tried!
It works for some people, some people have reported some issues
that I'm working with.
br Kusti
>
From damorales at gmail.com Fri May 6 08:42:22 2011
From: damorales at gmail.com (Daniel Morales Salas)
Date: Fri, 6 May 2011 10:42:22 -0400
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References:
Message-ID:
Ok, I will try it this weekend and I will let you know how it goes.
Thanks and greetings!!
2011/5/6 Kustaa Nyholm
> On 5/6/11 16:33, "Daniel Morales Salas" wrote:
>
> >Hi
> >
> >I'm developing an application that use rxtx to comunicate with a serial
> >port (UART) to send commands to a PLCBUS device and it works perfect (I
> >only tried in linux). I would like to try purejavacomm. Is all the serial
> >port functionality ready to use ?
>
> Hard to say, but it definitely is ready enough to be tried!
>
> It works for some people, some people have reported some issues
> that I'm working with.
>
> br Kusti
> >
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
--
Atte:
Daniel Dario Morales Salas
Ingeniero Civil en Computaci?n e Inform?tica
Tel?fono: 02 684 3417
Celular: 09 643 1802
Santiago, Chile
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From blueeagle2 at gmail.com Sat May 7 01:35:18 2011
From: blueeagle2 at gmail.com (blueeagle2 at gmail.com)
Date: Sat, 7 May 2011 00:35:18 -0700
Subject: [Rxtx] rxtx for eclipse in Windows XP
Message-ID:
I installed the eclipse plugins for rxtx, but eclipse does not recognize the
import gnu.io.*;
What else do I need to do? I looked for a rxtx.jar file, but could not
locate one. Do eclipse plugins work differently?
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From aawolfe at gmail.com Sat May 7 05:07:44 2011
From: aawolfe at gmail.com (Aaron Wolfe)
Date: Sat, 7 May 2011 07:07:44 -0400
Subject: [Rxtx] USB latency woes
Message-ID:
I use RXTX in an open source project that implements a disk drive over
serial emulation for old 8 bit computers, and it's been great. In the
past the top rate the old computers could digest was 115k, but
recently a retro-guru has hacked up a way to do 230kbps.
We've found that throughput with USB adapters is poor, in some cases
barely better than 115k, yet with a real serial port the gains in
speed are large. It seems there is a large latency per operation on
all the USB adapters we've tried, although it varies a lot from one to
the next. By tweaking settings in the driver for the adapter, I've
been able to improve things, but still the best USB adapter (a
Prolific 2303) is about 10% slower than a real serial port, and the
others are worse.
The latency seems to occur per call to read() or write().. for
instance if I need to read 2 bytes, it takes almost twice as long to
do read(byte); read(byte) as it does a single read(byte[2]). We do a
lot of small i/o back and forth, sometimes a single byte. The largest
transaction is only about 260 bytes in one direction, a handful in the
other. By combining as many operations into larger blocks as I can,
latency can be reduced, but still it's having major effects and there
are some operations that just have to send lots of tiny bits back and
forth, no way to combine them.
Has anybody dealt with this and improved things, or is this just life
with USB->serial? There are lots of timing tweaks available in RXTX,
but I've had odd results when messing with them, especially with
different behavior on different platforms. I thought maybe there was
some magic combination of things that would help.
Thanks for any ideas
-Aaron
From Kustaa.Nyholm at planmeca.com Sat May 7 07:24:40 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Sat, 7 May 2011 16:24:40 +0300
Subject: [Rxtx] USB latency woes
In-Reply-To:
Message-ID:
On 5/7/11 14:07, "Aaron Wolfe" wrote:
>
>Has anybody dealt with this and improved things, or is this just life
>with USB->serial?
My experience is that this is life with USB. USB is based on 1 ms polling
(the host asks the device if it has any data once every msec) so if you
read
one byte it may well be that next byte is available 1 msec later.
Also some adapters, atleast FTDI has 10 msec (IIRC) latency when you write
anything less than an internal buffer full (64 bytes IIRC) so this really
kills your throughput if you do a lot of small transfers.
YMMV.
br Kusti
From Hans.Nouwens at xs4all.nl Sat May 7 07:47:41 2011
From: Hans.Nouwens at xs4all.nl (Hans Nouwens)
Date: Sat, 7 May 2011 15:47:41 +0200
Subject: [Rxtx] USB latency woes
In-Reply-To:
References:
Message-ID:
Aaron,
with the ftd chipset I use I'm able to set a legacy time-out to a minimum
of 1 ms. This means that whatever amount of bytes are waiting in the
buffer it sends or transmits anyway.
With some overhead I'm able to communicate with my hardware with 600
messages per second. My messages are usually smaller than 20 bytes.
Hans Nouwens.
> I use RXTX in an open source project that implements a disk drive over
> serial emulation for old 8 bit computers, and it's been great. In the
> past the top rate the old computers could digest was 115k, but
> recently a retro-guru has hacked up a way to do 230kbps.
>
> We've found that throughput with USB adapters is poor, in some cases
> barely better than 115k, yet with a real serial port the gains in
> speed are large. It seems there is a large latency per operation on
> all the USB adapters we've tried, although it varies a lot from one to
> the next. By tweaking settings in the driver for the adapter, I've
> been able to improve things, but still the best USB adapter (a
> Prolific 2303) is about 10% slower than a real serial port, and the
> others are worse.
>
> The latency seems to occur per call to read() or write().. for
> instance if I need to read 2 bytes, it takes almost twice as long to
> do read(byte); read(byte) as it does a single read(byte[2]). We do a
> lot of small i/o back and forth, sometimes a single byte. The largest
> transaction is only about 260 bytes in one direction, a handful in the
> other. By combining as many operations into larger blocks as I can,
> latency can be reduced, but still it's having major effects and there
> are some operations that just have to send lots of tiny bits back and
> forth, no way to combine them.
>
> Has anybody dealt with this and improved things, or is this just life
> with USB->serial? There are lots of timing tweaks available in RXTX,
> but I've had odd results when messing with them, especially with
> different behavior on different platforms. I thought maybe there was
> some magic combination of things that would help.
>
> Thanks for any ideas
> -Aaron
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
From will.tatam at red61.com Thu May 5 12:30:52 2011
From: will.tatam at red61.com (Will Tatam)
Date: Thu, 05 May 2011 19:30:52 +0100
Subject: [Rxtx] WebStart, rxtx, and amd64
In-Reply-To: <4DB5CDEC.2010707@gmail.com>
References: <4DB5CDEC.2010707@gmail.com>
Message-ID: <4DC2ECDC.6050109@red61.com>
On 25/04/11 20:39, Mike Markowski wrote:
> I've run into an odd problem that hopefully someone else has seen and solved.
> If I use WebStart for 32-bit linux, Intel, all is well. Java Console shows me
> that it arrives at the web server as os.name=Linux and os.arch=i386 and, sure
> enough, the jnlp file (attached below) points it to the correct native jar.
>
> However, if I try the same with 64-bit linux, Java Console shows os.name=Linux
> and os.arch=amd64. The bad news is that the jnlp file does not supply -any-
> rxtx native lib via WebStart. The only way I can get it to work is by adding
> the last linux entry that does not specify the architecture.
>
> I assume I'm doing something wrong but haven't figured it out yet. Thanks for
> any ideas!
>
> Mike
>
>
>
>
> RXTX
> ajmas
>
> Java API for serial port communication
> Java API for serial port communication.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
This following works for me using the sun jre
--
Will Tatam
Systems Architect
Red61
0845 867 2203 ext 103
From will.tatam at red61.com Thu May 5 12:42:01 2011
From: will.tatam at red61.com (Will Tatam)
Date: Thu, 05 May 2011 19:42:01 +0100
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References:
Message-ID: <4DC2EF79.2080108@red61.com>
On 12/04/11 11:27, Kustaa Nyholm wrote:
> Hi List,
>
> I could not resist so I had to create a Pure Java implementation of
> JavaComm SerialPort
> with no C-code or JNI in sight!
>
> If you are interested, please go to my website at:
>
> http://www.sparetimelabs.com/
>
> and select 'PureJavaComm' from the navigation on the left.
>
> br Kusti
>
>
Has anyone done any comparison testing between RXTX and this new project ?
Latency is where I'm most interested as RXTX is riddled with sleep() calls
--
Will Tatam
Systems Architect
Red61
From will.tatam at red61.com Thu May 5 13:01:07 2011
From: will.tatam at red61.com (Will Tatam)
Date: Thu, 05 May 2011 20:01:07 +0100
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To: <4DC2EF79.2080108@red61.com>
References:
<4DC2EF79.2080108@red61.com>
Message-ID: <4DC2F3F3.8020100@red61.com>
On 05/05/11 19:42, Will Tatam wrote:
> On 12/04/11 11:27, Kustaa Nyholm wrote:
>> Hi List,
>>
>> I could not resist so I had to create a Pure Java implementation of
>> JavaComm SerialPort
>> with no C-code or JNI in sight!
>>
>> If you are interested, please go to my website at:
>>
>> http://www.sparetimelabs.com/
>>
>> and select 'PureJavaComm' from the navigation on the left.
>>
>> br Kusti
>>
>>
>
> Has anyone done any comparison testing between RXTX and this new
> project ?
> Latency is where I'm most interested as RXTX is riddled with sleep()
> calls
>
Is the ParallelPort complete ? it appears to be missing functions like
isPaperOut() and isPrinterError()
--
Will Tatam
Systems Architect
Red61
0845 867 2203 ext 103
From Kustaa.Nyholm at planmeca.com Thu May 5 13:29:05 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Thu, 5 May 2011 22:29:05 +0300
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To: <4DC2F3F3.8020100@red61.com>
Message-ID:
On 5/5/11 22:01, "Will Tatam" wrote:
> Is the ParallelPort complete ? it appears to be missing functions like
> isPaperOut() and isPrinterError()
purejavacomm is strictly serial port, I've got no plans
to add parallel port, though of course it would not be
difficult, but I've got no hardware with parallel port.
> Has anyone done any comparison testing between RXTX and this new project
>?
> Latency is where I'm most interested as RXTX is riddled with sleep()
>calls
I don't think anyone has done anything like that yet. It is
early days with purejavacomm yet. At the moment basic functionality
works and I've got some positive reports but also some
users have identified some issues that I try to resolve
in the coming weeks.
I'm not sure if we are welcome to hijack rxtx list for
purejavacomm discussions. I don't mind but it is not for
me to say.
Also, please do not cc pete batard, he might get annoyed after
awhile as this really has nothing to do with him.
br Kusti
From tjarvi at qbang.org Thu May 5 19:56:15 2011
From: tjarvi at qbang.org (Trent Jarvi)
Date: Thu, 5 May 2011 19:56:15 -0600 (MDT)
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References:
Message-ID:
> I'm not sure if we are welcome to hijack rxtx list for
> purejavacomm discussions. I don't mind but it is not for
> me to say.
Hehe, Hijack? I guess that means we would lose something other than work?
Posts related to CommAPI are welcome here. Really, its open to the
general interest group as a whole with no expectations.
--
Trent Jarvi
tjarvi at qbang.org
From Kustaa.Nyholm at planmeca.com Thu May 5 23:59:37 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Fri, 6 May 2011 08:59:37 +0300
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To: <4DC33F55.2070004@gmail.com>
Message-ID:
On 5/6/11 03:22, "Curtis Hacker" wrote:
>Is there no common shared language structure between the OS's at this
>point ? jtermios.windows/macosx/linux ?
I'm not sure if I understand what you are asking?
The purejavacomm.* classes are 100% shared between the OSs and contains
all the functionality that implement javax.comm.* functionality in terms
of, or on top of, an idealized POSIX like device API which is implemented
by jtermios.JTermios class (plus the other structures in that package).
Especially the purejavacomm.PureJavaSerialPort does most of the work,
apart from the device enumeration which is in
purejavacomm.CommPortIdentifier
class.
So that is all 100% shared between the OS's.
JTermios defines all the necessary POSIX like API calls as static functions
that delegate the actual implementation to one of the OS/arch specific
implementation class instances defined in in the jtermios.*.JTermiosImpl
classes.
The implementing classes for POSIX -like operating systems are very thin
wrappers around JNA calls to the actual Unix/Linux standard C-library
calls.
There is very little actual code or definitions in them and what there is
cannot be shared between OS as this is the 'glue' that attaches the
abstract
with the concrete.
For Windows, which is totally unlike unix, the implementation class
jtermios.windows.JTermiosImpl contains quite a lot of code to do the
impedance matching between unix and windows way of doing things. This is
of course very Windows specific and cannot be shared.
JTermios defines, in addition to the API functions, all the constants
necessary to pass to the those functions, such as O_NONBLOCK, B19200
etc etc. The values of these constants varies between (or can vary, I
have not checked every OS out there ;-) operating systems, so these
cannot be defined 'final'. JTermios provides default values for these
constants which the JTermiosImpl class is supposed to write over in the
constructor if required. The default values are those from/for
Mac OS X 10.6.6 / x86_64 so that the macosx.JTermiosImpl does not need
to override anything. In Windows the values of these constant have no
meaning so the windows.JTermiosImpl can use the mac values as-is and
it does not need to change them. So at the moment only linux.JTermiosImpl
needs to change those constants from the default values.
Hope this clarifies.
>
>Non standard baud rates possible on linux and osx (10.4 or better) ?
Well, the way it works is that purejavacomm.PureJavaSerialPort checks if
the requested baud rate is one of the 'standard' (which standard BTW) baud
rates
and if so passes the OS specific constant to the next layer in the
communication stack, or, if the baud rate is non standard, then the
requested
value directly to the next layer. In unix-like systems the next layer is
basically
the OS API function so it is up to the OS to decide what to do with that.
In Mac OS X and Windows it turns out that the OS specific constant is
actually the baud
rate value so you it gets passed directly to the OS and you can use
whatever
the OS supports.
In Linux the OS specific constants are not directly the
baudrate values, for example the OS constant for 9600 baud is 15, but since
the non standard values get passed directly to the OS you can use whatever
the OS supports as long as you can figure out what the constant is, which
you
should be able to do by examining the termios.h header of your Linux.
The 'standard' baud rates as far as JTermios is concerned are the standard
POSIX baud rates ie
50,75,110,134,150,200,300,1200,1800,2400,4800,9600,19200,38400.
But if I made myself clear you above you are not limited to these, in Mac
OS X
I think at least 14400 and 57600 are supported and in Windows in addition
to those
there is 56000,115200,128000 and 256000. In Linux I'm not sure what is the
current
state of affairs, but seem to recall that you can get 'weird' baud rate
with special
values, for example to set 230400 use 22.
Hope this clarifies a bit (pun intended).
br Kusti
PS
Since Trent was courteous enough to allow this discussion in the rxtx list
I'm CC:ing the list.
From damorales at gmail.com Fri May 6 07:33:19 2011
From: damorales at gmail.com (Daniel Morales Salas)
Date: Fri, 6 May 2011 09:33:19 -0400
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References: <4DC33F55.2070004@gmail.com>
Message-ID:
Hi
I'm developing an application that use rxtx to comunicate with a serial port
(UART) to send commands to a PLCBUS device and it works perfect (I only
tried in linux). I would like to try purejavacomm. Is all the serial port
functionality ready to use ?
Thanks.
Greetings!
2011/5/6 Kustaa Nyholm
> On 5/6/11 03:22, "Curtis Hacker" wrote:
>
> >Is there no common shared language structure between the OS's at this
> >point ? jtermios.windows/macosx/linux ?
>
>
> I'm not sure if I understand what you are asking?
>
> The purejavacomm.* classes are 100% shared between the OSs and contains
> all the functionality that implement javax.comm.* functionality in terms
> of, or on top of, an idealized POSIX like device API which is implemented
> by jtermios.JTermios class (plus the other structures in that package).
>
> Especially the purejavacomm.PureJavaSerialPort does most of the work,
> apart from the device enumeration which is in
> purejavacomm.CommPortIdentifier
> class.
>
> So that is all 100% shared between the OS's.
>
>
> JTermios defines all the necessary POSIX like API calls as static functions
> that delegate the actual implementation to one of the OS/arch specific
> implementation class instances defined in in the jtermios.*.JTermiosImpl
> classes.
>
> The implementing classes for POSIX -like operating systems are very thin
> wrappers around JNA calls to the actual Unix/Linux standard C-library
> calls.
> There is very little actual code or definitions in them and what there is
> cannot be shared between OS as this is the 'glue' that attaches the
> abstract
> with the concrete.
>
> For Windows, which is totally unlike unix, the implementation class
> jtermios.windows.JTermiosImpl contains quite a lot of code to do the
> impedance matching between unix and windows way of doing things. This is
> of course very Windows specific and cannot be shared.
>
> JTermios defines, in addition to the API functions, all the constants
> necessary to pass to the those functions, such as O_NONBLOCK, B19200
> etc etc. The values of these constants varies between (or can vary, I
> have not checked every OS out there ;-) operating systems, so these
> cannot be defined 'final'. JTermios provides default values for these
> constants which the JTermiosImpl class is supposed to write over in the
> constructor if required. The default values are those from/for
> Mac OS X 10.6.6 / x86_64 so that the macosx.JTermiosImpl does not need
> to override anything. In Windows the values of these constant have no
> meaning so the windows.JTermiosImpl can use the mac values as-is and
> it does not need to change them. So at the moment only linux.JTermiosImpl
> needs to change those constants from the default values.
>
>
> Hope this clarifies.
>
> >
> >Non standard baud rates possible on linux and osx (10.4 or better) ?
>
> Well, the way it works is that purejavacomm.PureJavaSerialPort checks if
> the requested baud rate is one of the 'standard' (which standard BTW) baud
> rates
> and if so passes the OS specific constant to the next layer in the
> communication stack, or, if the baud rate is non standard, then the
> requested
> value directly to the next layer. In unix-like systems the next layer is
> basically
> the OS API function so it is up to the OS to decide what to do with that.
>
> In Mac OS X and Windows it turns out that the OS specific constant is
> actually the baud
> rate value so you it gets passed directly to the OS and you can use
> whatever
> the OS supports.
>
> In Linux the OS specific constants are not directly the
> baudrate values, for example the OS constant for 9600 baud is 15, but since
> the non standard values get passed directly to the OS you can use whatever
> the OS supports as long as you can figure out what the constant is, which
> you
> should be able to do by examining the termios.h header of your Linux.
>
> The 'standard' baud rates as far as JTermios is concerned are the standard
> POSIX baud rates ie
> 50,75,110,134,150,200,300,1200,1800,2400,4800,9600,19200,38400.
>
> But if I made myself clear you above you are not limited to these, in Mac
> OS X
> I think at least 14400 and 57600 are supported and in Windows in addition
> to those
> there is 56000,115200,128000 and 256000. In Linux I'm not sure what is the
> current
> state of affairs, but seem to recall that you can get 'weird' baud rate
> with special
> values, for example to set 230400 use 22.
>
> Hope this clarifies a bit (pun intended).
>
> br Kusti
>
> PS
>
> Since Trent was courteous enough to allow this discussion in the rxtx list
> I'm CC:ing the list.
>
>
>
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
--
Atte:
Daniel Dario Morales Salas
Ingeniero Civil en Computaci?n e Inform?tica
Tel?fono: 02 684 3417
Celular: 09 643 1802
Santiago, Chile
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From Kustaa.Nyholm at planmeca.com Fri May 6 07:47:17 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Fri, 6 May 2011 16:47:17 +0300
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
Message-ID:
On 5/6/11 16:33, "Daniel Morales Salas" wrote:
>Hi
>
>I'm developing an application that use rxtx to comunicate with a serial
>port (UART) to send commands to a PLCBUS device and it works perfect (I
>only tried in linux). I would like to try purejavacomm. Is all the serial
>port functionality ready to use ?
Hard to say, but it definitely is ready enough to be tried!
It works for some people, some people have reported some issues
that I'm working with.
br Kusti
>
From damorales at gmail.com Fri May 6 08:42:22 2011
From: damorales at gmail.com (Daniel Morales Salas)
Date: Fri, 6 May 2011 10:42:22 -0400
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References:
Message-ID:
Ok, I will try it this weekend and I will let you know how it goes.
Thanks and greetings!!
2011/5/6 Kustaa Nyholm
> On 5/6/11 16:33, "Daniel Morales Salas" wrote:
>
> >Hi
> >
> >I'm developing an application that use rxtx to comunicate with a serial
> >port (UART) to send commands to a PLCBUS device and it works perfect (I
> >only tried in linux). I would like to try purejavacomm. Is all the serial
> >port functionality ready to use ?
>
> Hard to say, but it definitely is ready enough to be tried!
>
> It works for some people, some people have reported some issues
> that I'm working with.
>
> br Kusti
> >
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
--
Atte:
Daniel Dario Morales Salas
Ingeniero Civil en Computaci?n e Inform?tica
Tel?fono: 02 684 3417
Celular: 09 643 1802
Santiago, Chile
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From blueeagle2 at gmail.com Sat May 7 01:35:18 2011
From: blueeagle2 at gmail.com (blueeagle2 at gmail.com)
Date: Sat, 7 May 2011 00:35:18 -0700
Subject: [Rxtx] rxtx for eclipse in Windows XP
Message-ID:
I installed the eclipse plugins for rxtx, but eclipse does not recognize the
import gnu.io.*;
What else do I need to do? I looked for a rxtx.jar file, but could not
locate one. Do eclipse plugins work differently?
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From aawolfe at gmail.com Sat May 7 05:07:44 2011
From: aawolfe at gmail.com (Aaron Wolfe)
Date: Sat, 7 May 2011 07:07:44 -0400
Subject: [Rxtx] USB latency woes
Message-ID:
I use RXTX in an open source project that implements a disk drive over
serial emulation for old 8 bit computers, and it's been great. In the
past the top rate the old computers could digest was 115k, but
recently a retro-guru has hacked up a way to do 230kbps.
We've found that throughput with USB adapters is poor, in some cases
barely better than 115k, yet with a real serial port the gains in
speed are large. It seems there is a large latency per operation on
all the USB adapters we've tried, although it varies a lot from one to
the next. By tweaking settings in the driver for the adapter, I've
been able to improve things, but still the best USB adapter (a
Prolific 2303) is about 10% slower than a real serial port, and the
others are worse.
The latency seems to occur per call to read() or write().. for
instance if I need to read 2 bytes, it takes almost twice as long to
do read(byte); read(byte) as it does a single read(byte[2]). We do a
lot of small i/o back and forth, sometimes a single byte. The largest
transaction is only about 260 bytes in one direction, a handful in the
other. By combining as many operations into larger blocks as I can,
latency can be reduced, but still it's having major effects and there
are some operations that just have to send lots of tiny bits back and
forth, no way to combine them.
Has anybody dealt with this and improved things, or is this just life
with USB->serial? There are lots of timing tweaks available in RXTX,
but I've had odd results when messing with them, especially with
different behavior on different platforms. I thought maybe there was
some magic combination of things that would help.
Thanks for any ideas
-Aaron
From Kustaa.Nyholm at planmeca.com Sat May 7 07:24:40 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Sat, 7 May 2011 16:24:40 +0300
Subject: [Rxtx] USB latency woes
In-Reply-To:
Message-ID:
On 5/7/11 14:07, "Aaron Wolfe" wrote:
>
>Has anybody dealt with this and improved things, or is this just life
>with USB->serial?
My experience is that this is life with USB. USB is based on 1 ms polling
(the host asks the device if it has any data once every msec) so if you
read
one byte it may well be that next byte is available 1 msec later.
Also some adapters, atleast FTDI has 10 msec (IIRC) latency when you write
anything less than an internal buffer full (64 bytes IIRC) so this really
kills your throughput if you do a lot of small transfers.
YMMV.
br Kusti
From Hans.Nouwens at xs4all.nl Sat May 7 07:47:41 2011
From: Hans.Nouwens at xs4all.nl (Hans Nouwens)
Date: Sat, 7 May 2011 15:47:41 +0200
Subject: [Rxtx] USB latency woes
In-Reply-To:
References:
Message-ID:
Aaron,
with the ftd chipset I use I'm able to set a legacy time-out to a minimum
of 1 ms. This means that whatever amount of bytes are waiting in the
buffer it sends or transmits anyway.
With some overhead I'm able to communicate with my hardware with 600
messages per second. My messages are usually smaller than 20 bytes.
Hans Nouwens.
> I use RXTX in an open source project that implements a disk drive over
> serial emulation for old 8 bit computers, and it's been great. In the
> past the top rate the old computers could digest was 115k, but
> recently a retro-guru has hacked up a way to do 230kbps.
>
> We've found that throughput with USB adapters is poor, in some cases
> barely better than 115k, yet with a real serial port the gains in
> speed are large. It seems there is a large latency per operation on
> all the USB adapters we've tried, although it varies a lot from one to
> the next. By tweaking settings in the driver for the adapter, I've
> been able to improve things, but still the best USB adapter (a
> Prolific 2303) is about 10% slower than a real serial port, and the
> others are worse.
>
> The latency seems to occur per call to read() or write().. for
> instance if I need to read 2 bytes, it takes almost twice as long to
> do read(byte); read(byte) as it does a single read(byte[2]). We do a
> lot of small i/o back and forth, sometimes a single byte. The largest
> transaction is only about 260 bytes in one direction, a handful in the
> other. By combining as many operations into larger blocks as I can,
> latency can be reduced, but still it's having major effects and there
> are some operations that just have to send lots of tiny bits back and
> forth, no way to combine them.
>
> Has anybody dealt with this and improved things, or is this just life
> with USB->serial? There are lots of timing tweaks available in RXTX,
> but I've had odd results when messing with them, especially with
> different behavior on different platforms. I thought maybe there was
> some magic combination of things that would help.
>
> Thanks for any ideas
> -Aaron
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
From will.tatam at red61.com Thu May 5 12:30:52 2011
From: will.tatam at red61.com (Will Tatam)
Date: Thu, 05 May 2011 19:30:52 +0100
Subject: [Rxtx] WebStart, rxtx, and amd64
In-Reply-To: <4DB5CDEC.2010707@gmail.com>
References: <4DB5CDEC.2010707@gmail.com>
Message-ID: <4DC2ECDC.6050109@red61.com>
On 25/04/11 20:39, Mike Markowski wrote:
> I've run into an odd problem that hopefully someone else has seen and solved.
> If I use WebStart for 32-bit linux, Intel, all is well. Java Console shows me
> that it arrives at the web server as os.name=Linux and os.arch=i386 and, sure
> enough, the jnlp file (attached below) points it to the correct native jar.
>
> However, if I try the same with 64-bit linux, Java Console shows os.name=Linux
> and os.arch=amd64. The bad news is that the jnlp file does not supply -any-
> rxtx native lib via WebStart. The only way I can get it to work is by adding
> the last linux entry that does not specify the architecture.
>
> I assume I'm doing something wrong but haven't figured it out yet. Thanks for
> any ideas!
>
> Mike
>
>
>
>
> RXTX
> ajmas
>
> Java API for serial port communication
> Java API for serial port communication.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
This following works for me using the sun jre
--
Will Tatam
Systems Architect
Red61
0845 867 2203 ext 103
From will.tatam at red61.com Thu May 5 12:42:01 2011
From: will.tatam at red61.com (Will Tatam)
Date: Thu, 05 May 2011 19:42:01 +0100
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References:
Message-ID: <4DC2EF79.2080108@red61.com>
On 12/04/11 11:27, Kustaa Nyholm wrote:
> Hi List,
>
> I could not resist so I had to create a Pure Java implementation of
> JavaComm SerialPort
> with no C-code or JNI in sight!
>
> If you are interested, please go to my website at:
>
> http://www.sparetimelabs.com/
>
> and select 'PureJavaComm' from the navigation on the left.
>
> br Kusti
>
>
Has anyone done any comparison testing between RXTX and this new project ?
Latency is where I'm most interested as RXTX is riddled with sleep() calls
--
Will Tatam
Systems Architect
Red61
From will.tatam at red61.com Thu May 5 13:01:07 2011
From: will.tatam at red61.com (Will Tatam)
Date: Thu, 05 May 2011 20:01:07 +0100
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To: <4DC2EF79.2080108@red61.com>
References:
<4DC2EF79.2080108@red61.com>
Message-ID: <4DC2F3F3.8020100@red61.com>
On 05/05/11 19:42, Will Tatam wrote:
> On 12/04/11 11:27, Kustaa Nyholm wrote:
>> Hi List,
>>
>> I could not resist so I had to create a Pure Java implementation of
>> JavaComm SerialPort
>> with no C-code or JNI in sight!
>>
>> If you are interested, please go to my website at:
>>
>> http://www.sparetimelabs.com/
>>
>> and select 'PureJavaComm' from the navigation on the left.
>>
>> br Kusti
>>
>>
>
> Has anyone done any comparison testing between RXTX and this new
> project ?
> Latency is where I'm most interested as RXTX is riddled with sleep()
> calls
>
Is the ParallelPort complete ? it appears to be missing functions like
isPaperOut() and isPrinterError()
--
Will Tatam
Systems Architect
Red61
0845 867 2203 ext 103
From Kustaa.Nyholm at planmeca.com Thu May 5 13:29:05 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Thu, 5 May 2011 22:29:05 +0300
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To: <4DC2F3F3.8020100@red61.com>
Message-ID:
On 5/5/11 22:01, "Will Tatam" wrote:
> Is the ParallelPort complete ? it appears to be missing functions like
> isPaperOut() and isPrinterError()
purejavacomm is strictly serial port, I've got no plans
to add parallel port, though of course it would not be
difficult, but I've got no hardware with parallel port.
> Has anyone done any comparison testing between RXTX and this new project
>?
> Latency is where I'm most interested as RXTX is riddled with sleep()
>calls
I don't think anyone has done anything like that yet. It is
early days with purejavacomm yet. At the moment basic functionality
works and I've got some positive reports but also some
users have identified some issues that I try to resolve
in the coming weeks.
I'm not sure if we are welcome to hijack rxtx list for
purejavacomm discussions. I don't mind but it is not for
me to say.
Also, please do not cc pete batard, he might get annoyed after
awhile as this really has nothing to do with him.
br Kusti
From tjarvi at qbang.org Thu May 5 19:56:15 2011
From: tjarvi at qbang.org (Trent Jarvi)
Date: Thu, 5 May 2011 19:56:15 -0600 (MDT)
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References:
Message-ID:
> I'm not sure if we are welcome to hijack rxtx list for
> purejavacomm discussions. I don't mind but it is not for
> me to say.
Hehe, Hijack? I guess that means we would lose something other than work?
Posts related to CommAPI are welcome here. Really, its open to the
general interest group as a whole with no expectations.
--
Trent Jarvi
tjarvi at qbang.org
From Kustaa.Nyholm at planmeca.com Thu May 5 23:59:37 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Fri, 6 May 2011 08:59:37 +0300
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To: <4DC33F55.2070004@gmail.com>
Message-ID:
On 5/6/11 03:22, "Curtis Hacker" wrote:
>Is there no common shared language structure between the OS's at this
>point ? jtermios.windows/macosx/linux ?
I'm not sure if I understand what you are asking?
The purejavacomm.* classes are 100% shared between the OSs and contains
all the functionality that implement javax.comm.* functionality in terms
of, or on top of, an idealized POSIX like device API which is implemented
by jtermios.JTermios class (plus the other structures in that package).
Especially the purejavacomm.PureJavaSerialPort does most of the work,
apart from the device enumeration which is in
purejavacomm.CommPortIdentifier
class.
So that is all 100% shared between the OS's.
JTermios defines all the necessary POSIX like API calls as static functions
that delegate the actual implementation to one of the OS/arch specific
implementation class instances defined in in the jtermios.*.JTermiosImpl
classes.
The implementing classes for POSIX -like operating systems are very thin
wrappers around JNA calls to the actual Unix/Linux standard C-library
calls.
There is very little actual code or definitions in them and what there is
cannot be shared between OS as this is the 'glue' that attaches the
abstract
with the concrete.
For Windows, which is totally unlike unix, the implementation class
jtermios.windows.JTermiosImpl contains quite a lot of code to do the
impedance matching between unix and windows way of doing things. This is
of course very Windows specific and cannot be shared.
JTermios defines, in addition to the API functions, all the constants
necessary to pass to the those functions, such as O_NONBLOCK, B19200
etc etc. The values of these constants varies between (or can vary, I
have not checked every OS out there ;-) operating systems, so these
cannot be defined 'final'. JTermios provides default values for these
constants which the JTermiosImpl class is supposed to write over in the
constructor if required. The default values are those from/for
Mac OS X 10.6.6 / x86_64 so that the macosx.JTermiosImpl does not need
to override anything. In Windows the values of these constant have no
meaning so the windows.JTermiosImpl can use the mac values as-is and
it does not need to change them. So at the moment only linux.JTermiosImpl
needs to change those constants from the default values.
Hope this clarifies.
>
>Non standard baud rates possible on linux and osx (10.4 or better) ?
Well, the way it works is that purejavacomm.PureJavaSerialPort checks if
the requested baud rate is one of the 'standard' (which standard BTW) baud
rates
and if so passes the OS specific constant to the next layer in the
communication stack, or, if the baud rate is non standard, then the
requested
value directly to the next layer. In unix-like systems the next layer is
basically
the OS API function so it is up to the OS to decide what to do with that.
In Mac OS X and Windows it turns out that the OS specific constant is
actually the baud
rate value so you it gets passed directly to the OS and you can use
whatever
the OS supports.
In Linux the OS specific constants are not directly the
baudrate values, for example the OS constant for 9600 baud is 15, but since
the non standard values get passed directly to the OS you can use whatever
the OS supports as long as you can figure out what the constant is, which
you
should be able to do by examining the termios.h header of your Linux.
The 'standard' baud rates as far as JTermios is concerned are the standard
POSIX baud rates ie
50,75,110,134,150,200,300,1200,1800,2400,4800,9600,19200,38400.
But if I made myself clear you above you are not limited to these, in Mac
OS X
I think at least 14400 and 57600 are supported and in Windows in addition
to those
there is 56000,115200,128000 and 256000. In Linux I'm not sure what is the
current
state of affairs, but seem to recall that you can get 'weird' baud rate
with special
values, for example to set 230400 use 22.
Hope this clarifies a bit (pun intended).
br Kusti
PS
Since Trent was courteous enough to allow this discussion in the rxtx list
I'm CC:ing the list.
From damorales at gmail.com Fri May 6 07:33:19 2011
From: damorales at gmail.com (Daniel Morales Salas)
Date: Fri, 6 May 2011 09:33:19 -0400
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References: <4DC33F55.2070004@gmail.com>
Message-ID:
Hi
I'm developing an application that use rxtx to comunicate with a serial port
(UART) to send commands to a PLCBUS device and it works perfect (I only
tried in linux). I would like to try purejavacomm. Is all the serial port
functionality ready to use ?
Thanks.
Greetings!
2011/5/6 Kustaa Nyholm
> On 5/6/11 03:22, "Curtis Hacker" wrote:
>
> >Is there no common shared language structure between the OS's at this
> >point ? jtermios.windows/macosx/linux ?
>
>
> I'm not sure if I understand what you are asking?
>
> The purejavacomm.* classes are 100% shared between the OSs and contains
> all the functionality that implement javax.comm.* functionality in terms
> of, or on top of, an idealized POSIX like device API which is implemented
> by jtermios.JTermios class (plus the other structures in that package).
>
> Especially the purejavacomm.PureJavaSerialPort does most of the work,
> apart from the device enumeration which is in
> purejavacomm.CommPortIdentifier
> class.
>
> So that is all 100% shared between the OS's.
>
>
> JTermios defines all the necessary POSIX like API calls as static functions
> that delegate the actual implementation to one of the OS/arch specific
> implementation class instances defined in in the jtermios.*.JTermiosImpl
> classes.
>
> The implementing classes for POSIX -like operating systems are very thin
> wrappers around JNA calls to the actual Unix/Linux standard C-library
> calls.
> There is very little actual code or definitions in them and what there is
> cannot be shared between OS as this is the 'glue' that attaches the
> abstract
> with the concrete.
>
> For Windows, which is totally unlike unix, the implementation class
> jtermios.windows.JTermiosImpl contains quite a lot of code to do the
> impedance matching between unix and windows way of doing things. This is
> of course very Windows specific and cannot be shared.
>
> JTermios defines, in addition to the API functions, all the constants
> necessary to pass to the those functions, such as O_NONBLOCK, B19200
> etc etc. The values of these constants varies between (or can vary, I
> have not checked every OS out there ;-) operating systems, so these
> cannot be defined 'final'. JTermios provides default values for these
> constants which the JTermiosImpl class is supposed to write over in the
> constructor if required. The default values are those from/for
> Mac OS X 10.6.6 / x86_64 so that the macosx.JTermiosImpl does not need
> to override anything. In Windows the values of these constant have no
> meaning so the windows.JTermiosImpl can use the mac values as-is and
> it does not need to change them. So at the moment only linux.JTermiosImpl
> needs to change those constants from the default values.
>
>
> Hope this clarifies.
>
> >
> >Non standard baud rates possible on linux and osx (10.4 or better) ?
>
> Well, the way it works is that purejavacomm.PureJavaSerialPort checks if
> the requested baud rate is one of the 'standard' (which standard BTW) baud
> rates
> and if so passes the OS specific constant to the next layer in the
> communication stack, or, if the baud rate is non standard, then the
> requested
> value directly to the next layer. In unix-like systems the next layer is
> basically
> the OS API function so it is up to the OS to decide what to do with that.
>
> In Mac OS X and Windows it turns out that the OS specific constant is
> actually the baud
> rate value so you it gets passed directly to the OS and you can use
> whatever
> the OS supports.
>
> In Linux the OS specific constants are not directly the
> baudrate values, for example the OS constant for 9600 baud is 15, but since
> the non standard values get passed directly to the OS you can use whatever
> the OS supports as long as you can figure out what the constant is, which
> you
> should be able to do by examining the termios.h header of your Linux.
>
> The 'standard' baud rates as far as JTermios is concerned are the standard
> POSIX baud rates ie
> 50,75,110,134,150,200,300,1200,1800,2400,4800,9600,19200,38400.
>
> But if I made myself clear you above you are not limited to these, in Mac
> OS X
> I think at least 14400 and 57600 are supported and in Windows in addition
> to those
> there is 56000,115200,128000 and 256000. In Linux I'm not sure what is the
> current
> state of affairs, but seem to recall that you can get 'weird' baud rate
> with special
> values, for example to set 230400 use 22.
>
> Hope this clarifies a bit (pun intended).
>
> br Kusti
>
> PS
>
> Since Trent was courteous enough to allow this discussion in the rxtx list
> I'm CC:ing the list.
>
>
>
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
--
Atte:
Daniel Dario Morales Salas
Ingeniero Civil en Computaci?n e Inform?tica
Tel?fono: 02 684 3417
Celular: 09 643 1802
Santiago, Chile
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From Kustaa.Nyholm at planmeca.com Fri May 6 07:47:17 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Fri, 6 May 2011 16:47:17 +0300
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
Message-ID:
On 5/6/11 16:33, "Daniel Morales Salas" wrote:
>Hi
>
>I'm developing an application that use rxtx to comunicate with a serial
>port (UART) to send commands to a PLCBUS device and it works perfect (I
>only tried in linux). I would like to try purejavacomm. Is all the serial
>port functionality ready to use ?
Hard to say, but it definitely is ready enough to be tried!
It works for some people, some people have reported some issues
that I'm working with.
br Kusti
>
From damorales at gmail.com Fri May 6 08:42:22 2011
From: damorales at gmail.com (Daniel Morales Salas)
Date: Fri, 6 May 2011 10:42:22 -0400
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References:
Message-ID:
Ok, I will try it this weekend and I will let you know how it goes.
Thanks and greetings!!
2011/5/6 Kustaa Nyholm
> On 5/6/11 16:33, "Daniel Morales Salas" wrote:
>
> >Hi
> >
> >I'm developing an application that use rxtx to comunicate with a serial
> >port (UART) to send commands to a PLCBUS device and it works perfect (I
> >only tried in linux). I would like to try purejavacomm. Is all the serial
> >port functionality ready to use ?
>
> Hard to say, but it definitely is ready enough to be tried!
>
> It works for some people, some people have reported some issues
> that I'm working with.
>
> br Kusti
> >
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
--
Atte:
Daniel Dario Morales Salas
Ingeniero Civil en Computaci?n e Inform?tica
Tel?fono: 02 684 3417
Celular: 09 643 1802
Santiago, Chile
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From blueeagle2 at gmail.com Sat May 7 01:35:18 2011
From: blueeagle2 at gmail.com (blueeagle2 at gmail.com)
Date: Sat, 7 May 2011 00:35:18 -0700
Subject: [Rxtx] rxtx for eclipse in Windows XP
Message-ID:
I installed the eclipse plugins for rxtx, but eclipse does not recognize the
import gnu.io.*;
What else do I need to do? I looked for a rxtx.jar file, but could not
locate one. Do eclipse plugins work differently?
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From aawolfe at gmail.com Sat May 7 05:07:44 2011
From: aawolfe at gmail.com (Aaron Wolfe)
Date: Sat, 7 May 2011 07:07:44 -0400
Subject: [Rxtx] USB latency woes
Message-ID:
I use RXTX in an open source project that implements a disk drive over
serial emulation for old 8 bit computers, and it's been great. In the
past the top rate the old computers could digest was 115k, but
recently a retro-guru has hacked up a way to do 230kbps.
We've found that throughput with USB adapters is poor, in some cases
barely better than 115k, yet with a real serial port the gains in
speed are large. It seems there is a large latency per operation on
all the USB adapters we've tried, although it varies a lot from one to
the next. By tweaking settings in the driver for the adapter, I've
been able to improve things, but still the best USB adapter (a
Prolific 2303) is about 10% slower than a real serial port, and the
others are worse.
The latency seems to occur per call to read() or write().. for
instance if I need to read 2 bytes, it takes almost twice as long to
do read(byte); read(byte) as it does a single read(byte[2]). We do a
lot of small i/o back and forth, sometimes a single byte. The largest
transaction is only about 260 bytes in one direction, a handful in the
other. By combining as many operations into larger blocks as I can,
latency can be reduced, but still it's having major effects and there
are some operations that just have to send lots of tiny bits back and
forth, no way to combine them.
Has anybody dealt with this and improved things, or is this just life
with USB->serial? There are lots of timing tweaks available in RXTX,
but I've had odd results when messing with them, especially with
different behavior on different platforms. I thought maybe there was
some magic combination of things that would help.
Thanks for any ideas
-Aaron
From Kustaa.Nyholm at planmeca.com Sat May 7 07:24:40 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Sat, 7 May 2011 16:24:40 +0300
Subject: [Rxtx] USB latency woes
In-Reply-To:
Message-ID:
On 5/7/11 14:07, "Aaron Wolfe" wrote:
>
>Has anybody dealt with this and improved things, or is this just life
>with USB->serial?
My experience is that this is life with USB. USB is based on 1 ms polling
(the host asks the device if it has any data once every msec) so if you
read
one byte it may well be that next byte is available 1 msec later.
Also some adapters, atleast FTDI has 10 msec (IIRC) latency when you write
anything less than an internal buffer full (64 bytes IIRC) so this really
kills your throughput if you do a lot of small transfers.
YMMV.
br Kusti
From Hans.Nouwens at xs4all.nl Sat May 7 07:47:41 2011
From: Hans.Nouwens at xs4all.nl (Hans Nouwens)
Date: Sat, 7 May 2011 15:47:41 +0200
Subject: [Rxtx] USB latency woes
In-Reply-To:
References:
Message-ID:
Aaron,
with the ftd chipset I use I'm able to set a legacy time-out to a minimum
of 1 ms. This means that whatever amount of bytes are waiting in the
buffer it sends or transmits anyway.
With some overhead I'm able to communicate with my hardware with 600
messages per second. My messages are usually smaller than 20 bytes.
Hans Nouwens.
> I use RXTX in an open source project that implements a disk drive over
> serial emulation for old 8 bit computers, and it's been great. In the
> past the top rate the old computers could digest was 115k, but
> recently a retro-guru has hacked up a way to do 230kbps.
>
> We've found that throughput with USB adapters is poor, in some cases
> barely better than 115k, yet with a real serial port the gains in
> speed are large. It seems there is a large latency per operation on
> all the USB adapters we've tried, although it varies a lot from one to
> the next. By tweaking settings in the driver for the adapter, I've
> been able to improve things, but still the best USB adapter (a
> Prolific 2303) is about 10% slower than a real serial port, and the
> others are worse.
>
> The latency seems to occur per call to read() or write().. for
> instance if I need to read 2 bytes, it takes almost twice as long to
> do read(byte); read(byte) as it does a single read(byte[2]). We do a
> lot of small i/o back and forth, sometimes a single byte. The largest
> transaction is only about 260 bytes in one direction, a handful in the
> other. By combining as many operations into larger blocks as I can,
> latency can be reduced, but still it's having major effects and there
> are some operations that just have to send lots of tiny bits back and
> forth, no way to combine them.
>
> Has anybody dealt with this and improved things, or is this just life
> with USB->serial? There are lots of timing tweaks available in RXTX,
> but I've had odd results when messing with them, especially with
> different behavior on different platforms. I thought maybe there was
> some magic combination of things that would help.
>
> Thanks for any ideas
> -Aaron
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
From will.tatam at red61.com Thu May 5 12:30:52 2011
From: will.tatam at red61.com (Will Tatam)
Date: Thu, 05 May 2011 19:30:52 +0100
Subject: [Rxtx] WebStart, rxtx, and amd64
In-Reply-To: <4DB5CDEC.2010707@gmail.com>
References: <4DB5CDEC.2010707@gmail.com>
Message-ID: <4DC2ECDC.6050109@red61.com>
On 25/04/11 20:39, Mike Markowski wrote:
> I've run into an odd problem that hopefully someone else has seen and solved.
> If I use WebStart for 32-bit linux, Intel, all is well. Java Console shows me
> that it arrives at the web server as os.name=Linux and os.arch=i386 and, sure
> enough, the jnlp file (attached below) points it to the correct native jar.
>
> However, if I try the same with 64-bit linux, Java Console shows os.name=Linux
> and os.arch=amd64. The bad news is that the jnlp file does not supply -any-
> rxtx native lib via WebStart. The only way I can get it to work is by adding
> the last linux entry that does not specify the architecture.
>
> I assume I'm doing something wrong but haven't figured it out yet. Thanks for
> any ideas!
>
> Mike
>
>
>
>
> RXTX
> ajmas
>
> Java API for serial port communication
> Java API for serial port communication.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
This following works for me using the sun jre
--
Will Tatam
Systems Architect
Red61
0845 867 2203 ext 103
From will.tatam at red61.com Thu May 5 12:42:01 2011
From: will.tatam at red61.com (Will Tatam)
Date: Thu, 05 May 2011 19:42:01 +0100
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References:
Message-ID: <4DC2EF79.2080108@red61.com>
On 12/04/11 11:27, Kustaa Nyholm wrote:
> Hi List,
>
> I could not resist so I had to create a Pure Java implementation of
> JavaComm SerialPort
> with no C-code or JNI in sight!
>
> If you are interested, please go to my website at:
>
> http://www.sparetimelabs.com/
>
> and select 'PureJavaComm' from the navigation on the left.
>
> br Kusti
>
>
Has anyone done any comparison testing between RXTX and this new project ?
Latency is where I'm most interested as RXTX is riddled with sleep() calls
--
Will Tatam
Systems Architect
Red61
From will.tatam at red61.com Thu May 5 13:01:07 2011
From: will.tatam at red61.com (Will Tatam)
Date: Thu, 05 May 2011 20:01:07 +0100
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To: <4DC2EF79.2080108@red61.com>
References:
<4DC2EF79.2080108@red61.com>
Message-ID: <4DC2F3F3.8020100@red61.com>
On 05/05/11 19:42, Will Tatam wrote:
> On 12/04/11 11:27, Kustaa Nyholm wrote:
>> Hi List,
>>
>> I could not resist so I had to create a Pure Java implementation of
>> JavaComm SerialPort
>> with no C-code or JNI in sight!
>>
>> If you are interested, please go to my website at:
>>
>> http://www.sparetimelabs.com/
>>
>> and select 'PureJavaComm' from the navigation on the left.
>>
>> br Kusti
>>
>>
>
> Has anyone done any comparison testing between RXTX and this new
> project ?
> Latency is where I'm most interested as RXTX is riddled with sleep()
> calls
>
Is the ParallelPort complete ? it appears to be missing functions like
isPaperOut() and isPrinterError()
--
Will Tatam
Systems Architect
Red61
0845 867 2203 ext 103
From Kustaa.Nyholm at planmeca.com Thu May 5 13:29:05 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Thu, 5 May 2011 22:29:05 +0300
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To: <4DC2F3F3.8020100@red61.com>
Message-ID:
On 5/5/11 22:01, "Will Tatam" wrote:
> Is the ParallelPort complete ? it appears to be missing functions like
> isPaperOut() and isPrinterError()
purejavacomm is strictly serial port, I've got no plans
to add parallel port, though of course it would not be
difficult, but I've got no hardware with parallel port.
> Has anyone done any comparison testing between RXTX and this new project
>?
> Latency is where I'm most interested as RXTX is riddled with sleep()
>calls
I don't think anyone has done anything like that yet. It is
early days with purejavacomm yet. At the moment basic functionality
works and I've got some positive reports but also some
users have identified some issues that I try to resolve
in the coming weeks.
I'm not sure if we are welcome to hijack rxtx list for
purejavacomm discussions. I don't mind but it is not for
me to say.
Also, please do not cc pete batard, he might get annoyed after
awhile as this really has nothing to do with him.
br Kusti
From tjarvi at qbang.org Thu May 5 19:56:15 2011
From: tjarvi at qbang.org (Trent Jarvi)
Date: Thu, 5 May 2011 19:56:15 -0600 (MDT)
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References:
Message-ID:
> I'm not sure if we are welcome to hijack rxtx list for
> purejavacomm discussions. I don't mind but it is not for
> me to say.
Hehe, Hijack? I guess that means we would lose something other than work?
Posts related to CommAPI are welcome here. Really, its open to the
general interest group as a whole with no expectations.
--
Trent Jarvi
tjarvi at qbang.org
From Kustaa.Nyholm at planmeca.com Thu May 5 23:59:37 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Fri, 6 May 2011 08:59:37 +0300
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To: <4DC33F55.2070004@gmail.com>
Message-ID:
On 5/6/11 03:22, "Curtis Hacker" wrote:
>Is there no common shared language structure between the OS's at this
>point ? jtermios.windows/macosx/linux ?
I'm not sure if I understand what you are asking?
The purejavacomm.* classes are 100% shared between the OSs and contains
all the functionality that implement javax.comm.* functionality in terms
of, or on top of, an idealized POSIX like device API which is implemented
by jtermios.JTermios class (plus the other structures in that package).
Especially the purejavacomm.PureJavaSerialPort does most of the work,
apart from the device enumeration which is in
purejavacomm.CommPortIdentifier
class.
So that is all 100% shared between the OS's.
JTermios defines all the necessary POSIX like API calls as static functions
that delegate the actual implementation to one of the OS/arch specific
implementation class instances defined in in the jtermios.*.JTermiosImpl
classes.
The implementing classes for POSIX -like operating systems are very thin
wrappers around JNA calls to the actual Unix/Linux standard C-library
calls.
There is very little actual code or definitions in them and what there is
cannot be shared between OS as this is the 'glue' that attaches the
abstract
with the concrete.
For Windows, which is totally unlike unix, the implementation class
jtermios.windows.JTermiosImpl contains quite a lot of code to do the
impedance matching between unix and windows way of doing things. This is
of course very Windows specific and cannot be shared.
JTermios defines, in addition to the API functions, all the constants
necessary to pass to the those functions, such as O_NONBLOCK, B19200
etc etc. The values of these constants varies between (or can vary, I
have not checked every OS out there ;-) operating systems, so these
cannot be defined 'final'. JTermios provides default values for these
constants which the JTermiosImpl class is supposed to write over in the
constructor if required. The default values are those from/for
Mac OS X 10.6.6 / x86_64 so that the macosx.JTermiosImpl does not need
to override anything. In Windows the values of these constant have no
meaning so the windows.JTermiosImpl can use the mac values as-is and
it does not need to change them. So at the moment only linux.JTermiosImpl
needs to change those constants from the default values.
Hope this clarifies.
>
>Non standard baud rates possible on linux and osx (10.4 or better) ?
Well, the way it works is that purejavacomm.PureJavaSerialPort checks if
the requested baud rate is one of the 'standard' (which standard BTW) baud
rates
and if so passes the OS specific constant to the next layer in the
communication stack, or, if the baud rate is non standard, then the
requested
value directly to the next layer. In unix-like systems the next layer is
basically
the OS API function so it is up to the OS to decide what to do with that.
In Mac OS X and Windows it turns out that the OS specific constant is
actually the baud
rate value so you it gets passed directly to the OS and you can use
whatever
the OS supports.
In Linux the OS specific constants are not directly the
baudrate values, for example the OS constant for 9600 baud is 15, but since
the non standard values get passed directly to the OS you can use whatever
the OS supports as long as you can figure out what the constant is, which
you
should be able to do by examining the termios.h header of your Linux.
The 'standard' baud rates as far as JTermios is concerned are the standard
POSIX baud rates ie
50,75,110,134,150,200,300,1200,1800,2400,4800,9600,19200,38400.
But if I made myself clear you above you are not limited to these, in Mac
OS X
I think at least 14400 and 57600 are supported and in Windows in addition
to those
there is 56000,115200,128000 and 256000. In Linux I'm not sure what is the
current
state of affairs, but seem to recall that you can get 'weird' baud rate
with special
values, for example to set 230400 use 22.
Hope this clarifies a bit (pun intended).
br Kusti
PS
Since Trent was courteous enough to allow this discussion in the rxtx list
I'm CC:ing the list.
From damorales at gmail.com Fri May 6 07:33:19 2011
From: damorales at gmail.com (Daniel Morales Salas)
Date: Fri, 6 May 2011 09:33:19 -0400
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References: <4DC33F55.2070004@gmail.com>
Message-ID:
Hi
I'm developing an application that use rxtx to comunicate with a serial port
(UART) to send commands to a PLCBUS device and it works perfect (I only
tried in linux). I would like to try purejavacomm. Is all the serial port
functionality ready to use ?
Thanks.
Greetings!
2011/5/6 Kustaa Nyholm
> On 5/6/11 03:22, "Curtis Hacker" wrote:
>
> >Is there no common shared language structure between the OS's at this
> >point ? jtermios.windows/macosx/linux ?
>
>
> I'm not sure if I understand what you are asking?
>
> The purejavacomm.* classes are 100% shared between the OSs and contains
> all the functionality that implement javax.comm.* functionality in terms
> of, or on top of, an idealized POSIX like device API which is implemented
> by jtermios.JTermios class (plus the other structures in that package).
>
> Especially the purejavacomm.PureJavaSerialPort does most of the work,
> apart from the device enumeration which is in
> purejavacomm.CommPortIdentifier
> class.
>
> So that is all 100% shared between the OS's.
>
>
> JTermios defines all the necessary POSIX like API calls as static functions
> that delegate the actual implementation to one of the OS/arch specific
> implementation class instances defined in in the jtermios.*.JTermiosImpl
> classes.
>
> The implementing classes for POSIX -like operating systems are very thin
> wrappers around JNA calls to the actual Unix/Linux standard C-library
> calls.
> There is very little actual code or definitions in them and what there is
> cannot be shared between OS as this is the 'glue' that attaches the
> abstract
> with the concrete.
>
> For Windows, which is totally unlike unix, the implementation class
> jtermios.windows.JTermiosImpl contains quite a lot of code to do the
> impedance matching between unix and windows way of doing things. This is
> of course very Windows specific and cannot be shared.
>
> JTermios defines, in addition to the API functions, all the constants
> necessary to pass to the those functions, such as O_NONBLOCK, B19200
> etc etc. The values of these constants varies between (or can vary, I
> have not checked every OS out there ;-) operating systems, so these
> cannot be defined 'final'. JTermios provides default values for these
> constants which the JTermiosImpl class is supposed to write over in the
> constructor if required. The default values are those from/for
> Mac OS X 10.6.6 / x86_64 so that the macosx.JTermiosImpl does not need
> to override anything. In Windows the values of these constant have no
> meaning so the windows.JTermiosImpl can use the mac values as-is and
> it does not need to change them. So at the moment only linux.JTermiosImpl
> needs to change those constants from the default values.
>
>
> Hope this clarifies.
>
> >
> >Non standard baud rates possible on linux and osx (10.4 or better) ?
>
> Well, the way it works is that purejavacomm.PureJavaSerialPort checks if
> the requested baud rate is one of the 'standard' (which standard BTW) baud
> rates
> and if so passes the OS specific constant to the next layer in the
> communication stack, or, if the baud rate is non standard, then the
> requested
> value directly to the next layer. In unix-like systems the next layer is
> basically
> the OS API function so it is up to the OS to decide what to do with that.
>
> In Mac OS X and Windows it turns out that the OS specific constant is
> actually the baud
> rate value so you it gets passed directly to the OS and you can use
> whatever
> the OS supports.
>
> In Linux the OS specific constants are not directly the
> baudrate values, for example the OS constant for 9600 baud is 15, but since
> the non standard values get passed directly to the OS you can use whatever
> the OS supports as long as you can figure out what the constant is, which
> you
> should be able to do by examining the termios.h header of your Linux.
>
> The 'standard' baud rates as far as JTermios is concerned are the standard
> POSIX baud rates ie
> 50,75,110,134,150,200,300,1200,1800,2400,4800,9600,19200,38400.
>
> But if I made myself clear you above you are not limited to these, in Mac
> OS X
> I think at least 14400 and 57600 are supported and in Windows in addition
> to those
> there is 56000,115200,128000 and 256000. In Linux I'm not sure what is the
> current
> state of affairs, but seem to recall that you can get 'weird' baud rate
> with special
> values, for example to set 230400 use 22.
>
> Hope this clarifies a bit (pun intended).
>
> br Kusti
>
> PS
>
> Since Trent was courteous enough to allow this discussion in the rxtx list
> I'm CC:ing the list.
>
>
>
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
--
Atte:
Daniel Dario Morales Salas
Ingeniero Civil en Computaci?n e Inform?tica
Tel?fono: 02 684 3417
Celular: 09 643 1802
Santiago, Chile
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From Kustaa.Nyholm at planmeca.com Fri May 6 07:47:17 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Fri, 6 May 2011 16:47:17 +0300
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
Message-ID:
On 5/6/11 16:33, "Daniel Morales Salas" wrote:
>Hi
>
>I'm developing an application that use rxtx to comunicate with a serial
>port (UART) to send commands to a PLCBUS device and it works perfect (I
>only tried in linux). I would like to try purejavacomm. Is all the serial
>port functionality ready to use ?
Hard to say, but it definitely is ready enough to be tried!
It works for some people, some people have reported some issues
that I'm working with.
br Kusti
>
From damorales at gmail.com Fri May 6 08:42:22 2011
From: damorales at gmail.com (Daniel Morales Salas)
Date: Fri, 6 May 2011 10:42:22 -0400
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References:
Message-ID:
Ok, I will try it this weekend and I will let you know how it goes.
Thanks and greetings!!
2011/5/6 Kustaa Nyholm
> On 5/6/11 16:33, "Daniel Morales Salas" wrote:
>
> >Hi
> >
> >I'm developing an application that use rxtx to comunicate with a serial
> >port (UART) to send commands to a PLCBUS device and it works perfect (I
> >only tried in linux). I would like to try purejavacomm. Is all the serial
> >port functionality ready to use ?
>
> Hard to say, but it definitely is ready enough to be tried!
>
> It works for some people, some people have reported some issues
> that I'm working with.
>
> br Kusti
> >
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
--
Atte:
Daniel Dario Morales Salas
Ingeniero Civil en Computaci?n e Inform?tica
Tel?fono: 02 684 3417
Celular: 09 643 1802
Santiago, Chile
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From blueeagle2 at gmail.com Sat May 7 01:35:18 2011
From: blueeagle2 at gmail.com (blueeagle2 at gmail.com)
Date: Sat, 7 May 2011 00:35:18 -0700
Subject: [Rxtx] rxtx for eclipse in Windows XP
Message-ID:
I installed the eclipse plugins for rxtx, but eclipse does not recognize the
import gnu.io.*;
What else do I need to do? I looked for a rxtx.jar file, but could not
locate one. Do eclipse plugins work differently?
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From aawolfe at gmail.com Sat May 7 05:07:44 2011
From: aawolfe at gmail.com (Aaron Wolfe)
Date: Sat, 7 May 2011 07:07:44 -0400
Subject: [Rxtx] USB latency woes
Message-ID:
I use RXTX in an open source project that implements a disk drive over
serial emulation for old 8 bit computers, and it's been great. In the
past the top rate the old computers could digest was 115k, but
recently a retro-guru has hacked up a way to do 230kbps.
We've found that throughput with USB adapters is poor, in some cases
barely better than 115k, yet with a real serial port the gains in
speed are large. It seems there is a large latency per operation on
all the USB adapters we've tried, although it varies a lot from one to
the next. By tweaking settings in the driver for the adapter, I've
been able to improve things, but still the best USB adapter (a
Prolific 2303) is about 10% slower than a real serial port, and the
others are worse.
The latency seems to occur per call to read() or write().. for
instance if I need to read 2 bytes, it takes almost twice as long to
do read(byte); read(byte) as it does a single read(byte[2]). We do a
lot of small i/o back and forth, sometimes a single byte. The largest
transaction is only about 260 bytes in one direction, a handful in the
other. By combining as many operations into larger blocks as I can,
latency can be reduced, but still it's having major effects and there
are some operations that just have to send lots of tiny bits back and
forth, no way to combine them.
Has anybody dealt with this and improved things, or is this just life
with USB->serial? There are lots of timing tweaks available in RXTX,
but I've had odd results when messing with them, especially with
different behavior on different platforms. I thought maybe there was
some magic combination of things that would help.
Thanks for any ideas
-Aaron
From Kustaa.Nyholm at planmeca.com Sat May 7 07:24:40 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Sat, 7 May 2011 16:24:40 +0300
Subject: [Rxtx] USB latency woes
In-Reply-To:
Message-ID:
On 5/7/11 14:07, "Aaron Wolfe" wrote:
>
>Has anybody dealt with this and improved things, or is this just life
>with USB->serial?
My experience is that this is life with USB. USB is based on 1 ms polling
(the host asks the device if it has any data once every msec) so if you
read
one byte it may well be that next byte is available 1 msec later.
Also some adapters, atleast FTDI has 10 msec (IIRC) latency when you write
anything less than an internal buffer full (64 bytes IIRC) so this really
kills your throughput if you do a lot of small transfers.
YMMV.
br Kusti
From Hans.Nouwens at xs4all.nl Sat May 7 07:47:41 2011
From: Hans.Nouwens at xs4all.nl (Hans Nouwens)
Date: Sat, 7 May 2011 15:47:41 +0200
Subject: [Rxtx] USB latency woes
In-Reply-To:
References:
Message-ID:
Aaron,
with the ftd chipset I use I'm able to set a legacy time-out to a minimum
of 1 ms. This means that whatever amount of bytes are waiting in the
buffer it sends or transmits anyway.
With some overhead I'm able to communicate with my hardware with 600
messages per second. My messages are usually smaller than 20 bytes.
Hans Nouwens.
> I use RXTX in an open source project that implements a disk drive over
> serial emulation for old 8 bit computers, and it's been great. In the
> past the top rate the old computers could digest was 115k, but
> recently a retro-guru has hacked up a way to do 230kbps.
>
> We've found that throughput with USB adapters is poor, in some cases
> barely better than 115k, yet with a real serial port the gains in
> speed are large. It seems there is a large latency per operation on
> all the USB adapters we've tried, although it varies a lot from one to
> the next. By tweaking settings in the driver for the adapter, I've
> been able to improve things, but still the best USB adapter (a
> Prolific 2303) is about 10% slower than a real serial port, and the
> others are worse.
>
> The latency seems to occur per call to read() or write().. for
> instance if I need to read 2 bytes, it takes almost twice as long to
> do read(byte); read(byte) as it does a single read(byte[2]). We do a
> lot of small i/o back and forth, sometimes a single byte. The largest
> transaction is only about 260 bytes in one direction, a handful in the
> other. By combining as many operations into larger blocks as I can,
> latency can be reduced, but still it's having major effects and there
> are some operations that just have to send lots of tiny bits back and
> forth, no way to combine them.
>
> Has anybody dealt with this and improved things, or is this just life
> with USB->serial? There are lots of timing tweaks available in RXTX,
> but I've had odd results when messing with them, especially with
> different behavior on different platforms. I thought maybe there was
> some magic combination of things that would help.
>
> Thanks for any ideas
> -Aaron
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
From will.tatam at red61.com Thu May 5 12:30:52 2011
From: will.tatam at red61.com (Will Tatam)
Date: Thu, 05 May 2011 19:30:52 +0100
Subject: [Rxtx] WebStart, rxtx, and amd64
In-Reply-To: <4DB5CDEC.2010707@gmail.com>
References: <4DB5CDEC.2010707@gmail.com>
Message-ID: <4DC2ECDC.6050109@red61.com>
On 25/04/11 20:39, Mike Markowski wrote:
> I've run into an odd problem that hopefully someone else has seen and solved.
> If I use WebStart for 32-bit linux, Intel, all is well. Java Console shows me
> that it arrives at the web server as os.name=Linux and os.arch=i386 and, sure
> enough, the jnlp file (attached below) points it to the correct native jar.
>
> However, if I try the same with 64-bit linux, Java Console shows os.name=Linux
> and os.arch=amd64. The bad news is that the jnlp file does not supply -any-
> rxtx native lib via WebStart. The only way I can get it to work is by adding
> the last linux entry that does not specify the architecture.
>
> I assume I'm doing something wrong but haven't figured it out yet. Thanks for
> any ideas!
>
> Mike
>
>
>
>
> RXTX
> ajmas
>
> Java API for serial port communication
> Java API for serial port communication.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
This following works for me using the sun jre
--
Will Tatam
Systems Architect
Red61
0845 867 2203 ext 103
From will.tatam at red61.com Thu May 5 12:42:01 2011
From: will.tatam at red61.com (Will Tatam)
Date: Thu, 05 May 2011 19:42:01 +0100
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References:
Message-ID: <4DC2EF79.2080108@red61.com>
On 12/04/11 11:27, Kustaa Nyholm wrote:
> Hi List,
>
> I could not resist so I had to create a Pure Java implementation of
> JavaComm SerialPort
> with no C-code or JNI in sight!
>
> If you are interested, please go to my website at:
>
> http://www.sparetimelabs.com/
>
> and select 'PureJavaComm' from the navigation on the left.
>
> br Kusti
>
>
Has anyone done any comparison testing between RXTX and this new project ?
Latency is where I'm most interested as RXTX is riddled with sleep() calls
--
Will Tatam
Systems Architect
Red61
From will.tatam at red61.com Thu May 5 13:01:07 2011
From: will.tatam at red61.com (Will Tatam)
Date: Thu, 05 May 2011 20:01:07 +0100
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To: <4DC2EF79.2080108@red61.com>
References:
<4DC2EF79.2080108@red61.com>
Message-ID: <4DC2F3F3.8020100@red61.com>
On 05/05/11 19:42, Will Tatam wrote:
> On 12/04/11 11:27, Kustaa Nyholm wrote:
>> Hi List,
>>
>> I could not resist so I had to create a Pure Java implementation of
>> JavaComm SerialPort
>> with no C-code or JNI in sight!
>>
>> If you are interested, please go to my website at:
>>
>> http://www.sparetimelabs.com/
>>
>> and select 'PureJavaComm' from the navigation on the left.
>>
>> br Kusti
>>
>>
>
> Has anyone done any comparison testing between RXTX and this new
> project ?
> Latency is where I'm most interested as RXTX is riddled with sleep()
> calls
>
Is the ParallelPort complete ? it appears to be missing functions like
isPaperOut() and isPrinterError()
--
Will Tatam
Systems Architect
Red61
0845 867 2203 ext 103
From Kustaa.Nyholm at planmeca.com Thu May 5 13:29:05 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Thu, 5 May 2011 22:29:05 +0300
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To: <4DC2F3F3.8020100@red61.com>
Message-ID:
On 5/5/11 22:01, "Will Tatam" wrote:
> Is the ParallelPort complete ? it appears to be missing functions like
> isPaperOut() and isPrinterError()
purejavacomm is strictly serial port, I've got no plans
to add parallel port, though of course it would not be
difficult, but I've got no hardware with parallel port.
> Has anyone done any comparison testing between RXTX and this new project
>?
> Latency is where I'm most interested as RXTX is riddled with sleep()
>calls
I don't think anyone has done anything like that yet. It is
early days with purejavacomm yet. At the moment basic functionality
works and I've got some positive reports but also some
users have identified some issues that I try to resolve
in the coming weeks.
I'm not sure if we are welcome to hijack rxtx list for
purejavacomm discussions. I don't mind but it is not for
me to say.
Also, please do not cc pete batard, he might get annoyed after
awhile as this really has nothing to do with him.
br Kusti
From tjarvi at qbang.org Thu May 5 19:56:15 2011
From: tjarvi at qbang.org (Trent Jarvi)
Date: Thu, 5 May 2011 19:56:15 -0600 (MDT)
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References:
Message-ID:
> I'm not sure if we are welcome to hijack rxtx list for
> purejavacomm discussions. I don't mind but it is not for
> me to say.
Hehe, Hijack? I guess that means we would lose something other than work?
Posts related to CommAPI are welcome here. Really, its open to the
general interest group as a whole with no expectations.
--
Trent Jarvi
tjarvi at qbang.org
From Kustaa.Nyholm at planmeca.com Thu May 5 23:59:37 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Fri, 6 May 2011 08:59:37 +0300
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To: <4DC33F55.2070004@gmail.com>
Message-ID:
On 5/6/11 03:22, "Curtis Hacker" wrote:
>Is there no common shared language structure between the OS's at this
>point ? jtermios.windows/macosx/linux ?
I'm not sure if I understand what you are asking?
The purejavacomm.* classes are 100% shared between the OSs and contains
all the functionality that implement javax.comm.* functionality in terms
of, or on top of, an idealized POSIX like device API which is implemented
by jtermios.JTermios class (plus the other structures in that package).
Especially the purejavacomm.PureJavaSerialPort does most of the work,
apart from the device enumeration which is in
purejavacomm.CommPortIdentifier
class.
So that is all 100% shared between the OS's.
JTermios defines all the necessary POSIX like API calls as static functions
that delegate the actual implementation to one of the OS/arch specific
implementation class instances defined in in the jtermios.*.JTermiosImpl
classes.
The implementing classes for POSIX -like operating systems are very thin
wrappers around JNA calls to the actual Unix/Linux standard C-library
calls.
There is very little actual code or definitions in them and what there is
cannot be shared between OS as this is the 'glue' that attaches the
abstract
with the concrete.
For Windows, which is totally unlike unix, the implementation class
jtermios.windows.JTermiosImpl contains quite a lot of code to do the
impedance matching between unix and windows way of doing things. This is
of course very Windows specific and cannot be shared.
JTermios defines, in addition to the API functions, all the constants
necessary to pass to the those functions, such as O_NONBLOCK, B19200
etc etc. The values of these constants varies between (or can vary, I
have not checked every OS out there ;-) operating systems, so these
cannot be defined 'final'. JTermios provides default values for these
constants which the JTermiosImpl class is supposed to write over in the
constructor if required. The default values are those from/for
Mac OS X 10.6.6 / x86_64 so that the macosx.JTermiosImpl does not need
to override anything. In Windows the values of these constant have no
meaning so the windows.JTermiosImpl can use the mac values as-is and
it does not need to change them. So at the moment only linux.JTermiosImpl
needs to change those constants from the default values.
Hope this clarifies.
>
>Non standard baud rates possible on linux and osx (10.4 or better) ?
Well, the way it works is that purejavacomm.PureJavaSerialPort checks if
the requested baud rate is one of the 'standard' (which standard BTW) baud
rates
and if so passes the OS specific constant to the next layer in the
communication stack, or, if the baud rate is non standard, then the
requested
value directly to the next layer. In unix-like systems the next layer is
basically
the OS API function so it is up to the OS to decide what to do with that.
In Mac OS X and Windows it turns out that the OS specific constant is
actually the baud
rate value so you it gets passed directly to the OS and you can use
whatever
the OS supports.
In Linux the OS specific constants are not directly the
baudrate values, for example the OS constant for 9600 baud is 15, but since
the non standard values get passed directly to the OS you can use whatever
the OS supports as long as you can figure out what the constant is, which
you
should be able to do by examining the termios.h header of your Linux.
The 'standard' baud rates as far as JTermios is concerned are the standard
POSIX baud rates ie
50,75,110,134,150,200,300,1200,1800,2400,4800,9600,19200,38400.
But if I made myself clear you above you are not limited to these, in Mac
OS X
I think at least 14400 and 57600 are supported and in Windows in addition
to those
there is 56000,115200,128000 and 256000. In Linux I'm not sure what is the
current
state of affairs, but seem to recall that you can get 'weird' baud rate
with special
values, for example to set 230400 use 22.
Hope this clarifies a bit (pun intended).
br Kusti
PS
Since Trent was courteous enough to allow this discussion in the rxtx list
I'm CC:ing the list.
From damorales at gmail.com Fri May 6 07:33:19 2011
From: damorales at gmail.com (Daniel Morales Salas)
Date: Fri, 6 May 2011 09:33:19 -0400
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References: <4DC33F55.2070004@gmail.com>
Message-ID:
Hi
I'm developing an application that use rxtx to comunicate with a serial port
(UART) to send commands to a PLCBUS device and it works perfect (I only
tried in linux). I would like to try purejavacomm. Is all the serial port
functionality ready to use ?
Thanks.
Greetings!
2011/5/6 Kustaa Nyholm
> On 5/6/11 03:22, "Curtis Hacker" wrote:
>
> >Is there no common shared language structure between the OS's at this
> >point ? jtermios.windows/macosx/linux ?
>
>
> I'm not sure if I understand what you are asking?
>
> The purejavacomm.* classes are 100% shared between the OSs and contains
> all the functionality that implement javax.comm.* functionality in terms
> of, or on top of, an idealized POSIX like device API which is implemented
> by jtermios.JTermios class (plus the other structures in that package).
>
> Especially the purejavacomm.PureJavaSerialPort does most of the work,
> apart from the device enumeration which is in
> purejavacomm.CommPortIdentifier
> class.
>
> So that is all 100% shared between the OS's.
>
>
> JTermios defines all the necessary POSIX like API calls as static functions
> that delegate the actual implementation to one of the OS/arch specific
> implementation class instances defined in in the jtermios.*.JTermiosImpl
> classes.
>
> The implementing classes for POSIX -like operating systems are very thin
> wrappers around JNA calls to the actual Unix/Linux standard C-library
> calls.
> There is very little actual code or definitions in them and what there is
> cannot be shared between OS as this is the 'glue' that attaches the
> abstract
> with the concrete.
>
> For Windows, which is totally unlike unix, the implementation class
> jtermios.windows.JTermiosImpl contains quite a lot of code to do the
> impedance matching between unix and windows way of doing things. This is
> of course very Windows specific and cannot be shared.
>
> JTermios defines, in addition to the API functions, all the constants
> necessary to pass to the those functions, such as O_NONBLOCK, B19200
> etc etc. The values of these constants varies between (or can vary, I
> have not checked every OS out there ;-) operating systems, so these
> cannot be defined 'final'. JTermios provides default values for these
> constants which the JTermiosImpl class is supposed to write over in the
> constructor if required. The default values are those from/for
> Mac OS X 10.6.6 / x86_64 so that the macosx.JTermiosImpl does not need
> to override anything. In Windows the values of these constant have no
> meaning so the windows.JTermiosImpl can use the mac values as-is and
> it does not need to change them. So at the moment only linux.JTermiosImpl
> needs to change those constants from the default values.
>
>
> Hope this clarifies.
>
> >
> >Non standard baud rates possible on linux and osx (10.4 or better) ?
>
> Well, the way it works is that purejavacomm.PureJavaSerialPort checks if
> the requested baud rate is one of the 'standard' (which standard BTW) baud
> rates
> and if so passes the OS specific constant to the next layer in the
> communication stack, or, if the baud rate is non standard, then the
> requested
> value directly to the next layer. In unix-like systems the next layer is
> basically
> the OS API function so it is up to the OS to decide what to do with that.
>
> In Mac OS X and Windows it turns out that the OS specific constant is
> actually the baud
> rate value so you it gets passed directly to the OS and you can use
> whatever
> the OS supports.
>
> In Linux the OS specific constants are not directly the
> baudrate values, for example the OS constant for 9600 baud is 15, but since
> the non standard values get passed directly to the OS you can use whatever
> the OS supports as long as you can figure out what the constant is, which
> you
> should be able to do by examining the termios.h header of your Linux.
>
> The 'standard' baud rates as far as JTermios is concerned are the standard
> POSIX baud rates ie
> 50,75,110,134,150,200,300,1200,1800,2400,4800,9600,19200,38400.
>
> But if I made myself clear you above you are not limited to these, in Mac
> OS X
> I think at least 14400 and 57600 are supported and in Windows in addition
> to those
> there is 56000,115200,128000 and 256000. In Linux I'm not sure what is the
> current
> state of affairs, but seem to recall that you can get 'weird' baud rate
> with special
> values, for example to set 230400 use 22.
>
> Hope this clarifies a bit (pun intended).
>
> br Kusti
>
> PS
>
> Since Trent was courteous enough to allow this discussion in the rxtx list
> I'm CC:ing the list.
>
>
>
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
--
Atte:
Daniel Dario Morales Salas
Ingeniero Civil en Computaci?n e Inform?tica
Tel?fono: 02 684 3417
Celular: 09 643 1802
Santiago, Chile
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From Kustaa.Nyholm at planmeca.com Fri May 6 07:47:17 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Fri, 6 May 2011 16:47:17 +0300
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
Message-ID:
On 5/6/11 16:33, "Daniel Morales Salas" wrote:
>Hi
>
>I'm developing an application that use rxtx to comunicate with a serial
>port (UART) to send commands to a PLCBUS device and it works perfect (I
>only tried in linux). I would like to try purejavacomm. Is all the serial
>port functionality ready to use ?
Hard to say, but it definitely is ready enough to be tried!
It works for some people, some people have reported some issues
that I'm working with.
br Kusti
>
From damorales at gmail.com Fri May 6 08:42:22 2011
From: damorales at gmail.com (Daniel Morales Salas)
Date: Fri, 6 May 2011 10:42:22 -0400
Subject: [Rxtx] Announcing PureJavaComm
In-Reply-To:
References:
Message-ID:
Ok, I will try it this weekend and I will let you know how it goes.
Thanks and greetings!!
2011/5/6 Kustaa Nyholm
> On 5/6/11 16:33, "Daniel Morales Salas" wrote:
>
> >Hi
> >
> >I'm developing an application that use rxtx to comunicate with a serial
> >port (UART) to send commands to a PLCBUS device and it works perfect (I
> >only tried in linux). I would like to try purejavacomm. Is all the serial
> >port functionality ready to use ?
>
> Hard to say, but it definitely is ready enough to be tried!
>
> It works for some people, some people have reported some issues
> that I'm working with.
>
> br Kusti
> >
>
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
--
Atte:
Daniel Dario Morales Salas
Ingeniero Civil en Computaci?n e Inform?tica
Tel?fono: 02 684 3417
Celular: 09 643 1802
Santiago, Chile
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From blueeagle2 at gmail.com Sat May 7 01:35:18 2011
From: blueeagle2 at gmail.com (blueeagle2 at gmail.com)
Date: Sat, 7 May 2011 00:35:18 -0700
Subject: [Rxtx] rxtx for eclipse in Windows XP
Message-ID:
I installed the eclipse plugins for rxtx, but eclipse does not recognize the
import gnu.io.*;
What else do I need to do? I looked for a rxtx.jar file, but could not
locate one. Do eclipse plugins work differently?
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From aawolfe at gmail.com Sat May 7 05:07:44 2011
From: aawolfe at gmail.com (Aaron Wolfe)
Date: Sat, 7 May 2011 07:07:44 -0400
Subject: [Rxtx] USB latency woes
Message-ID:
I use RXTX in an open source project that implements a disk drive over
serial emulation for old 8 bit computers, and it's been great. In the
past the top rate the old computers could digest was 115k, but
recently a retro-guru has hacked up a way to do 230kbps.
We've found that throughput with USB adapters is poor, in some cases
barely better than 115k, yet with a real serial port the gains in
speed are large. It seems there is a large latency per operation on
all the USB adapters we've tried, although it varies a lot from one to
the next. By tweaking settings in the driver for the adapter, I've
been able to improve things, but still the best USB adapter (a
Prolific 2303) is about 10% slower than a real serial port, and the
others are worse.
The latency seems to occur per call to read() or write().. for
instance if I need to read 2 bytes, it takes almost twice as long to
do read(byte); read(byte) as it does a single read(byte[2]). We do a
lot of small i/o back and forth, sometimes a single byte. The largest
transaction is only about 260 bytes in one direction, a handful in the
other. By combining as many operations into larger blocks as I can,
latency can be reduced, but still it's having major effects and there
are some operations that just have to send lots of tiny bits back and
forth, no way to combine them.
Has anybody dealt with this and improved things, or is this just life
with USB->serial? There are lots of timing tweaks available in RXTX,
but I've had odd results when messing with them, especially with
different behavior on different platforms. I thought maybe there was
some magic combination of things that would help.
Thanks for any ideas
-Aaron
From Kustaa.Nyholm at planmeca.com Sat May 7 07:24:40 2011
From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm)
Date: Sat, 7 May 2011 16:24:40 +0300
Subject: [Rxtx] USB latency woes
In-Reply-To:
Message-ID:
On 5/7/11 14:07, "Aaron Wolfe" wrote:
>
>Has anybody dealt with this and improved things, or is this just life
>with USB->serial?
My experience is that this is life with USB. USB is based on 1 ms polling
(the host asks the device if it has any data once every msec) so if you
read
one byte it may well be that next byte is available 1 msec later.
Also some adapters, atleast FTDI has 10 msec (IIRC) latency when you write
anything less than an internal buffer full (64 bytes IIRC) so this really
kills your throughput if you do a lot of small transfers.
YMMV.
br Kusti
From Hans.Nouwens at xs4all.nl Sat May 7 07:47:41 2011
From: Hans.Nouwens at xs4all.nl (Hans Nouwens)
Date: Sat, 7 May 2011 15:47:41 +0200
Subject: [Rxtx] USB latency woes
In-Reply-To:
References:
Message-ID:
Aaron,
with the ftd chipset I use I'm able to set a legacy time-out to a minimum
of 1 ms. This means that whatever amount of bytes are waiting in the
buffer it sends or transmits anyway.
With some overhead I'm able to communicate with my hardware with 600
messages per second. My messages are usually smaller than 20 bytes.
Hans Nouwens.
> I use RXTX in an open source project that implements a disk drive over
> serial emulation for old 8 bit computers, and it's been great. In the
> past the top rate the old computers could digest was 115k, but
> recently a retro-guru has hacked up a way to do 230kbps.
>
> We've found that throughput with USB adapters is poor, in some cases
> barely better than 115k, yet with a real serial port the gains in
> speed are large. It seems there is a large latency per operation on
> all the USB adapters we've tried, although it varies a lot from one to
> the next. By tweaking settings in the driver for the adapter, I've
> been able to improve things, but still the best USB adapter (a
> Prolific 2303) is about 10% slower than a real serial port, and the
> others are worse.
>
> The latency seems to occur per call to read() or write().. for
> instance if I need to read 2 bytes, it takes almost twice as long to
> do read(byte); read(byte) as it does a single read(byte[2]). We do a
> lot of small i/o back and forth, sometimes a single byte. The largest
> transaction is only about 260 bytes in one direction, a handful in the
> other. By combining as many operations into larger blocks as I can,
> latency can be reduced, but still it's having major effects and there
> are some operations that just have to send lots of tiny bits back and
> forth, no way to combine them.
>
> Has anybody dealt with this and improved things, or is this just life
> with USB->serial? There are lots of timing tweaks available in RXTX,
> but I've had odd results when messing with them, especially with
> different behavior on different platforms. I thought maybe there was
> some magic combination of things that would help.
>
> Thanks for any ideas
> -Aaron
> _______________________________________________
> Rxtx mailing list
> Rxtx at qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
From blueeagle2 at gmail.com Thu May 12 13:35:20 2011
From: blueeagle2 at gmail.com (blueeagle2 at gmail.com)
Date: Thu, 12 May 2011 12:35:20 -0700
Subject: [Rxtx] Installing RXTX on Linux
Message-ID:
I was wondering if someone could clear up some confusion about installing
RXTX on 64-bit Ubuntu. I downloaded the package rxtx-2.1-7-bins-r2.zip and
it has librxtxSerial.so in a X86_64 folder for Linux, but on the download
page, it says to use the CloudHopper binaries. If the one in the file does
not work, should there not be some kind of readme file to that effect.
Also, can I just use the source and compile it for my 64-bit machine. I
have never actually done this so I am not exactly sure how involved it is.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From dwayne.hubbard at gmail.com Thu May 12 15:06:47 2011
From: dwayne.hubbard at gmail.com (Dwayne Hubbard)
Date: Thu, 12 May 2011 16:06:47 -0500
Subject: [Rxtx] Installing RXTX on Linux
In-Reply-To:
References:
Message-ID:
On Thu, May 12, 2011 at 2:35 PM, wrote:
> I was wondering if someone could clear up some confusion about installing
> RXTX on 64-bit Ubuntu.? I downloaded the package rxtx-2.1-7-bins-r2.zip and
> it has librxtxSerial.so in a X86_64 folder for Linux, but on the download
> page, it says to use the CloudHopper binaries.? If the one in the file does
> not work, should there not be some kind of readme file to that effect.
Not sure if I can clear up any confusion since I'm a relatively new
rxtx user, but I'm using it on 64-bit Ubuntu. I did a 'cvs checkout
-r commapi-0-0-1 rxtx-devel', then ./configure ; make ; make install
I personally was a little confused about whether or not I was using
the most stable/best branch of rxtx, but this particular checkout does
what I need it to do.
hope this helps,
-Dwayne.
From showard314 at gmail.com Thu May 12 15:11:06 2011
From: showard314 at gmail.com (Scott Howard)
Date: Thu, 12 May 2011 17:11:06 -0400
Subject: [Rxtx] Installing RXTX on Linux
In-Reply-To:
References:
Message-ID:
On Thu, May 12, 2011 at 3:35 PM,