LAA cli (aka. laacli)

laacli is a command line application, running on the LAA, allowing to control the LAA hardware.

$ laacli --help
Linaro Automation Appliance CLI

Usage: laacli <COMMAND>

Commands:
  button   Virtual buttons
  led      User LED
  power    Power rails
  rev      LAA Revision
  temp     Query temperature (Β°C)
  usb      USB Hub
  usbg-ms  USB Gadet Mass storage
  watt     Power consumption
  help     Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

Commands

button

Control the virtual buttons via the optocouplers.

$ laacli button --help
Virtual buttons

Usage: laacli button <BUTTON> <STATE>

Arguments:
  <BUTTON>  Virtual button [possible values: 1, 2, power, reset]
  <STATE>   Desired state [possible values: on, off]

led

Control the color of the user led.

$ laacli led --help
User LED

Usage: laacli led <STATE>

Arguments:
  <STATE>  Desired state [possible values: on, off]

power

Control the state of the different power rails.

$ laacli power --help
Power rails

Usage: laacli power <VBUS> <STATE>

Arguments:
  <VBUS>   VBus rail [possible values: 1v8, 3v3, 5v, 12v]
  <STATE>  Desired state [possible values: on, off, reset, status]

rev

Print the LAA hardware revision.

$ laacli rev
LAA rev 1.01

temp

Print the thermal probe values.

$ laacli temp --help
Query temperature (in Β°C)

Usage: laacli temp <PROBE>

Arguments:
  <PROBE>  Probe name [possible values: amb, dut, sys]

usb

Control the DUT USB ports state.

$ laacli usb --help
USB Hub

Usage: laacli usb <PORT> <STATE>

Arguments:
  <PORT>   USB port
  <STATE>  Desired state [possible values: on, off, reset, start, status, vbus]

status VS vbus

  • β€œstatus” returns the logical state of the USB port, it is not affected if the USB port has expreienced an OCP condition and shutdown or if it’s being backfed power from a misbehaving DUT.

  • β€œvbus” returns the physical state of the USB port. It returns β€œHIGH” if there is 5v present and β€œLOW” if not on the V_BUS pin of the specified USB port.

usbg-ms

Control the USB OTG port to act as a USB mass storage device using USB gadget mode (USB mass storage emulation).

$ laacli usbg-ms --help
USB Gadget Mass storage emulation

Usage: laacli usbg-ms <STATE> [FILENAME]

Arguments:
  <STATE>     Desired state [possible values: on, off, status]
  [FILENAME]  filename [default: ]

Calling On or Off twice

If you call laacli usbg-ms on <FILE> or laacli usbg-ms off twice in a row, the second call will fail and return 1.

This is expected, using laacli usbg-ms status will print the current state (On or Off).

watt

Print the instant power consuption of the power rails.

$ laacli watt --help
Power consumption

Usage: laacli watt <VBUS>

Arguments:
  <VBUS>  VBus rail [possible values: 1v8, 3v3, 5v, 12v]

laacli will return:

$ laacli watt 5v
4.968V
0.433A
2.14344W

eeprom

Read and write the EEPROMs on the MIB and SIB on your LAA setup.

Read

$ laacli eeprom read --help
Usage: laacli eeprom read <BOARD> <FIELD>

Arguments:
  <BOARD>  Board [possible values: sib, mib]
  <FIELD>  Field [possible values: type, rev, sid]

Write

$ laacli eeprom write --help
Usage: laacli eeprom write <BOARD> <FIELD> <VALUE>

Arguments:
  <BOARD>  Board [possible values: sib, mib]
  <FIELD>  Field [possible values: type, rev, sid]
  <VALUE>  Data

datatype

EEPROM accepts and return a double for each data field.

Write Protect

Make sure the write protect mechanism is disabled before writing to the eeprom.