pyserial with binary data

alastair ally_burnett at yahoo.co.uk
Fri Nov 26 11:18:43 CET 2004


Hi,

I'm using pyserial to transfer data from PC to another device - the
data is either from an ASCII file or binary data file. Everything
works fine up until I start using files of a particular size on Linux,
around 1.3MB.

When I send the data on windows everything is ok - on Linux I get the
following traceback:

Traceback (most recent call last):
...
File "/home/pythonCode/loader.py", line 155,
in serialWrite
ser.write(buffer)
File "/usr/lib/python2.3/site-packages/serial/serialposix.py", line
288, in write
n = os.write(self.fd, d)
OSError: [Errno 11] Resource temporarily unavailable

In the serialposix.py file the data is being written to the serial
port - I'm guessing that the win32 file is used when running on
windows so might be why things work ok.

Can anyone offer any pointers as to why this should happen ? I first
thought that it might be because I was using binary data, but the same
happens when I tried a large ASCII data file. Any ideas for a
workaround appreciated :)

Many thanks,

Alastair.



More information about the Python-list mailing list