Is it possible to use python to get True Full Duplex on a Serial port?

Hendrik van Rooyen hendrik at microcorp.co.za
Sat Aug 15 13:18:53 EDT 2009


On Saturday 15 August 2009 14:40:35 Michael Ströder wrote:
> Hendrik van Rooyen wrote:
> > In the past, on this  group, I have made statements that said that on
> > Linux, the serial port handling somehow does not allow transmitting and
> > receiving at the same time, and nobody contradicted me.
>
> Despite all the good comments here by other skilled people I'd recommend to
> determine whether the transmission line to the devices accessed support
> full duplex.
>
> My knowledge is a bit rusty on this topic. But I vaguely remember having to
> deal with symmetric two-wire connections (RS-485) which were definitely
> limited to half-duplex by the wire. So the PC hardware was a normal serial
> port with the usual UART hardware device but the transmission protocols
> were limited to half-duplex.

You raise a good point, that is probably not well known amongst the youngsters 
here, as simple serial multidropping has gone out of fashion.

There is nothing wrong with your memory as far as RS-485 goes - you have 
to "turn the line around", same as for *shudder* Burroughs TDI (Two Wire 
Direct Interface).  Otherwise, if two or more parties talk at once you have 
cacophony.  An RS-422 link is to some extent worse, as it is capable of full 
duplex, but the slaves cannot hear each other, so they have to listen and 
play very nicely with the master.

This instance Is not one of those, thank heaven - I am on both sides of the 
link - once in the eBox in python, and on the other side there is just one  
Dallas chip - a fast (30 Mhz single cycle) 8051 lookalike that I programmed 
in assembler.  It is a thing that does discrete I/O that we have made for a 
customer. The link in between is just RS-232 receive and transmit without 
hardware flow control or anything fancy.  This is why I was so certain that 
there was something wrong in my python part, because I could use the second 
port on the Dallas to do monitoring, by spewing stuff out into Hyper 
Terminal.

- Hendrik




More information about the Python-list mailing list