Minicom scripting for UART shell


We have connected a DWM1001-dev board to Raspberry Pi and are using it to collect location data. We are accessing with Minicom to the terminal and send the commands there:

[code]sudo minicom -D /dev/serial0

dwm> lec[/code]

This works perfectly but we want to automate the launch of the process on system start. For it we have found the posibility of using a minicom script.

sudo minicom -D /dev/serial0 -S script.txt

whose content will be something like:

send lec

What we see is that if the shell needs to be opened with two ENTER pressings. How can we send that through minicom scripts?

We have tried including different ways like:

send \n send \n\r send \n\n

but none worked.

Any ideas?

Thansk in advance.

send “\n”
sleep 2
send “\n”

is sent to the modem. It is followed by a ‘\r’. can be:

  • regular text, e.g. ‘send hello’
  • text enclosed in quotes, e.g. ‘send “hello world”’

Within the following sequences are recognized:
\n - newline
\r - carriage return
\a - bell
\b - backspace
\c - don’t send the default ‘\r’.
\f - formfeed
^ - the ^ character
\o - send character o (o is an octal number)