JavaScript must be enabled in order for you to see "WP Copy Data Protect" effect. However, it seems JavaScript is either disabled or not supported by your browser. To see full result of "WP Copy Data Protector", enable JavaScript by changing your browser options, then try again.

The brief usage of minicom and script for serial communication


OMG, I haven’t posted the rubbish for a month, and someone laugh me about no idea for writing the head of this article. I want to record the screenshots about the brief usage of minicom and autoscript the process for the interactive interface of serial communication. How to use and autoscript it, and let’s keep reading:
1) The main menu when executing the "minicom -s"(Can setup the buadrate/device/flow control/etc)

2) The mapping of function key after press the "Ctrl-A"(Combination key for each func)

3) The sample codes for autoscripting to cover the gap of interactive interface about serial communication
#cat /usr/share/local/bin/lnkstat
if [[ $# -eq 0 ]] ; then
echo "Usage: lnkstat "
echo "Please attach the debug console w/ PCIe debug port firstly."
echo "You can use the tool of minicom to check it and will produce ttyUSB0."
else
stty -F /dev/ttyUSB0 115200 raw -echo #CONFIGURE SERIAL PORT
exec 3 cat <&3 > $1 & #REDIRECT SERIAL OUTPUT TO FILE
PID=$! #SAVE PID TO KILL CAT
echo "lnkstat" > /dev/ttyUSB0 #SEND COMMAND STRING TO SERIAL PORT
sleep 0.9s #WAIT FOR RESPONSE
kill $PID #KILL CAT PROCESS
exec 3<&- #FREE FD 3
#cat $1 #DUMP CAPTURED DATA
fi

◎、Above context is about the brief usage of minicom and script for serial communication, and I have referred this article. You also can google it if want to know more info like runspec of minicom or etc. That's all for today, and hope this article is helpful for you. See you next time!

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 
This site is protected by WP-CopyRightPro