uart - Send and Extract UART response

Extract data from UART.

Usage:

- uartcmd: uart UART0|UART1 [noflush]
  [expect: <expectText>]
  [extract: <extractText>]
  [extractKey: <key>...]
  [send: <sendText>]
  [retry: <retryCount>]
  [timeoutms: <timeout>]

Argument

Description

UART0, UART1

UART port

expectText

Text to expect, prior to extraction

extractText

Regular expression to extract (uses RE2 Syntax, except \C)

key

Key(s) in which to store extracted text. To save multiple values, use multiple capture groups.

sendText

Text to send prior to extraction

noflush

Don’t flush receive buffer before extraction

retryCount

Number of times to retry the test step (optional)

timeout

Timeout, in milliseconds (default: 1000ms)

Examples