minicom runscript

Tim Smyth timjsmyth at googlemail.com
Fri Oct 31 22:39:58 UTC 2008


 Dear Adam,

I picked your email address up off the Alioth Developer profile page on
minicom.  I was wondering if you could answer a question regarding minicom
runscript please?

I am trying to run a send zmodem command using a runscript (i.e. invoked in
the prompt by minicom -S databuoy.runscript).  I am logged onto a Ubuntu
linux box which then communicates with another linux box, running Wolvix
(slackware) linux over a radio-modem link.

I can manually run minicom, log into the slackware box and issue the command


sz -b -q -y outgoing.tar.gz

and the file download progress window pops up and then prompts me for
"READY: press any key to continue..." when the file is downloaded.

However when I try and invoke this within runscript, no such download
progress window is in evidence and the runscript hangs and eventually times
out with no file downloaded.  The gist of my script is below.  I am assuming
this is because the download progress window is sent to stderr (gleaned from
the web) and this cannot be handled within runscript?

I would be grateful for any insight you can give me on this please?

Yours sincerely,

Tim Smyth

# Author Tim Smyth
# Module: databuoy.runscript
# Date  08/10/21
# Version 1.0
#
# runscript script to download data from the databuoy
# This script should be run within minicom
# with the command minicom -S databuoy.runscript
#
###################################################
#set the global timeout
timeout 300
verbose on
# send a carriage return first to check that the login is
# correctly displayed
sleep 5
send "^C^C^C^C^C^C^C^C"
send "\n"
send "\n"
expect {
    "databuoy login:" break
    timeout 60 goto panic
}
goto login
login:
   send "root"
   expect {
      "Password:" break
      timeout 60 goto panic
      }
   sleep 2
   send "********"
   expect {
      "root at databuoy:~#" break
      timeout 60 goto panic
      }
   send "cd databuoy"
   expect {
     "root at databuoy:~/databuoy#" break
     timeout 60 goto panic
     }
   # issue the send command
   send "sz -b -q -y outgoing.tar.gz"
   expect {
     "**B00"
     timeout 60 goto panic
     }
   send "^C"
   expect {
      "READY: press any key to continue..."
      timeout 60 goto panic
     }
   send "\r\r"
   expect {
     "root at databuoy:~/databuoy#" break
     timeout 60 goto panic
   }
   # logout
   send "exit"
   sleep 5
   expect {
     "databuoy login:" break
     timeout 60 goto panic
   }
   sleep 5
   goto panic
#########################
# killminicom subroutine#
#########################
# kill minicom and hang up to allow future connection
killminicom:
   expect {
         "Enter Selection:"   break
         timeout 15  goto panic
   }
   ! killall -15 minicom
#########################
# panic subroutine      #
#########################
# panic kill
panic:
   ! killall -15 minicom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/minicom-devel/attachments/20081031/e15b319d/attachment.htm 


More information about the minicom-devel mailing list