Problem Description:
Two Linux devices, how to automatically send and receive data through the serial port.
Time:
2013.10.08 Tuesday
Reference:
1 minicom Chinese Manual:
Http://www.cnblogs.com/my-blog/archive/2008/12/10/1351753.html
2 Automated testing with minicom--minicom by bash script operations:
http://yaomingyue906629.blog.163.com/blog/static/77790531201171231540166/
Solution:
The first thought is the Linux with the serial communication tool minicom.
But Minicom's settings do not automatically send this feature.
But it doesn't matter, we can use the script to let minicom send the data automatically.
Steps:
At the command line,
-> minicom
-> Ctrl+a->o
-> Carriage return
-> Selected D-script Program
-> set to/bin/bash
-> Save as default settings DFL
->ctrl+a, Q quit minicom
Then there's the write-send script, as follows:
#!/bin/bash
Flag=1
while [$flag = 1]
Todo
Echo 123456
Sleep 1
Done
Exit 0
I'll take it as a test.sh.
Finally, execute the script:
-> minicom-s test.sh