<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div>Hi Tushar,<br></div>I am facing a problem with the above implementation.<br><br></div>When target is powered on, logs coming started on minicom.<br></div>
After 1 second the message is coming as "<font>Executing boot script in 3.000 seconds - enter ^C to abort</font>".<br><br></div>Here, we need to give cntl+c command to stop the target from auto-boot. We want to flash new image into it.<br>
</div><div><br></div>Our task is to automate the process.<br><br></div>I tried with the following code to run through runscript.<br><br>set search_string="Executing boot script in 3.000 seconds"<br><br>timeout 50<br>
verbose on<br><br>send "\n\r\n\r"<br>
expect {<br> "$search_string" break<br> timeout 2 goto abort<br> }<br><br>abort:<br> print \nGiving cntl+c command on minicom<br> send "\^C\r"<br> send "\^C"<br>
send \^C\r<br> send ^C\r<br> expect {<br> "RedBoot>" break<br> timeout 3 goto panic<br> }<br> print \n!!!!!!Bye Bye runscript!!!!!!!<br>
sleep 2<br><br>panic:<br> print \n!!!!!!Bye Bye Minicom!!!!!!!\n<br> ! killall -2 minicom<br><br><br></div>What i am observing is , first this script is running then minicom logs start comming. Actually it should be as first some logs should come till the search string. Then our command cntl+c should run.<br>
<br>
</div>please help me..<br><br></div>Thank you in advance..<br><br><br></div>Regards,<br></div>lalit<br></div>