uart - Send and Extract UART response

Extract data from UART.

Usage:

- command: uart <uartPort> [noflush]
  [expect: [hex] <expectText>]
  [extract: <extractText>]
  [extractKey: <key>...]
  [send: [hex] <sendText>]
  [retry: <retryCount>]
  [timeout: <timeout>]

Argument

Description

uartPort

UART port name: UART0, UART1, UART2, etc.

expectText

Text to expect, prior to extraction. If the hex keyword is used, expectText is interpreted as a hex string.

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. If the hex keyword is used, sendText is interpreted as a hex string.

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