1 |
On 12/10/2014 13:08, meino.cramer@×××.de wrote: |
2 |
> Hi, |
3 |
> |
4 |
> I want to send commands to ttyO1 (serial port on an embedded system). |
5 |
> The commands are one line each and terminated with CRL/LF (aka "DOS"). |
6 |
> |
7 |
> Since this will be done from a batch script, it should be possible |
8 |
> via commandline tools and non-interactively. The serial port is |
9 |
> already setup up the right way. |
10 |
> |
11 |
> I tried |
12 |
> |
13 |
> echo -n"blablabal\x0a\x0d" |
14 |
|
15 |
Firstly, this command is missing the -e switch. Secondly, the order of |
16 |
the control characters is wrong. I would suggest the use of printf as it |
17 |
has fewer pitfalls. |
18 |
|
19 |
# printf '%s\r\n' "command" |
20 |
|
21 |
--Kerin |