[Tutor] file transfer through serial modem -- pythin code

Chris Fuller cfuller084 at thinkingplanet.net
Tue Feb 26 16:51:42 CET 2008

You probably want to start with PySerial:

But, the details really depend on the application.. what are you talking to at 
the other end?  Do you need a general terminal program?

You can probably find xmodem and zmodem libraries, but if you control both 
ends, rolling your own would be easy enough, just be sure to check for data 
corruption.  Zmodem is preferred, since Xmodem can pad the end of the file 
with NULLs.

If you are working through a modem, you will need to be familiar with the 
Hayes AT Command Set.  Google is your friend.

Answering incoming calls is harder, you need access to the modem control lines 
(or you can tell the modem to answer manually).  This is a platform specific 

You might start out with a null modem cable between two computers (or even the 
same computer, with two serial ports), just to get familiar with the system.


More information about the Tutor mailing list