[Twisted-Python] Rts/Cts Serial port flow control in twisted

2011-11-08 Thread dsturmf...@gmail.com
Hi,
Has anyone had much experience with serial flow control in twisted?

I've been using a twisted serial port in my gtk+ software for quite a while
now, and I can get xonxoff flow control to work, but for some reason,
rtscts flow control isn't working (or I may be using it wrong).

I'm connecting the software, via a usb-serial cable, to a Datalogic barcode
scanner cradle.
I've been able to replicate this problem with pyserial as well.

Without flow control on, I can for example, send a particular serial string
to the cradle, and the cradle replies instantly with it's software version
(as a string).
If I scan a barcode, this also instantly shows up in twisted/pyserial/etc
(as a string).

With xonxoff flow control on in both the software and cradle, the serial
connection works exactly the same as having no flow control on.

With rtscts flow control on in both the software and cradle however, the
cradle doesn't reply instantly with it's software version when the correct
string is sent.
However, a scanned barcode shows up instantly in the twisted/pyserial
software, and if you've previously requested the cradle software version,
the software version string only shows up directly after receiving a
barcode string.

Am I doing something wrong, or does anyone know what might be going on here?

Thanks,

Darcy.
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Rts/Cts Serial port flow control in twisted

2011-11-30 Thread dsturmf...@gmail.com
On 9 November 2011 01:57,  wrote:

> On 11:59 am, dsturmf...@gmail.com wrote:
> >Hi,
> >Has anyone had much experience with serial flow control in twisted?
>
> I don't. :)  It sounds like this may not really have much to do with
> Twisted, though.
> >I've been using a twisted serial port in my gtk+ software for quite a
> >while
> >now, and I can get xonxoff flow control to work, but for some reason,
> >rtscts flow control isn't working (or I may be using it wrong).
> >
> >I'm connecting the software, via a usb-serial cable, to a Datalogic
> >barcode
> >scanner cradle.
> >I've been able to replicate this problem with pyserial as well.
>
> As you perhaps already know, Twisted's serial port support is
> implemented in terms of pyserial - and the layer Twisted adds is very
> thin.  So the problem you experience with pyserial is probably exactly
> the same as the problem you experience with Twisted, since the latter is
> actually the same code as the former.
> >
> >Without flow control on, I can for example, send a particular serial
> >string
> >to the cradle, and the cradle replies instantly with it's software
> >version
> >(as a string).
> >If I scan a barcode, this also instantly shows up in
> >twisted/pyserial/etc
> >(as a string).
> >
> >With xonxoff flow control on in both the software and cradle, the
> >serial
> >connection works exactly the same as having no flow control on.
> >
> >With rtscts flow control on in both the software and cradle however,
> >the
> >cradle doesn't reply instantly with it's software version when the
> >correct
> >string is sent.
> >However, a scanned barcode shows up instantly in the twisted/pyserial
> >software, and if you've previously requested the cradle software
> >version,
> >the software version string only shows up directly after receiving a
> >barcode string.
> >
> >Am I doing something wrong, or does anyone know what might be going on
> >here?
>
> Do you know that the device supports RTS/CTS?  Do you know that the USB
> driver for the device supports it?  Do you know that the USB driver
> support for it is bug free? :)
>
> Sorry I can't add anything more helpful.  I think you want to be looking
> for the problem at a pretty low level, though.  Perhaps even at the
> level of measuring voltage on the RTS pin...
>
> Jean-Paul
>
> ___
> Twisted-Python mailing list
> Twisted-Python@twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>

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.
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.

Either way, I've decided to stick with xon/xoff flow control for now - it
seems to work quite well.

Thanks anyway!
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Rts/Cts Serial port flow control in twisted

2011-11-30 Thread dsturmf...@gmail.com
On 9 November 2011 02:53, John Santos  wrote:

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

Thanks John - I'll keep the RS-232 breakout box in mind, if I decide to try
rts/cts flow control again in the future.

Darcy.
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python