Using minicom under linux as terminal program

General discussions related to the Altair 8800 Clone
Post Reply
Synoptic
Posts: 53
Joined: February 28th, 2014, 1:15 pm
Contact:

Using minicom under linux as terminal program

Post by Synoptic »

Minicom works very well, excepts, it lacks the binary sending mode.

However, it is possible to add that feature.

Taken from http://www.dannysung.com/wmain/linux/ti ... a-minicom/
First step is to install pv.

On RPM-based systems, just type:

Code: Select all

sudo yum install pv
On Debian-based systems, type:

Code: Select all

apt-get install pv
Now create this script, and place it in your ~/bin/ directory as (for example) bin-xfr.

Code: Select all

#!/bin/sh
INFILE=/dev/null
OUTFILE=/dev/null
 
while [ $# -gt 0 ]; do
 case "$1" in
 -i)
 shift
 INFILE="$1"
 ;;
 -o)
 shift
 OUTFILE="$1"
 ;;
 -h|--help)
 echo "$0 -i infile -o outfile"
 ;;
 *)
 INFILE="$1"
 esac
 shift
done
cat << EOF
binary-xfer utility for minicom
Sending file ${INFILE} to ${OUTFILE}
EOF
 
/usr/bin/pv --force -i 0.25 -B 128  ${INFILE}  2>&1 > ${OUTFILE}
# Use the line below if you don't have pv!
 
# /bin/cat ${INFILE} > ${OUTFILE}
cat << EOF
 
File transfer complete
EOF
sleep 1
Now go over to minicom and go to the configuration menu (via CTRL-A,O), then “File transfer protocols”. You can add a section there called “binary”, point it at your file, and specify:

Code: Select all

 Name: Binary
    Program: /home/MYUSERNAME/bin/bin-xfer -o %l -i
    Name: Y
    U/D:  U
    FullScr: Y
    IO-Red: N
    Multi:N
Then leave the menu and save your options. Next time you send a file (via CTRL-A,S), you should see “Binary” listed as an option.

The only caveat, is the firmware filename should not have special character in its name (space for example).
Last edited by Synoptic on March 18th, 2023, 2:40 pm, edited 1 time in total.
AltairClone
Site Admin
Posts: 677
Joined: April 5th, 2013, 10:55 am
Contact:

Re: Using minicom under linux as terminal program

Post by AltairClone »

Great info -- Thanks!

Mike
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Semrush [Bot] and 9 guests