[WindyCity-pm] File transfer over serial ports.

Knight, Brian Brian.Knight at us.mizuho-sc.com
Wed Dec 19 14:26:21 PST 2007


I would suggest using "sz" and "rz" because they implement a file transfer
protocol with error checking built in.  They can also transfer multiple files
in one shot.

It's even simpler if the host on the other side of the serial link is running
a shell, because "sz" will automatically start "rz" on the remote side.
Without testing it, something like 'cat /dev/ttyS0 | sz $FILE1 [$FILE2 [...]]
> /dev/ttyS0' ought to work.

Good old Zmodem.

-Brian Knight


> -----Original Message-----
> From: 
> windycity-pm-bounces+brian.knight=us.mizuho-sc.com at pm.org 
> [mailto:windycity-pm-bounces+brian.knight=us.mizuho-sc.com at pm.
> org] On Behalf Of Jonathan Rockway
> Sent: Wednesday, December 19, 2007 4:05 PM
> To: windycity-pm
> Subject: Re: [WindyCity-pm] File transfer over serial ports.
> 
> 
> On Wed, 2007-12-19 at 13:28 -0800, Richard Reina wrote:
> > 
> > I am trying to find a way to transfer small files from one linux 
> > computer to another over serial ports. Does anyone know where I can 
> > get help writing a perl script that will do this?
> 
> Can't you "cat file > /dev/ttyS0" on the sending end and "cat 
> /dev/ttyS0
> > file" on the receiving end?*  If you're worried about data 
> loss, just
> md5 on both sides and manually compare the checksums.
> 
> If you insist on perl, this look good:
> 
> http://search.cpan.org/~cook/Device-SerialPort/SerialPort.pm
> 
> [*] Incidentally, I was doing VoIP before it was called that 
> many years ago like "cat /dev/dsp | nc remote.host 1337" and 
> "nc -l -p 1337
> > /dev/dsp".  Effective and simple :)
> 
> Regards,
> Jonathan Rockway
> 
> 
-----------------------------------------
#####################################################################################
CONFIDENTIAL: This e-mail, including its contents and attachments,
if any, are confidential. It is neither an offer to buy or sell,
nor a solicitation of an offer to buy or sell, any securities or
any related financial instruments mentioned in it. If you are not
the named recipient please notify the sender and immediately delete
it. You may not disseminate, distribute, or forward this e-mail
message or disclose its contents to anybody else. Unless otherwise
indicated, copyright and any other intellectual property rights in
its contents are the sole property of Mizuho Securities USA Inc.
     E-mail transmission cannot be guaranteed to be secure or
error-free. The sender therefore does not accept liability for any
errors or omissions in the contents of this message which arise as
a result of e-mail transmission.  If verification is required
please request a hard-copy version.
     Although we routinely screen for viruses, addressees should
check this e-mail and any attachments for viruses. We make no
representation or warranty as to the absence of viruses in this
e-mail or any attachments. Please note that to ensure regulatory
compliance and for the protection of our customers and business, we
may monitor and read e-mails sent to and from our server(s).
#####################################################################################


More information about the WindyCity-pm mailing list