UART InteractionΒΆ
Configure UART1 at 9600 baud, 8 data bits, no parity, 1 stop bit:
- command: uartCfg UART1 9600 8N1
PLT-200A Only: Reconfigure UART0 as additional test points:
- command: uartCfg UART0 tp
Configure channel 1 on an external FTDI FT4323 USB to UART adapter as UART2:
- command: uartCfg UART2 115200
path: "1"
interface: "1"
id: "0x0403:0x6011"
Example: extract ICCID from cellular modem, storing in the ICCID
key.
- uartcmd: uart UART0
expect: "+CCID:"
extract: "CCID: (\\d{20})\r\n"
extractKey: ICCID
send: "AT+ICCID\r\n"
Example: extract multiple keys at once
- uartcmd: uart UART0
send: "\r\nkernel version\r\n"
extract: "\r\n(.*) version (.*)\r\n"
extractKey: KERNEL_NAME KERNEL_VERSION
Example: send and expect bytes from hex strings.
- uartcmd: uart UART0
send: hex "decafe01"
expect: hex "badc0ffee1"
Example: expect string
- command: uartExpect UART0 Pressed
- command: operator "Press button"
- command: uartAwait UART0 1
Example: expect bytes
- command: uartExpect UART0 "hex ef0102"
- command: operator "Press button"
- command: uartAwait UART0 1
Example: read timeout string
- command: uartReadTimeout UART0 1 "AT"
Example: read timeout bytes
- command: uartReadTimeout UART0 1 "hex badc0ffee1"
Commands