views:

248

answers:

1

Hi,

I have a working connection with my serial device via PySerial, but I also want to transfer files via the xmodem protocol as part of my program.

Which would be the most platform-neutral way to do this? Worst case, I could close() my serial.Serial object in Python and use subprocess to call upon /usr/bin/sb, but that seems inelegant.

I'm currently on Ubuntu 9.10 and am using a USB-TTY adapter.

Any ideas?

A: 

I'm not familiar with the details of the xmodem protocol, but one person answering the xmodem-for-python question appears to be, and has even provided what looks like a crude implementation of xmodem in Python. Perhaps you could use that, or ideas from other the answers there.

Peter Hansen
Hmmm the questioner there wanted to RECEIVE from a sensor device; the answer to which you refer is a crude implementation of SENDING.
John Machin