#!/bin/sh
DEVICE=/dev/ttyUSB0
SPEED=9600
COMMAND=67

TEMPFILE=`mktemp`
TEMPRCFILE=`mktemp`

cat>${TEMPRCFILE}<<EOT
def device ${DEVICE}
def speed ${SPEED}
def command ${COMMAND}

set modem type none
set line \m(device)
if fail exit 1 "Device not available"
set speed \m(speed)
set serial 8n1
set carrier-watch off
lineout \m(command)
for \%i 1 4 1 input
exit
EOT

kermit ${TEMPRCFILE} >${TEMPFILE} 2>&1
cat ${TEMPFILE}
rm ${TEMPFILE} ${TEMPRCFILE}
