<br><br><div class="gmail_quote">On 9 November 2011 01:57, <span dir="ltr"><<a href="mailto:exarkun@twistedmatrix.com">exarkun@twistedmatrix.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 11:59 am, <a href="mailto:dsturmfels@gmail.com">dsturmfels@gmail.com</a> wrote:<br>
>Hi,<br>
>Has anyone had much experience with serial flow control in twisted?<br>
<br>
</div>I don't. :) It sounds like this may not really have much to do with<br>
Twisted, though.<br>
<div class="im">>I've been using a twisted serial port in my gtk+ software for quite a<br>
>while<br>
>now, and I can get xonxoff flow control to work, but for some reason,<br>
>rtscts flow control isn't working (or I may be using it wrong).<br>
><br>
>I'm connecting the software, via a usb-serial cable, to a Datalogic<br>
>barcode<br>
>scanner cradle.<br>
>I've been able to replicate this problem with pyserial as well.<br>
<br>
</div>As you perhaps already know, Twisted's serial port support is<br>
implemented in terms of pyserial - and the layer Twisted adds is very<br>
thin. So the problem you experience with pyserial is probably exactly<br>
the same as the problem you experience with Twisted, since the latter is<br>
actually the same code as the former.<br>
<div class="im">><br>
>Without flow control on, I can for example, send a particular serial<br>
>string<br>
>to the cradle, and the cradle replies instantly with it's software<br>
>version<br>
>(as a string).<br>
>If I scan a barcode, this also instantly shows up in<br>
>twisted/pyserial/etc<br>
>(as a string).<br>
><br>
>With xonxoff flow control on in both the software and cradle, the<br>
>serial<br>
>connection works exactly the same as having no flow control on.<br>
><br>
>With rtscts flow control on in both the software and cradle however,<br>
>the<br>
>cradle doesn't reply instantly with it's software version when the<br>
>correct<br>
>string is sent.<br>
>However, a scanned barcode shows up instantly in the twisted/pyserial<br>
>software, and if you've previously requested the cradle software<br>
>version,<br>
>the software version string only shows up directly after receiving a<br>
>barcode string.<br>
><br>
>Am I doing something wrong, or does anyone know what might be going on<br>
>here?<br>
<br>
</div>Do you know that the device supports RTS/CTS? Do you know that the USB<br>
driver for the device supports it? Do you know that the USB driver<br>
support for it is bug free? :)<br>
<br>
Sorry I can't add anything more helpful. I think you want to be looking<br>
for the problem at a pretty low level, though. Perhaps even at the<br>
level of measuring voltage on the RTS pin...<br>
<br>
Jean-Paul<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>
</blockquote></div><br>Thanks - I was assuming it probably was a hardware problem, but I just thought I'd check to see if I'd been doing anything wrong.<br>The hardware definitely supports rts/cts flow control, so I'm guessing the problem then might possibly be with the usb-serial cable, or the driver for it.<br>
<br>Either way, I've decided to stick with xon/xoff flow control for now - it seems to work quite well.<br><br>Thanks anyway!<br>