I have a minicom script which sends some commands via serial and expects something back(which works) but im having trouble exiting the minicom screen.
Below is the minicom script:
success1:
print \nSuccessfully received running!
send "exit"
exit 0
success2:
print \nSuccessfully received degrading!
! killall -9 minicom
exit
I was using ! killall -9 minicom which is recommended on their documentation but unfortunately, when running the script on Jenkins, it fails due to exit code 137 (Another process sent a signal 9). However this does exit minicom, just not successfully.
On the other hand, the 'send "exit"' just logs out of the device, and doesnt exit minicom.
How can i exit minicom and receive a 0 exit code?
you need to feed
<stdin>with three characters:<ctrl-A>x<enter>/bin/rm -f capture.txt; ( minicom -D /dev/ttyUSB0 -S test_minicom.macro -C capture.txt < escape.txt ) ; cat capture.txt