On Sunday 16 August 2009 15:55:31 Grant Edwards wrote:
On 2009-08-15, Hendrik van Rooyen hend...@microcorp.co.za wrote:
I am still confused about pyserial and serial - I found serial
in my distribution library, (on the SuSe machine, not on the
2.5 in Slackware) but I had to download
Hendrik van Rooyen wrote:
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
On Sunday 16 August 2009 08:20:34 John Nagle wrote:
Hendrik van Rooyen wrote:
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
On 2009-08-15, Hendrik van Rooyen hend...@microcorp.co.za wrote:
On Saturday 15 August 2009 16:25:03 Grant Edwards wrote:
Are you using python file operations open/read/write or OS
file-descriptor operations os.open/os.read/os.write?
The former - that seems to be the source of my trouble.
On Friday 14 August 2009 15:58:37 exar...@twistedmatrix.com wrote:
One strategy you might employ to get rid of the busy looping is to use
Twisted and its serial port support. This also addresses the full-
duplex issue you've raised.
I know - vaguely - about twisted and I have been dancing
On Friday 14 August 2009 16:19:04 Grant Edwards wrote:
On 2009-08-14, Hendrik van Rooyen hend...@microcorp.co.za wrote:
In the meantime I have had another idea which I have also not tried yet,
namely to do independent opens for reading and writing, to give me two
file instances instead of
On Friday 14 August 2009 16:03:22 Diez B. Roggisch wrote:
You should *really* just use pyserial. No hassle, instant satisfaction.
:-) I have downloaded and had a quick look, and I see it is based on the
standard library's serial.Serial class - another battery that I have not used
before.
On Friday 14 August 2009 16:19:36 Grant Edwards wrote:
On 2009-08-14, exar...@twistedmatrix.com exar...@twistedmatrix.com wrote:
One strategy you might employ to get rid of the busy looping
is to use Twisted and its serial port support. This also
addresses the full- duplex issue you've
On Friday 14 August 2009 16:28:26 Grant Edwards wrote:
On 2009-08-14, greg g...@cosc.canterbury.ac.nz wrote:
Hendrik van Rooyen wrote:
8---
Doh! It didn't even occur to me that somebody would use python
file objects for serial
On Saturday 15 August 2009 04:03:42 Terry Reedy wrote:
greg wrote:
You can't read and write with the same stdio file object
at the same time. Odd things tend to happen if you try.
I believe the C standard specifies that the behavior of mixed reads and
writes is undefined without
Terry Reedy wrote:
I believe the C standard specifies that the behavior of mixed reads and
writes is undefined without intervening seek and/or flush, even if the
seek is ignored (as it is on some Unix systems). With two threads, the
timing is undetermined.
It's also possible that the stdio
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
On 2009-08-15, Hendrik van Rooyen hend...@microcorp.co.za wrote:
On Friday 14 August 2009 16:19:04 Grant Edwards wrote:
What platform are you using? I suppose it's possible that
there's something broken in the serial driver for that
particular hardware.
Your experience seems to be exactly
On 2009-08-15, Hendrik van Rooyen hend...@microcorp.co.za wrote:
On Friday 14 August 2009 16:03:22 Diez B. Roggisch wrote:
You should *really* just use pyserial. No hassle, instant satisfaction.
:-) I have downloaded and had a quick look, and I see it is
based on the standard library's
On 2009-08-15, Hendrik van Rooyen hend...@microcorp.co.za wrote:
8
-PosixSerial.py
Thanks that looks, on first inspection, similar to the
serialposix.py module in the stdlib, but less cluttered.
pyserial is a bit more complex
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.
On Saturday 15 August 2009 16:25:03 Grant Edwards wrote:
Are you using python file operations open/read/write or OS
file-descriptor operations os.open/os.read/os.write?
The former - that seems to be the source of my trouble.
I have now written a little test that uses serial.Serial and it
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.
I am running into the self same issue again.
What I normally do is to open the port like this:
Hendrik van Rooyen schrieb:
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.
I am running into the self same issue again.
What I normally do is
Hendrik van Rooyen wrote:
port = open(/dev/ttyS0,r+b,0)
What I would really like is to have two threads - one that does blocking input
waiting for a character, and one that examines an output queue and transmits
the stuff it finds.
You can't read and write with the same stdio file object
On Friday 14 August 2009 12:54:32 Diez B. Roggisch wrote:
How about using pyserial? With that, I never had any problems accessing
the the serial ports, and AFAIK no duplex-problems as well. And I
seriously doubt that these are a python-related problem - python only
has a very thin, direct
On Friday 14 August 2009 14:13:46 greg wrote:
You can't read and write with the same stdio file object
at the same time. Odd things tend to happen if you try.
You need to open *two* file objects, one for reading
and one for writing:
fr = open(/dev/ttyS0,rb,0)
fw =
On 01:38 pm, hend...@microcorp.co.za wrote:
On Friday 14 August 2009 12:54:32 Diez B. Roggisch wrote:
How about using pyserial? With that, I never had any problems
accessing
the the serial ports, and AFAIK no duplex-problems as well. And I
seriously doubt that these are a python-related
Hendrik van Rooyen schrieb:
On Friday 14 August 2009 14:13:46 greg wrote:
You can't read and write with the same stdio file object
at the same time. Odd things tend to happen if you try.
You need to open *two* file objects, one for reading
and one for writing:
fr = open(/dev/ttyS0,rb,0)
On 2009-08-14, Hendrik van Rooyen hend...@microcorp.co.za 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,
That's not true. Linux/Unix does and always has supported
On 2009-08-14, Hendrik van Rooyen hend...@microcorp.co.za wrote:
In the meantime I have had another idea which I have also not tried yet,
namely to do independent opens for reading and writing, to give me two file
instances instead of one, and to try with that. I have no idea if it would
On 2009-08-14, exar...@twistedmatrix.com exar...@twistedmatrix.com wrote:
One strategy you might employ to get rid of the busy looping
is to use Twisted and its serial port support. This also
addresses the full- duplex issue you've raised.
There are no such full-dulex issues.
--
Grant
On 2009-08-14, greg g...@cosc.canterbury.ac.nz wrote:
Hendrik van Rooyen wrote:
port = open(/dev/ttyS0,r+b,0)
What I would really like is to have two threads - one that
does blocking input waiting for a character, and one that
examines an output queue and transmits the stuff it finds.
On 02:19 pm, inva...@invalid wrote:
On 2009-08-14, exar...@twistedmatrix.com exar...@twistedmatrix.com
wrote:
One strategy you might employ to get rid of the busy looping
is to use Twisted and its serial port support. This also
addresses the full- duplex issue you've raised.
There are no
greg wrote:
You can't read and write with the same stdio file object
at the same time. Odd things tend to happen if you try.
I believe the C standard specifies that the behavior of mixed reads and
writes is undefined without intervening seek and/or flush, even if the
seek is ignored (as it
30 matches
Mail list logo