On Sunday 16 August 2009 15:55:31 Grant Edwards wrote:
> On 2009-08-15, Hendrik van Rooyen 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 pyserial.
>
> That's ve
On 2009-08-15, Hendrik van Rooyen 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.
>
> I have now wri
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 doe
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 con
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 w
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 2009-08-15, Hendrik van Rooyen 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 because it is cross-p
On 2009-08-15, Hendrik van Rooyen 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 serial.Serial class - a
On 2009-08-15, Hendrik van Rooyen 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 the opposite t
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 rec
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 o
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 int
On Friday 14 August 2009 16:28:26 Grant Edwards wrote:
> On 2009-08-14, greg wrote:
> > Hendrik van Rooyen wrote:
8<---
> Doh! It didn't even occur to me that somebody would use python
> "file" objects for serial ports, and I completely
On Friday 14 August 2009 16:19:36 Grant Edwards wrote:
> On 2009-08-14, 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
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. An
On Friday 14 August 2009 16:19:04 Grant Edwards wrote:
> On 2009-08-14, Hendrik van Rooyen 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 wi
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
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 i
On 02:19 pm, inva...@invalid wrote:
On 2009-08-14, 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.
The
On 2009-08-14, greg 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.
>
> You can't r
On 2009-08-14, 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 Edwards g
On 2009-08-14, Hendrik van Rooyen 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
> make any difference,
On 2009-08-14, 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,
That's not true. Linux/Unix does and always has supported
full-duplex communica
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 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 probl
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 = open("/
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, direc
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 objec
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
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:
p
30 matches
Mail list logo