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ο
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.