On 9 November 2011 02:53, John Santos <span dir="ltr">&lt;<a href="mailto:JOHN@egh.com">JOHN@egh.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="HOEnZb"><div class="h5">On Tue, 8 Nov 2011 <a href="mailto:exarkun@twistedmatrix.com">exarkun@twistedmatrix.com</a> wrote:<br>
<br>
&gt; On 11:59 am, <a href="mailto:dsturmfels@gmail.com">dsturmfels@gmail.com</a> wrote:<br>
&gt; &gt;Hi,<br>
&gt; &gt;Has anyone had much experience with serial flow control in twisted?<br>
&gt;<br>
&gt; I don&#39;t. :)  It sounds like this may not really have much to do with<br>
&gt; Twisted, though.<br>
&gt; &gt;I&#39;ve been using a twisted serial port in my gtk+ software for quite a<br>
&gt; &gt;while<br>
&gt; &gt;now, and I can get xonxoff flow control to work, but for some reason,<br>
&gt; &gt;rtscts flow control isn&#39;t working (or I may be using it wrong).<br>
&gt; &gt;<br>
&gt; &gt;I&#39;m connecting the software, via a usb-serial cable, to a Datalogic<br>
&gt; &gt;barcode<br>
&gt; &gt;scanner cradle.<br>
&gt; &gt;I&#39;ve been able to replicate this problem with pyserial as well.<br>
&gt;<br>
&gt; As you perhaps already know, Twisted&#39;s serial port support is<br>
&gt; implemented in terms of pyserial - and the layer Twisted adds is very<br>
&gt; thin.  So the problem you experience with pyserial is probably exactly<br>
&gt; the same as the problem you experience with Twisted, since the latter is<br>
&gt; actually the same code as the former.<br>
&gt; &gt;<br>
&gt; &gt;Without flow control on, I can for example, send a particular serial<br>
&gt; &gt;string<br>
&gt; &gt;to the cradle, and the cradle replies instantly with it&#39;s software<br>
&gt; &gt;version<br>
&gt; &gt;(as a string).<br>
&gt; &gt;If I scan a barcode, this also instantly shows up in<br>
&gt; &gt;twisted/pyserial/etc<br>
&gt; &gt;(as a string).<br>
&gt; &gt;<br>
&gt; &gt;With xonxoff flow control on in both the software and cradle, the<br>
&gt; &gt;serial<br>
&gt; &gt;connection works exactly the same as having no flow control on.<br>
&gt; &gt;<br>
&gt; &gt;With rtscts flow control on in both the software and cradle however,<br>
&gt; &gt;the<br>
&gt; &gt;cradle doesn&#39;t reply instantly with it&#39;s software version when the<br>
&gt; &gt;correct<br>
&gt; &gt;string is sent.<br>
&gt; &gt;However, a scanned barcode shows up instantly in the twisted/pyserial<br>
&gt; &gt;software, and if you&#39;ve previously requested the cradle software<br>
&gt; &gt;version,<br>
&gt; &gt;the software version string only shows up directly after receiving a<br>
&gt; &gt;barcode string.<br>
&gt; &gt;<br>
&gt; &gt;Am I doing something wrong, or does anyone know what might be going on<br>
&gt; &gt;here?<br>
&gt;<br>
&gt; Do you know that the device supports RTS/CTS?  Do you know that the USB<br>
&gt; driver for the device supports it?  Do you know that the USB driver<br>
&gt; support for it is bug free? :)<br>
<br>
</div></div>You also need to know that the serial cable(s) include the necessary<br>
leads, and that the null modem (or whatever) properly crosses them over.<br>
<br>
An RS-232 break-out box (if they are still available) would be very<br>
helpful here.<br>
<div class="im HOEnZb"><br>
&gt;<br>
&gt; Sorry I can&#39;t add anything more helpful.  I think you want to be looking<br>
&gt; for the problem at a pretty low level, though.  Perhaps even at the<br>
&gt; level of measuring voltage on the RTS pin...<br>
&gt;<br>
&gt; Jean-Paul<br>
&gt;<br>
&gt;<br>
<br>
</div><span class="HOEnZb"><font color="#888888">--<br>
John Santos<br>
Evans Griffiths &amp; Hart, Inc.<br>
781-861-0670 ext 539<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br></div></div></blockquote><div><br>Thanks John - I&#39;ll keep the RS-232 breakout box in mind, if I decide to try rts/cts flow control again in the future.<br>

<br>Darcy. <br></div></div><br>