cliechti at gmx.net
Mon Aug 12 01:00:53 CEST 2002
wouter at voti.nl (Wouter van Ooijen) wrote in
news:3d51718d.18409060 at news.xs4all.nl:
> I use pyserial 1.17 on a win2k PC to communicate with a device (PIC
> microcontroller) using a serial port. This works OK most of the time,
> but sometimes I get strange effects. This seems to happen much more
> often when the PC is busy (for instance retrieving email).
sorry that it took some time until i write - but i hoped somebody else had
an idea ;-)
> There are two problems that can occur with the sending of data (data
> is always one character):
> 1 the write call returns, but the character is not sent (my software
> waits for a response which will of course never come). When I send the
> next char the original char *is* sent (and the next char is sent
you could try to call .flush() (or flushOutput()) but i'm not sure if that
realy helps or hurts.
> 2 the write call simply does not return.
> I changed the serialwin32.py code to use non-overlapped IO, but effect
> is still the same: works most of the time, but fails sometimes,
> especially when the PC is busy.
> someone got a clue?
you could try an older version of pyserial. one older version is available
for download and the win32 code in there is different.
we're using pyserial at work on P200 and up with win98, NT, 2k but i have
not experienced such problems.
Chris <cliechti at gmx.net>
More information about the Python-list