<div class="gmail_quote">
<div>Dear Adam,</div>
<div>&nbsp;</div>
<div>I picked your email address up off the Alioth Developer profile page on minicom.&nbsp; I was wondering if you could answer a question regarding minicom runscript please?</div>
<div>&nbsp;</div>
<div>I am trying to run a send zmodem command using a runscript (i.e. invoked in the prompt by minicom -S databuoy.runscript).&nbsp; I am logged onto a Ubuntu linux box which then communicates with another linux box, running Wolvix (slackware) linux over a radio-modem link.</div>

<div>&nbsp;</div>
<div>I can manually run minicom, log into the slackware box and issue the command </div>
<div>&nbsp;</div>
<div>sz -b -q -y outgoing.tar.gz</div>
<div>&nbsp;</div>
<div>and the file download progress window pops up and then prompts me for &quot;READY: press any key to continue...&quot; when the file is downloaded.</div>
<div>&nbsp;</div>
<div>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.&nbsp; The gist of my script is below.&nbsp; 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?</div>

<div>&nbsp;</div>
<div>I would be grateful for any insight you can give me on this please?</div>
<div>&nbsp;</div>
<div>Yours sincerely,</div>
<div>&nbsp;</div>
<div>Tim Smyth</div>
<div>&nbsp;</div>
<div># Author Tim Smyth<br># Module: databuoy.runscript<br># Date&nbsp; 08/10/21<br># Version 1.0<br>#<br># runscript script to download data from the databuoy<br># This script should be run within minicom<br># with the command minicom -S databuoy.runscript<br>
#<br>###################################################<br>#set the global timeout<br>timeout 300<br>verbose on<br># send a carriage return first to check that the login is<br># correctly displayed<br>sleep 5<br>send &quot;^C^C^C^C^C^C^C^C&quot;<br>
send &quot;\n&quot;<br>send &quot;\n&quot;<br>expect {<br>&nbsp;&nbsp;&nbsp; &quot;databuoy login:&quot; break<br>&nbsp;&nbsp;&nbsp; timeout 60 goto panic</div>
<div>}</div>
<div>goto login</div>
<div>login:<br>&nbsp;&nbsp; send &quot;root&quot;<br>&nbsp;&nbsp; expect {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;Password:&quot; break<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timeout 60 goto panic<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp; sleep 2<br>&nbsp;&nbsp; send &quot;********&quot;<br>&nbsp;&nbsp; expect {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;<a href="mailto:root@databuoy" target="_blank">root@databuoy</a>:~#&quot; break<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timeout 60 goto panic<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp; send &quot;cd databuoy&quot;<br>&nbsp;&nbsp; expect {<br>&nbsp;&nbsp;&nbsp;&nbsp; &quot;<a href="mailto:root@databuoy:~/databuoy" target="_blank">root@databuoy:~/databuoy</a>#&quot; break<br>&nbsp;&nbsp;&nbsp;&nbsp; timeout 60 goto panic<br>
&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp; #&nbsp;issue the send command<br>&nbsp;&nbsp; send &quot;sz -b -q -y outgoing.tar.gz&quot;<br>&nbsp;&nbsp; expect {</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; &quot;**B00&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp; timeout 60 goto panic<br>&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp; send &quot;^C&quot;<br>&nbsp;&nbsp; expect {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;READY: press any key to continue...&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timeout 60 goto panic<br>&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp; send &quot;\r\r&quot;<br>
&nbsp;&nbsp; expect {<br>&nbsp;&nbsp;&nbsp;&nbsp; &quot;<a href="mailto:root@databuoy:~/databuoy" target="_blank">root@databuoy:~/databuoy</a>#&quot; break<br>&nbsp;&nbsp;&nbsp;&nbsp; timeout 60 goto panic<br>&nbsp;&nbsp; }<br>&nbsp;&nbsp; # logout<br>&nbsp;&nbsp; send &quot;exit&quot;<br>&nbsp;&nbsp; sleep 5<br>
&nbsp;&nbsp; expect {<br>&nbsp;&nbsp;&nbsp;&nbsp; &quot;databuoy login:&quot; break<br>&nbsp;&nbsp;&nbsp;&nbsp; timeout 60 goto panic<br>&nbsp;&nbsp; }<br>&nbsp;&nbsp; sleep 5<br>&nbsp;&nbsp; goto panic<br>#########################<br># killminicom subroutine#<br>#########################<br># kill minicom and hang up to allow future connection<br>
killminicom:<br>&nbsp;&nbsp; expect {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;Enter Selection:&quot;&nbsp;&nbsp; break<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timeout 15&nbsp; goto panic<br>&nbsp;&nbsp; }<br>&nbsp;&nbsp; ! killall -15 minicom</div>
<div>#########################<br># panic subroutine&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br>#########################<br># panic kill<br>panic:<br>&nbsp;&nbsp; ! killall -15 minicom</div>
<div>&nbsp;</div></div><br>