[prev in list] [next in list] [prev in thread] [next in thread]
List: rxtx
Subject: Re: [Rxtx] Windows 7 32-bit issues
From: John Coffey <johnco3 () gmail ! com>
Date: 2010-12-01 23:58:48
Message-ID: AANLkTikqt+uqhj338LOPYO_AtTtPnGSSnysxS-Bgxvwk () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
I encountered a similar problem like the one you describe - the problem has
do with the way the termios.c opens the port using a default buffer size
that is too small. I needed an 8K buffer for my application and I ended up
having to make the following dirty hack in the termios.c code which I've
been keeping to myself as its not really the right thing to do as a general
purpose solution - I would find that serial IO would come to a blinding hal=
t
if my buffer size exceeded 4k or so (not sure of the exact number but that
rings a bell).
// @JC HACK// if( !SetupComm( port->hComm, 2048, 1024 ) ) if(
!SetupComm( port->hComm, 8200, 8200 ) ) { YACK();
return -1; }
Unfortunately the mechanism of specifying the input and output bufffer size
via gnu.io.CommPort end up as native no-ops by the time they end up at the
native driver layer - I wish someone would fix this sometime.
In CommPort.java the interface to specify the sizes for the input and outpu=
t
buffers for the comm port exists but it ends up being ignored....
John Coffey
package gnu.io;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
public abstract class CommPort {
. . .
public abstract void setInputBufferSize(int i);
public abstract int getInputBufferSize();
public abstract void setOutputBufferSize(int i);
public abstract int getOutputBufferSize();
. . .
}
On Mon, Nov 22, 2010 at 9:55 AM, Emanuel <eb@inotec-feg.de> wrote:
> I=92m using rxtx on windows xp in my application and it is working.
>
> On Windows 7 (32 bit) the application basically works but hangs upon
> receiving larger =93packets=94.
>
> In both cases a usb-uart adapter is used.
>
> Problem persists until unplugging the adapter.
>
> Rxtx Version: 2.1-7-bins-r2
>
> No Exception is thrown and no indication is showing up helping identifyin=
g
> the problem source.
>
> Are there any known issues with rxtx and Windows 7 possibly producing suc=
h
> behavior?
>
>
>
> Thanks in advance
>
> Emanuel
>
> _______________________________________________
> Rxtx mailing list
> Rxtx@qbang.org
> http://mailman.qbang.org/mailman/listinfo/rxtx
>
>
[Attachment #5 (text/html)]
I encountered a similar problem like the one you describe - the problem has do with \
the way the termios.c opens the port using a default buffer size that is too small. \
I needed an 8K buffer for my application and I ended up having to make the following \
dirty hack in the termios.c code which I've been keeping to myself as its not \
really the right thing to do as a general purpose solution - I would find that serial \
IO would come to a blinding halt if my buffer size exceeded 4k or so (not sure of the \
exact number but that rings a bell).<div> <div><div style="font-family: 'Courier \
New'; font-size: 10pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); \
font-style: normal; font-weight: normal; text-decoration: none; "><pre><span> \
</span><span style="color: rgb(0, 128, 0); font-style: italic; ">// @JC HACK</span> \
<span style="color: rgb(0, 128, 0); font-style: italic; ">// if( !SetupComm( \
port->hComm, 2048, 1024 ) )</span> <span> </span><span style="color: rgb(128, \
0, 128); ">if</span><span>( </span><span>!</span><span style="font-weight: bolder; \
">SetupComm</span><span>( \
</span><span>port</span><span>-></span><span>hComm</span><span>, </span><span \
style="color: rgb(0, 0, 128); ">8200</span><span>, </span><span style="color: rgb(0, \
0, 128); ">8200</span><span> ) )</span> <span> </span><span style="color: rgb(128, \
0, 0); ">{</span> <span> </span><span style="font-weight: bolder; \
">YACK</span><span>()</span><span>;</span> <span> </span><span style="color: \
rgb(128, 0, 128); ">return</span><span> </span><span>-</span><span style="color: \
rgb(0, 0, 128); ">1</span><span>;</span> <span> </span><span style="color: \
rgb(128, 0, 0); ">}</span> </pre></div></div></div><div>Unfortunately the mechanism \
of specifying the input and output bufffer size via gnu.io.CommPort end up as native \
no-ops by the time they end up at the native driver layer - I wish someone would fix \
this sometime. <div> <br></div><div>In CommPort.java the interface to specify the \
sizes for the input and output buffers for the comm port exists but it ends up being \
ignored....</div><div><br></div><div>John Coffey</div><div><br></div><div><div> \
package <a href="http://gnu.io">gnu.io</a>;</div><div><br></div><div>import \
java.io.IOException;</div><div>import java.io.InputStream;</div><div>import \
java.io.OutputStream;</div><div><br></div><div>public abstract class CommPort {</div> \
</div><div>. . .</div><div><div><div><br></div><div> public abstract void \
setInputBufferSize(int i);</div><div><br></div><div> public abstract int \
getInputBufferSize();</div><div><br></div><div> public abstract void \
setOutputBufferSize(int i);</div> <div><br></div><div> public abstract int \
getOutputBufferSize();</div></div><div>. . \
.</div><div>}</div><div><br></div><div><br></div><div><div style="font-family: \
"Courier New"; font-size: 10.0pt; color: #000000;background-color: #ffffff; \
font-style: normal; font-weight: normal; text-decoration: none;">
<pre><br></pre></div></div><div><div class="gmail_quote">On Mon, Nov 22, 2010 at 9:55 \
AM, Emanuel <span dir="ltr"><<a \
href="mailto:eb@inotec-feg.de">eb@inotec-feg.de</a>></span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex;"> <div lang="DE" link="blue" vlink="purple"><div><p \
class="MsoNormal"><span lang="EN-US">I’m using rxtx on windows xp in my application \
and it is working.</span></p><p class="MsoNormal"><span lang="EN-US">On Windows 7 (32 \
bit) the application basically works but hangs upon receiving larger \
“packets”.</span></p> <p class="MsoNormal"><span lang="EN-US">In both cases a \
usb-uart adapter is used.</span></p><p class="MsoNormal"><span lang="EN-US">Problem \
persists until unplugging the adapter.</span></p><p class="MsoNormal"><span \
lang="EN-US">Rxtx Version: 2.1-7-bins-r2</span></p> <p class="MsoNormal"><span \
lang="EN-US">No Exception is thrown and no indication is showing up helping \
identifying the problem source.</span></p><p class="MsoNormal"><span lang="EN-US">Are \
there any known issues with rxtx and Windows 7 possibly producing such \
behavior?</span></p> <p class="MsoNormal"><span lang="EN-US"> </span></p><p \
class="MsoNormal"><span lang="EN-US">Thanks in advance</span></p><p \
class="MsoNormal"><span \
lang="EN-US">Emanuel</span></p></div></div><br>_______________________________________________<br>
Rxtx mailing list<br>
<a href="mailto:Rxtx@qbang.org">Rxtx@qbang.org</a><br>
<a href="http://mailman.qbang.org/mailman/listinfo/rxtx" \
target="_blank">http://mailman.qbang.org/mailman/listinfo/rxtx</a><br> \
<br></blockquote></div><br></div></div></div>
_______________________________________________
Rxtx mailing list
Rxtx@qbang.org
http://mailman.qbang.org/mailman/listinfo/rxtx
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic