Serial I/O problem with pywin32 ?
xlebourd at gmail.com
Wed Sep 3 11:44:19 CEST 2008
I try to access to a Bluetooth GPS data-logger with Python. I use
Sending and receiving little messages (~100 char) works fine. However,
when I ask the GPS to dump the trails, it returns some Mbytes and here
is the problem : in the stream of bytes, I randomly losts chunks of
I tried USPP and pyBlueZ instead of pySerial : same problem.
It doesn't like it is a bufferoverun bug from me because :
- the GPS seems to wait when I do not read the stream,
- there is never more than 200 inWainting() characters,
- my code to test it is quite simple :
seriallink = serial.Serial("COM40")
fileName = "data.dump"
out = open(fileName, 'w')
c = seriallink.read()
out.write(" %0.2X" % ord(c))
(with pyBluez :
sock=BluetoothSocket( RFCOMM )
I tried my program on two different PC with two Bluetooth dongle,
(with pySerial, USPP, pyBluez).
The same things are :
- the GPS (which works fine with the dumper program of the
I've found another guy with a similar problem :
- no problem with little messages
- lost of one byte every hour when receiving a lot of data
Any known problems with pywin32 and serial I/O when downloading a big
stream of data ?
More information about the Python-list