Close

More robust base64

A project log for Silly software wishlist

Motivation to do some software projects by writing them down.

lion-mclionheadlion mclionhead 09/11/2024 at 01:190 Comments

Transferring large files over a serial port & console using base64 has proven difficult.  It's too prone to errors to get beyond a few MB.  It's prone to spurrious keypresses, framing errors, syslog printouts.  Past lion had good results with sz & rz in the days of dialup, but they require 2 way communication.  The trick with Linux is multiple programs can write to the serial device, but only 1 can read at a time.  Any file transfer over console requires the user to observe if the transfer was successful, then rerun the sender over & over with a way to specify what packets to resend. 

The normal base64 transfer involves having a terminal in xterm with a 2 way connection while simultaneously catting to the serial port in another xterm.  The user could copy some kind of result code from the terminal to another cat command to resend the lost packets.  The trick is the terminal is going to contaminate the result code with all the base64 data & a lot of syslog junk.  It would take some fiddling or formatting magic to isolate the result code.

This base64 replacement should also use compression.

Discussions