Zack Lalanne
Zack Lalanne

Reputation: 25

Sending a text file over serial port using Perl

I have been writing some Perl scripts to interact with a serial port connection in the last couple days using the Win32::SerialPort module. Is there a way to send a text file via the serial port? Any Perl module will do, but I would like to keep using Perl for other reasons.

Upvotes: 0

Views: 1359

Answers (1)

DavidO
DavidO

Reputation: 13942

Back in the old days of serial ports and POTS modems we used protocols like XMODEM, YMODEM, ZMODEM, and Kermit to transfer files over the serial connection. I did some searching on cpan, as you would certainly not want to build the protocol yourself all over again. The only one of those protocols (of the named ones I can remember) that seems to have CPAN support is XMODEM (which also happens to be the oldest of the ones I mentioned).

XMODEM search on CPAN

Both ends of the line will need to support the protocol, by the way.

Upvotes: 1

Related Questions